Skip to player
Skip to main content
Skip to footer
Search
Connect
Watch fullscreen
Like
Comments
Bookmark
Share
Add to Playlist
Report
009 GCloud command for Module - 1
Abdullah Manzoor
Follow
8/9/2024
Category
😹
Fun
Transcript
Display full video transcript
00:00
Hello and welcome everyone.
00:02
So let's learn about some of the gcloud related commands, specially all those activities we
00:10
have done in this particular module 1.
00:14
So related to let's say projects, we have a bailings, some kind of accounts, authentication,
00:22
some configuration.
00:23
Okay.
00:24
So either we can definitely do it from our command line local interface or we can just
00:32
simply open activate cloud shell.
00:36
Let me make it big screen.
00:38
Okay.
00:39
And this is going to provision a cloud shell.
00:43
Now this cloud share as we have already seen, there is a by default gcloud command line
00:49
utility is already installed.
00:52
And in my case, currently it's my first project and this is the project we created.
00:59
Afterwards, I created this project also.
01:02
So let me cancel this one.
01:04
Now all those things how we can do it from command line.
01:09
So currently you can have a look at this particular project has been set and this is nothing but
01:16
our my first project project ID core period 309910.
01:23
Now let's say if you don't want to set this particular project as a your default project,
01:30
you can easily unset it.
01:32
So it will be a gcloud config.
01:36
Now before we unset any of the project name or kind of any other properties, let's just
01:42
list down what are the different properties are there.
01:46
Now let's say if you don't know what to do after this config, just simply put help and
01:53
it will give you all the options related to what you can do it.
01:58
See there is a nice documentation are available like gcloud command line help configuration
02:07
get value list.
02:09
Okay.
02:10
So what we can do?
02:11
Let's just try gcloud config list.
02:17
Let's just authorize.
02:19
Yes.
02:21
So currently these are the properties are set inside the configuration.
02:27
This is my account.
02:28
This is the current project.
02:30
Let's say I just want to unset this particular project and we want to set another project
02:35
as a some default project.
02:38
So gcloud config unset and project.
02:43
Yes, we have successfully unset the project property.
02:49
Now you can have a look at this yellow part has been vanished.
02:53
So currently there is no default project.
02:57
Now let's say again we want to set some default project.
03:00
We can use gcloud config set.
03:06
Now for which property you want to set it.
03:08
We want to set it for project and along with the project, you just cannot give the project
03:13
name because project name cannot be unique.
03:16
Let's say I just want to set this learn GCP AC guide project.
03:21
So let me select the id, cancel it and paste as another argument.
03:27
Yes, we have successfully set up our new project as a default project.
03:34
Now let's say we want to list down all the projects.
03:37
So currently, as of recording this video, I have three projects are available.
03:42
We want to see it from the command line.
03:44
So gcloud, we have one utility like a projects.
03:49
Let me write list.
03:50
Yes, so we have these three projects are available.
03:54
So for all three, there is a project number, project name, and we have a project id.
04:02
Let's see what other things we can do with this gcloud project.
04:07
Let me put help.
04:08
So it will give you all the options what we can do.
04:11
So it says that gcloud project, it can create and manage project access policies.
04:18
So let's just go down, we can even create a new project, we can delete the project,
04:24
we can describe project like it will show all the metadata for the project.
04:30
So let's try a few commands.
04:32
We can even update something.
04:34
Okay, so let's say gcloud projects.
04:39
Let's create a new project.
04:41
Okay.
04:42
Let's say we'll give the name like a project from CLI.
04:48
Okay.
04:49
And let's execute it.
04:50
Yeah.
04:51
So create in progress.
04:53
Now how we can verify.
04:54
So we can again fire the commands like gcloud project list only.
05:00
So it's still going on enabling some services.
05:03
Yes.
05:04
Done successfully.
05:05
Now, if I just go to this particular one, mostly, yeah, we are able to see project from
05:12
CLI.
05:13
Let's say I just want to delete this particular project.
05:17
So I can use like a gcloud project.
05:19
I can use like a delete for which particular project you want to delete it.
05:24
So our project's ID in this particular case is the from all project from CLI.
05:32
So let me select it and let's just execute it.
05:36
Yes.
05:37
Do you really want to delete this project?
05:39
So we just need some kind of confirmation.
05:42
Yes.
05:43
So project is about to shutting down.
05:46
So if you just go from all, it will be removed.
05:49
Now let me clear the screen.
05:52
Apart from project, you have some billing accounts with your project associated.
05:57
So let's say gcloud, we have one more modules.
06:01
It is a billing.
06:02
Let me put list here.
06:04
Yeah.
06:05
So that is not a correct one.
06:07
So we can use like a gcloud billing and I think let's just see what other options we
06:15
can try with billing.
06:17
Let's say billing help.
06:20
OK.
06:21
So gcloud billing, then we can use the accounts.
06:25
So inside the accounts, what are the billing accounts are there?
06:29
Yeah.
06:30
Any other things like a budget related information, you can get it.
06:34
You can even link some projects with billing account.
06:38
You can have a look at this way.
06:40
Now gcloud billing account list.
06:43
So let's try this one.
06:45
So it will be a gcloud billing account list.
06:51
Oops.
06:52
It has to be account, I guess.
06:54
Is it correct?
06:55
Yeah, it's correct one.
06:57
gcloud billing and we have our accounts list.
07:02
Yeah.
07:03
So this is that this particular command, it's still not generally available.
07:09
So either you can use in a beta level or at an alpha level.
07:14
So let me go with the beta stage and let's see what we'll get.
07:21
Yeah, we have to use the list.
07:23
Yes.
07:24
So currently we have two billing accounts are available.
07:27
So if you don't know any command, you can just have some juggling here and there and
07:33
immediately you'll get an idea because with gcloud, there is a nice help are available
07:38
and Google will keep giving you suggestions as you type the command.
07:43
So that is about the projects and some of the things related to billing account.
07:50
Now these are all most of the time one time activity only.
07:54
So generally, when you first time set up something like a project or a billing account, you can
08:01
easily do it from the console.
08:03
Also, if somehow consoles are not working in that case, you can definitely use the command
08:08
line.
08:09
But these are all just a one time activity.
08:11
So generally, people prefer to use unless they are using in a production environment
08:17
where you do not have access for console.
08:21
One can easily use this command line tool.
08:24
Otherwise, this console, I would highly prefer because that is just a one time activity.
08:31
But when you are dealing with the other Google cloud services like compute engine, we have
08:36
app engine, Kubernetes.
08:38
So in that particular situation, this command line will be very much helpful.
08:43
Alright, so as we progress along the course, first, we'll try to dissect everything from
08:48
the console only.
08:50
Try to gain the understanding about what does Google cloud services are and products are.
08:58
And afterwards, we'll try to achieve almost similar thing what you can do from the command
09:04
line also.
09:05
And for that, what are the different G cloud modules are available and other utilities
09:10
are available for different products and services.
09:14
Alright, that's all about this video and I'll see you in the next video.
Recommended
6:43
|
Up next
005 [Hands-on] Cloud SDK Part - I
Abdullah Manzoor
8/9/2024
5:01
004 Services & Availability Zones
Abdullah Manzoor
7/24/2024
6:04
007 [Hands-on] Cloud SDK Part - III
Abdullah Manzoor
8/9/2024
9:23
006 [Hands-on] Cloud SDK Part - II
Abdullah Manzoor
8/9/2024
10:05
004 [Hands-on] Cloud Shell - 3
Abdullah Manzoor
8/9/2024
11:30
001 [Hands-on] Creating projects
Abdullah Manzoor
8/5/2024
23:44
002 [Hands-on] Assigning users to predefined IAM roles within a project
Abdullah Manzoor
8/5/2024
17:35
003 [Hands-on] Managing users in Cloud Identity (manually and automated)
Abdullah Manzoor
8/5/2024
5:22
002 [Hands-on] Establishing billing budgets and alerts
Abdullah Manzoor
8/5/2024
6:26
003 [Hands-on] Setting up billing exports to estimate dailymonthly charges
Abdullah Manzoor
8/5/2024
9:13
001 [Hands-on] Creating one or more billing accounts & Link projects
Abdullah Manzoor
8/5/2024
8:36
004 [Hands-on] Enabling APIs within projects
Abdullah Manzoor
8/5/2024
11:23
003 [Hands-on] Cloud Shell - 2
Abdullah Manzoor
8/5/2024
16:11
002 [Hands-on] Cloud Shell - 1
Abdullah Manzoor
8/5/2024
3:24
001 Section Introduction
Abdullah Manzoor
8/5/2024
6:12
003 Different GCP Services
Abdullah Manzoor
7/24/2024
8:39
002 [NEW] GCP Region & Zones
Abdullah Manzoor
7/24/2024
5:05
001 [NEW] What is GCP - Google Cloud Computing Platform & Why
Abdullah Manzoor
7/24/2024
1:35
funny video
Abdullah Manzoor
7/23/2024
0:57
tiktok 1
Abdullah Manzoor
7/23/2024
4:02
001 Course Introduction
Abdullah Manzoor
7/10/2024
2:29
005 Create GCP Free Tier Account
Abdullah Manzoor
7/10/2024
13:45
Quran:020 - سورة طه - القارئ: رعد الكردي - Surat Ta-Ha - recitation by: Raad A
Abdullah Manzoor
7/29/2024
39:30
Quran:017 - سورة الإسراء - القارئ: رعد الكردي - Surat Al-Isra - recitatio
Abdullah Manzoor
7/29/2024
0:14
quran-verses-beautiful-quran-recitation-quranrecitation-quranicvers-islam-quran-shorts
Abdullah Manzoor
7/29/2024