Skip to player
Skip to main content
Skip to footer
Search
Connect
Watch fullscreen
Like
Comments
Bookmark
Share
Add to Playlist
Report
006 [Hands-on] Cloud SDK Part - II
Abdullah Manzoor
Follow
8/9/2024
Category
😹
Fun
Transcript
Display full video transcript
00:00
All right, everyone, so the next thing, let's just get continue and get ourselves familiar
00:10
with the Google Cloud SDK.
00:13
So I'm going to go to my command line prompt and let me just make fonts little bigger.
00:22
It will be at 28, oops, is not applicable, yes, now it's bigger and clearly visible.
00:34
So first thing is our Google Cloud SDK knows that through which account and we are going
00:42
to interact with the different services.
00:44
So we have already one account which is active state of Google Cloud Platform account.
00:52
So the first command which we are going to fire is AuthList.
00:58
So that will be a Gcloud AuthList.
01:01
And you can see there is no credential with this Google Cloud SDK has been attached.
01:08
So they are saying one suggestion that to log in, you can just simply use Google AuthLogin.
01:15
Now how this commands and utility will come.
01:17
So let me just give you a little brief idea that when you type gcloud-help, you will be
01:25
able to see that what are the options are available.
01:29
These are the options.
01:31
I guess you can just simply type Gcloud and there will be available command groups for
01:38
the Gcloud.
01:40
Now here there will be one like Auth.
01:44
You will be able to see Auth, yes, this is like Auth.
01:50
So all those authentication related API can be called Gcloud Auth.
01:55
Now after Auth, what you need to write, let's say you don't know.
01:59
So you can just simply type Gcloud Auth and it will give you another list of suggestions
02:06
that what are the other options you can put it.
02:10
Like Activate Service Account, Configure Docker, List, Login.
02:14
So one of the commands which we use Auth List.
02:18
But there is no credential associated.
02:20
So we are going to continue with first of all, authenticate our Google Cloud SDK with
02:27
our GCP account.
02:29
So that will be a Google Auth List instead of now Google Auth Login.
02:36
Let me press Enter and it will open inside my browser.
02:41
Suppose if it doesn't open inside the browser, you can just simply select this particular
02:46
URL, copy it manually and paste it inside the browser.
02:51
From here you can authenticate with different users.
02:55
Currently this gcptrainin2020 at gmail.com is my current active account on a Google Cloud.
03:05
So they are asking some kind of permission that Google Cloud SDK wants to access your
03:10
Google account, this one.
03:13
And we are going to allow it.
03:15
The moment you allow and authentication is successful, you will be redirected to you
03:21
are now authenticated with Google Cloud SDK.
03:25
If you just go, let me just minimize it and if you just press Enter, you will be able
03:33
to see that you are now logged in as this particular user.
03:37
Your current project is this.
03:39
So this is the default project it has taken and you can change the setting by this command
03:45
if you want to change the project setting.
03:47
Now few more commands or before that, let me run the same command like gcloud auth list
03:58
and you can see now earlier we don't have any credentials are associated.
04:03
Now we have one active account gcptrainin2020 at gmail.com.
04:08
If you want to change this account or revoke some access, exactly same thing you can do
04:13
it gcloud auth and we have one options are available like a revoke.
04:20
So it will revoke all those authenticated account.
04:24
If you want to list earlier also we have seen.
04:26
So all those account got authenticated and which one is active.
04:31
So based on star, you will be able to see which one is the active account.
04:35
Let's say if you want to authenticate one more account.
04:39
So auth login and I have one more account.
04:45
So let's say my own email id.
04:49
Alright and let me just allow it.
04:53
So currently with this another email id also I am authenticated to use everything from
04:59
Google Cloud SDK.
05:02
So now you are logged in as this another gmail id.
05:06
If you just type now gcloud auth list, so you will be able to see now my current active
05:13
account is this one.
05:15
But to set another active account, you can use this command gcloud config set.
05:21
So you can see Google Cloud SDK is smart enough that based on the kind of command you fire,
05:27
it will give you a suggestion that what other things you should do.
05:31
So what I'm gonna do gcloud config set account.
05:35
Let me paste it and along with that I'm gonna select this particular email id.
05:43
Yes, property got updated.
05:48
If you just try to do it again, gcloud auth list compared to our earlier case, we have
05:54
now gcptraining2020 at gmail.com has to be our active account, but there is no star listed.
06:04
Why such a thing happens?
06:05
So what we can do, we can again do auth login and we can authenticate our gcptraining2020
06:14
allow and successfully authenticated.
06:19
So let me just minimize it.
06:20
And now if you do auth list, you will be able to see now my current active account
06:26
is gcptraining2020 at gmail.com.
06:29
And if you want to revoke all those access, just simply type revoke-all.
06:36
Something like that.
06:37
So all those accounts will be kind of sign out from here.
06:42
So this is one of the very important utility gcloud auth that how you are going to authenticate
06:49
your cloud SDK with your GCP resources.
06:53
Alright.
06:54
So that is about the gcloud auth.
06:57
There will be few more things like a gcloud config.
07:02
So all those default configuration parameter has been set inside this config.
07:07
I'm not putting any more option apart from gcloud config.
07:13
So it will give me suggestion that what you can do.
07:15
You can set some key value pair.
07:17
You can unset something.
07:19
So let's just list that as of now, what are the parameter has been set.
07:25
So you can see the important one will be account.
07:28
So account is currently set to gcptraining2020 at gmail.com.
07:33
And along with that, I have projects like project centralmuse300814.
07:39
That is nothing but my first project.
07:42
Let me just go back again and I want to show you, let's say console that how that numbers
07:51
or project ID came.
07:55
So if you just logged in into your web console of Google Cloud Platform in your my first
08:03
project, that is just the name, but we have ID like centralmuse300815 and Google has automatically
08:09
created those things for us.
08:11
And that is nothing but this one.
08:14
Now suppose if you want to set some property, now currently there is one two more property
08:18
also got set, which I haven't discussed, a region and a zone.
08:22
So whenever you provision anything, if you do not provide those zones and region by default,
08:28
this SDK will take care from here, this config list.
08:32
Later on, we'll see how you can even unset some of the properties also, and you can again
08:37
set it also.
08:38
So whenever we require, there are lots of options are possible.
08:42
So wherever when we try to provision more and more resources, wherever we require, we
08:46
try to use those commands.
08:48
Now exactly the same sets of commands will work from your cloud shell.
08:53
Also currently we are hacking all those commands directly from our local machine.
08:59
Let me just type gsutil.
09:01
Alright, so gsutil also installed.
09:05
So what we will do, creating bucket and uploading one file to those particular bucket, we will
09:12
see in the next video.
09:14
But now not from a cloud shell, we are going to use cloud SDK from our local machine of
09:19
Windows.
09:21
See you in the next video.
Recommended
9:19
|
Up next
009 GCloud command for Module - 1
Abdullah Manzoor
8/9/2024
6:04
007 [Hands-on] Cloud SDK Part - III
Abdullah Manzoor
8/9/2024
6:43
005 [Hands-on] Cloud SDK Part - I
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
5:01
004 Services & Availability Zones
Abdullah Manzoor
7/24/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