• 2 months ago

Category

😹
Fun
Transcript
00:00Hello and welcome everyone.
00:02So let's learn about some of the gcloud related commands, specially all those activities we
00:10have done in this particular module 1.
00:14So related to let's say projects, we have a bailings, some kind of accounts, authentication,
00:22some configuration.
00:23Okay.
00:24So either we can definitely do it from our command line local interface or we can just
00:32simply open activate cloud shell.
00:36Let me make it big screen.
00:38Okay.
00:39And this is going to provision a cloud shell.
00:43Now this cloud share as we have already seen, there is a by default gcloud command line
00:49utility is already installed.
00:52And in my case, currently it's my first project and this is the project we created.
00:59Afterwards, I created this project also.
01:02So let me cancel this one.
01:04Now all those things how we can do it from command line.
01:09So currently you can have a look at this particular project has been set and this is nothing but
01:16our my first project project ID core period 309910.
01:23Now let's say if you don't want to set this particular project as a your default project,
01:30you can easily unset it.
01:32So it will be a gcloud config.
01:36Now before we unset any of the project name or kind of any other properties, let's just
01:42list down what are the different properties are there.
01:46Now let's say if you don't know what to do after this config, just simply put help and
01:53it will give you all the options related to what you can do it.
01:58See there is a nice documentation are available like gcloud command line help configuration
02:07get value list.
02:09Okay.
02:10So what we can do?
02:11Let's just try gcloud config list.
02:17Let's just authorize.
02:19Yes.
02:21So currently these are the properties are set inside the configuration.
02:27This is my account.
02:28This is the current project.
02:30Let's say I just want to unset this particular project and we want to set another project
02:35as a some default project.
02:38So gcloud config unset and project.
02:43Yes, we have successfully unset the project property.
02:49Now you can have a look at this yellow part has been vanished.
02:53So currently there is no default project.
02:57Now let's say again we want to set some default project.
03:00We can use gcloud config set.
03:06Now for which property you want to set it.
03:08We want to set it for project and along with the project, you just cannot give the project
03:13name because project name cannot be unique.
03:16Let's say I just want to set this learn GCP AC guide project.
03:21So let me select the id, cancel it and paste as another argument.
03:27Yes, we have successfully set up our new project as a default project.
03:34Now let's say we want to list down all the projects.
03:37So currently, as of recording this video, I have three projects are available.
03:42We want to see it from the command line.
03:44So gcloud, we have one utility like a projects.
03:49Let me write list.
03:50Yes, so we have these three projects are available.
03:54So for all three, there is a project number, project name, and we have a project id.
04:02Let's see what other things we can do with this gcloud project.
04:07Let me put help.
04:08So it will give you all the options what we can do.
04:11So it says that gcloud project, it can create and manage project access policies.
04:18So let's just go down, we can even create a new project, we can delete the project,
04:24we can describe project like it will show all the metadata for the project.
04:30So let's try a few commands.
04:32We can even update something.
04:34Okay, so let's say gcloud projects.
04:39Let's create a new project.
04:41Okay.
04:42Let's say we'll give the name like a project from CLI.
04:48Okay.
04:49And let's execute it.
04:50Yeah.
04:51So create in progress.
04:53Now how we can verify.
04:54So we can again fire the commands like gcloud project list only.
05:00So it's still going on enabling some services.
05:03Yes.
05:04Done successfully.
05:05Now, if I just go to this particular one, mostly, yeah, we are able to see project from
05:12CLI.
05:13Let's say I just want to delete this particular project.
05:17So I can use like a gcloud project.
05:19I can use like a delete for which particular project you want to delete it.
05:24So our project's ID in this particular case is the from all project from CLI.
05:32So let me select it and let's just execute it.
05:36Yes.
05:37Do you really want to delete this project?
05:39So we just need some kind of confirmation.
05:42Yes.
05:43So project is about to shutting down.
05:46So if you just go from all, it will be removed.
05:49Now let me clear the screen.
05:52Apart from project, you have some billing accounts with your project associated.
05:57So let's say gcloud, we have one more modules.
06:01It is a billing.
06:02Let me put list here.
06:04Yeah.
06:05So that is not a correct one.
06:07So we can use like a gcloud billing and I think let's just see what other options we
06:15can try with billing.
06:17Let's say billing help.
06:20OK.
06:21So gcloud billing, then we can use the accounts.
06:25So inside the accounts, what are the billing accounts are there?
06:29Yeah.
06:30Any other things like a budget related information, you can get it.
06:34You can even link some projects with billing account.
06:38You can have a look at this way.
06:40Now gcloud billing account list.
06:43So let's try this one.
06:45So it will be a gcloud billing account list.
06:51Oops.
06:52It has to be account, I guess.
06:54Is it correct?
06:55Yeah, it's correct one.
06:57gcloud billing and we have our accounts list.
07:02Yeah.
07:03So this is that this particular command, it's still not generally available.
07:09So either you can use in a beta level or at an alpha level.
07:14So let me go with the beta stage and let's see what we'll get.
07:21Yeah, we have to use the list.
07:23Yes.
07:24So currently we have two billing accounts are available.
07:27So if you don't know any command, you can just have some juggling here and there and
07:33immediately you'll get an idea because with gcloud, there is a nice help are available
07:38and Google will keep giving you suggestions as you type the command.
07:43So that is about the projects and some of the things related to billing account.
07:50Now these are all most of the time one time activity only.
07:54So generally, when you first time set up something like a project or a billing account, you can
08:01easily do it from the console.
08:03Also, if somehow consoles are not working in that case, you can definitely use the command
08:08line.
08:09But these are all just a one time activity.
08:11So generally, people prefer to use unless they are using in a production environment
08:17where you do not have access for console.
08:21One can easily use this command line tool.
08:24Otherwise, this console, I would highly prefer because that is just a one time activity.
08:31But when you are dealing with the other Google cloud services like compute engine, we have
08:36app engine, Kubernetes.
08:38So in that particular situation, this command line will be very much helpful.
08:43Alright, so as we progress along the course, first, we'll try to dissect everything from
08:48the console only.
08:50Try to gain the understanding about what does Google cloud services are and products are.
08:58And afterwards, we'll try to achieve almost similar thing what you can do from the command
09:04line also.
09:05And for that, what are the different G cloud modules are available and other utilities
09:10are available for different products and services.
09:14Alright, that's all about this video and I'll see you in the next video.

Recommended