Skip to player
Skip to main content
Skip to footer
Search
Connect
Watch fullscreen
Like
Comments
Bookmark
Share
Add to Playlist
Report
004 [Hands-on] Cloud Shell - 3
Abdullah Manzoor
Follow
8/9/2024
Category
😹
Fun
Transcript
Display full video transcript
00:00
Hello everyone and welcome back.
00:02
So in this video, we are going to see one very important features related to cloud shell
00:08
and we are going to explore those features as a demo in this video.
00:13
Alright, so what I'm going to do, I am inside my cloud shell, cloud shell is still activated
00:20
and we have created a two bucket.
00:23
Now let's let me just make it a bigger screen because we are not going to deal with this
00:29
web console, mostly we will be dealing with cloud shell and I thought that we should increase
00:36
the font.
00:37
Alright, so if I just do print working directory, it will be in a slash home slash GCP train
00:46
in 2020.
00:47
So currently I am inside this particular directory.
00:51
Now as I told earlier, this cloud shell is a ephemeral virtual machine.
00:57
Now ephemeral is a bit technical word.
00:58
I would say that whenever you restart, nothing will persist.
01:04
That's a very simple language that when you try to restart your machine, whatever you
01:10
write apart from this particular working directory, everything will be lost.
01:17
So what we are going to do, we know currently that inside the home slash GCP train in 2020
01:25
folder, this four file exists.
01:27
So just remember or what I'm going to do, let me make a snapshot.
01:32
So that will be, there will be a snapping tool, yeah, that's good actually.
01:40
So what I'm going to do, I'm just going to select this one, that inside this particular
01:46
directory, and I'm just going to disable or I would say put it into another place.
01:53
And let me go to some other place because this is like a full-fledged virtual machine.
01:58
Let's just go to opt.
02:00
So opt is the operating system level directory exists, where we have a container, Gradle,
02:06
Maven, Microsoft, some folders exist.
02:08
I'm going to create one file here.
02:11
So let me just create, let's say, we will create with this nano-editor some hello.txt
02:21
file.
02:22
Let me press hello, hello123, I'm just going to write it, Ctrl-X and just save it.
02:30
Yes, it is not able to save it, so I just have to come out because this is the operating
02:37
system level directory, so I have to use like a shadow.
02:41
As a root user, hello123, so very simple file, a text file we have created.
02:48
And if you just do ls, you can see one file got created, hello.txt.
02:53
So just remember that inside the opt, we have a hello.txt file exists.
03:00
And inside this home gcp training, here also I can take a snapshot.
03:08
So what I will do, let me open the word, word.
03:15
And inside the word, you can put many snapshots.
03:20
So there will be one snapshot which we have created.
03:24
So let me just copy it and put it here.
03:27
So you can see what I did.
03:29
And let me create one more snapshot.
03:34
Let me put it into another screen.
03:36
I have multiple screens that are available, so just don't get confused where I am just
03:40
lifting my, yeah.
03:42
So from here, I'll just take this one.
03:45
So before opt, we created this hello.txt, there is no file exists.
03:51
But after that, we created one hello.txt file.
03:55
And the same thing, I'm just going to put it.
03:58
Alright, so let me just minimize everything, not required now.
04:04
Next thing what I'm going to do, I'm going to restart this virtual or I won't say completely
04:09
virtual machine.
04:10
This is like a virtual machine only, but this is the cloud shell.
04:15
So I can do the restart like this or I can just simply go to this three dot and there
04:21
will be restart.
04:22
Let me restart it.
04:24
Now after that, once the machine got restarted, we'll go to both of this location and we will
04:30
see what are the files still persist and what are the files not persist.
04:38
Cloud shell is still provisioning because it is just restarting the complete machine.
04:48
Still going on.
04:51
I think it's a bit taking too much time.
04:53
So what I'm going to do, let me restart it again or let me crash also, don't worry about
04:59
it.
05:00
Let's just wait.
05:01
Yeah, so we are inside the cloud shell.
05:05
You can see earlier we had a little more real estate and by default this project got selected.
05:11
But currently again we have to do this ps1 is equal to $. Yes.
05:18
So we got complete bigger real estate.
05:21
Now what I'm going to do, what is my current working date?
05:23
This one.
05:24
If I just do ls, still all those files completely persist.
05:28
You can have a comparison, exactly same thing, exactly same thing.
05:33
So, no file, no folder got lost from this particular location because that is my current
05:39
working home directory.
05:42
Now next thing what we'll do, we'll go to this opt.
05:47
And if I just try to do ls, now compared to earlier, you will be able to see we created
05:53
this hello.txt, but now this hello.txt doesn't exist.
05:58
That means that this is like an ephemeral virtual machine.
06:01
Everything will persist only at one place in your current home working directory where
06:08
everything will persist.
06:10
So if you are, let's say, at some other location and if you want to go to current working directory,
06:16
you can just simply use cd tilde and you can see we are inside our home directory.
06:24
So that is the beautiful thing I want to show you.
06:27
That this is the ephemeral virtual machine, your data will not persist apart from your
06:32
home directory.
06:33
Now, suppose if you want to install something, in that case, and you want to persist it for
06:40
a couple of weeks, you can always do it inside your home directory rather than your op or
06:48
any other.
06:49
So, let's say, we will just go back and let's see what are the file exists.
06:57
Let me just clear the screen and where we are.
07:01
Yes, we are inside the home.
07:03
Let me go one step back.
07:05
Yes.
07:06
So these are the files which do not persist apart from this home and your username.
07:13
So currently your username, you can just search from here, uname linux.
07:17
So whenever you want to install anything, put it inside the home folder and you want
07:21
to persist it for a few weeks, you can always be able to get it from that location.
07:28
Now, persisting means, earlier we have seen in the cloud shell documentation, they are
07:33
providing 5 GB of persistent disk storage.
07:36
So, up to 5 GB, you can always persist your data completely free of cost, 50 hours a week
07:43
in this Google Cloud Platform.
07:45
But where is this 50 or 5 GB?
07:48
So, you can use the command like lsblk and you will be able to see, there will be a 5
07:57
GB of storage inside this home folder they have given to us, 5g sdb1 inside the sdb.
08:06
So, that means, this is like a 5 GB persistent storage apart from every single thing attached
08:12
with our cloud shell virtual machines is ephemeral in nature that won't persist once
08:18
your session got over or you restart your machine.
08:23
Few more things about the Google Cloud Shell, let's say, how much memory and RAM they have
08:31
given to us.
08:32
So, if I just do free-m or I can do free-g, oops, it has to be double minus, or let me
08:43
just clear the screen and let me fire the command again, free, yes, so we have a total
08:50
16 GB of RAM they have provided with this particular machine.
08:55
If you want to know about the CPU information, you can use like a lscpu and you will be able
09:01
to see there will be a one, yeah, one core only, yeah, four core, four core machine they
09:07
have provided.
09:08
So, very high-end machine they have provided with this cloud shell.
09:11
Alright, so these are the sufficient things to get started with your cloud shell environment.
09:18
And mostly throughout this whole course, we are going to use this cloud shell environment
09:24
to provision your resources and from the web console for the learning purpose.
09:28
Alright, so that is all about the cloud shell.
09:31
The next one will be a cloud SDK, but that will be from the local machine.
09:36
So, somehow if Google Cloud web console application is down, you can always use your local machine
09:43
to provision your resource.
09:44
So, in the next video, we will see about those cloud shells specifically on a Windows machine.
09:49
I'll show you how to install it and how to authenticate with your cloud shell environment,
09:56
resources to provision different resources directly from your local machine.
10:01
Alright, 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
9:23
006 [Hands-on] Cloud SDK Part - II
Abdullah Manzoor
8/9/2024
6:43
005 [Hands-on] Cloud SDK Part - I
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