This content explains four key Compute Engine features in Google Cloud Platform: Custom Machine Types, Spot VMs, Snapshots, and Machine Images, highlighting their benefits for cost optimization, flexibility, and disaster recovery.
Mind Map
클릭해서 펼치기
클릭해서 인터랙티브 마인드맵 전체 보기
[Music]
hello hi everyone Welcome to Cloud
Sprint hope you are doing good today as
we are progressing in the course of the
CPS I thought there are few topics which
are really important by working on cloud
as well as for the exam also you might
expect two to three questions from this
video in your exam or picks which we are
gonna cover are custom machines
permittable VMS
images and snapshots these four topics
are very important while you work with
compute and while you Design Systems in
your respective job or career so let's start
start [Music]
while so you have two options while
creating a compute instance number one
are standard configuration machines and
second is custom machine types custom
machines are basically where you can
choose how much CPU versus how much
memory you want you need and any need is
not being fulfilled by the standard
machines we go ahead with custom
machines and then we choose the CPU and
memory the benefit of this is mostly
around cost you don't invest resources
suppose you need 20 GB of memory you
will choose 20 GB of memory you won't
you are not gonna use 480 GB of memory
custom machines from via API as well
that's very very simple command when we
do gcloud commands I'll showcase this
apart from that it all it supports
almost all the OS okay you can create
you can programmatically access and
assign how much custom memory or custom
CPU won't give and you can create it on
the Fly well let's check it at the lab
okay let's let's check it now you
already know how to create VMS I'm just
gonna show you how to make custom
machine and uh there is machine family
for different different purpose then
there's series and then there's machine
type when you select the series comes
with standard predefined resources okay
like N1 into standard 2 into standard
High meme
into N2 M2 these kind of options you
have okay suppose if I choose this I
have 96 GB of CPU 96 GB of memory if I
choose this then I have 4GB of CPU and
16 GB of memory I cannot change this but
suppose this is a requirement you are
running a memory hungry process you need
less CPU but much much more memory than
offered what you'll do the one solution
could be use a higher configuration this
higher configuration will give you more
CPU more memory but you'll waste the resources
resources
as a cloud engineer you should make sure
that you're optimizing the cost you're
saving the money while creating
resources to solve this problem gcp
gives us an option of creating custom machines
machines
okay here you can adjust with N2 series
custom machine you can have
up to 80 vcpus and up to 650 GB machines
the more memory you want to increase
you can save the price changing
okay you can see the more CPU you are
shifting this number is increasing okay
to compensate that so suppose you need
as I mentioned you need less CPUs and
more memory so what you can do you can
keep your vcpu to 36 and increase the
memory to 288 GB okay this is where how
you are saving money on CPU and you are
utilizing the memory of the VM to the
maximum extent and you are saving on
money as well if you would have gone
with a default default value you can see
this 1400 will become
2200 right so straight away lot of
saving for monthly if you calculate this
money yearly it will be lot of money and
these processes you'll be running day in
and day out so you can see the
difference why custom machines are very
very powerful rest of the process
remains same so you can just go ahead
click create this will create a VM I'm
not creating because that's not
important you already know how to create
it we create a VM just note one thing
this custom option is not available with
these options like if you go to compute
optimized there's no custom option
memory optimized no custom options this
custom option is only available with
general purpose machine and not all of
them but with E2 N1 N2 n2d these series
have custom machines options so you
should always know that how much load
you're gonna take and that's how you
configure your machine to save your cost
that's all about custom machines [Music]
the second topic is spot VMS or
permittable VMS primitable VMS are
highly affordable compute instance
suitable for for bad jobs or fault
tolerant workloads so what happens Cloud
providers have a lot of VMS lying ideal
they offer those machines at a cheap
price so you can use it but whenever
they need them the cloud providers
whenever they need them they can take it
away if you're running a bad job where
time boundation is not a limit okay
where you you can survive if some node
is extracted from that cluster if your
job can survive that then this is one of
the best way to use discounted rates of
VM to save lot of money with your
compute cost if you see spot VMS are 91
percent cheaper than regular instances
not always but this is mostly it's very
very cheap but Cloud providers just want
to utilize the ideal resources right if
they can make money even 20 it's better
than zero percent right it so they offer
you that thing and if you are running a
20 node cluster you can have four or
eight nodes out of 20 those are spot VMS
and then A14 are standard VMS okay even
if those 8 goes away your job can still
survive but still you have to reduce the
cost of your overall compute right how
to enable that let's check it to
understand limitable VMS we'll again go
back to VM machines
click on create instance over here
directly you will go to Advanced options
inside Advanced options does management
you come down to availability policies
you can see the default price
by default the standard option is
selected this other option called spot
okay once you have clicked standard
which is by default your cost of your
machine is 25 dollars per month the
moment you select spot price comes down
to eight dollars right you can see it's
Dirt Cheap same VM you're getting at the
70 of the discount 60 no discounts
depending how much discount Google is
offerings the difference is standard is
ideal for most workloads spot instances
are discounted instances which are
underlying on the racks of gcp and it's
sitting idle so gcp rents it at the
lower price discounted rates so you can
utilize the benefit of being on cloud
right that's the major benefit what gcp
has gcp gets some money for underlying
resources which is any anyhow free so
you can run your fault tolerant
workloads or some non-critical workloads
at a very discounted rate spot helps you
now what is the problem with spot the
problem with spot is the CP have given
you the cheaper machines to run as a
spot instances but if gcp needs those
machines back they will take it back
okay that's the only issue this machine
has when we read make we will understand
that how we can mix standard and spot
and then get the sweet spot right and
then save cost yet run jobs without any
hindrance once you have selected spot
after selecting spot you you just need
to choose that what you want to do on
termination you want to stop the VM or
you delete the VM so both are possible
okay any any case memory is not memory
is not preserved that's all about spot
select once you hit create it will
create a VM with spot instance okay we
add the discounted rate that's all about
before you start reading snapshots it's
very important to understand the storage
you already have studied about cloud
storage buckets what are rest of them so
rest of them are also your disk which
are attached to your compute zonal
persistent disk so persistent disk are
something which are not part of the OS
while you're creating it you can attach
it to any VM okay you can take backup
you can de-attach and then again attach
to another VM that's the flexibility it
gives and this can survive your VM
restarts as well
that is the point of using persistent
disks but here you have options of
Journal zonal persistent disk which are
very efficient reliable block storage
then you have Regional persistent disk
okay this is regional block storage
replicated in two zones so this is like
more reliable the first ones one was
only the first one was only on the zonal
side the third one is local SSD when you
have to design some read write solution
local SSD will give you the best
performance okay that's the highest
performance uh disk option you have
cloud storage is basically object
storage I have already done a lot of
videos on that you can go back and check
that out file store is high performance
file storage for Google Cloud users okay
okay you can go back and check when to
use what what are the benefits of using
what and these are all these are all the
options yeah you can just uh choose it
SSD so local SSD have the the higher
throughput and lower lower latency than
standard persistent disk or SSD
persistent disk okay the data that you
store on a local SD persist only the
instance it stopped or deleted right
that's the risk of using SSD that's my
use persistent disk but then when you
have when you need to design a solution
which have higher throughput and lower
latency then you go with local SSD and
perform your all the read operations on
that SSD because that will give you the
fastest outcome
that's all about disks now let's go back
to snapshots okay snapshots are
basically incremental backup of your
data which you are storing in persistent
disks it is just backing up your disks
after you create a snapshot to capture
the current state of the disk you can
use it to restore your data to a new
disk so you suppose you are saving some
sort of data which you want to post it
which you want to take backup and attach
to other VM in some other environment
snapshots will come as a savior right
find create a snapshot and then attach
it to it attach the disk to that VM you
can create snapshots from disks even
while they are attached to running VM
instances this is important you don't
have to stop the VM you can also
schedule it
you can also schedule that after every
end of the day or after every one hour
create a backup of the disk this will
help you survive survive any Clash of
your VMS as well if you have a snapshot
disk you can quickly create a VM using
that disk so your data persists this
this mostly works like a Version Control
System where only contains the changes
from the last version not entire full
snap snapshot so it helps you can also
delete your snapshot once your work is
done or you can schedule the deletion in
a nutshell snapshots are basically to
take incremental backup of your
persistent disks and how do you do it
that in real world let's go at labs and
check it out okay over here
to give you an example I have already
created a VM okay and it has a disk
attached for this what I'm going to do
to take a snapshot first of all I'll go
to snapshot when I go to snapshot I'll
click on create snapshot the name I
given is Snapshot backup lab Source disk
app issues okay this is the name of the
VM which the the disk and the VM which
we created
now I have two type of options to create
this snapshot first is Snapshot it is
mainly good for long term backup and
disaster recovery and second one is
archive snapshot which is best for cost
efficient data retention but in this
example I'm just going to use Snapshot
but you can also select archive snapshot
for retaining your data the next one is
the location okay if you
want to keep it reasonable okay if you
keep it reasonable you can just use this
disc in one location if you keep it
multi-regional you can move it across
U.S across Asia across Europe
okay of course you'll have to pay for
this but you can save your disk in a
multi-reasonal location and share it
with all the zones within us if you do
it you Europe across Europe
okay data transfer cost will be there
but that's the benefit okay I said okay
do it across Europe the things I
selected first is the name the source
disk snapshot multi-reasonal click on create
create
you can see successfully created
snapshot snapshot backup lab now now
this is this is the backup we have now
how one should use it okay now suppose I
have a backup from of the disk which is
attached to a running VM I want to
create another VM using it so how can
you use it first of all let's open this
here either you can create an instance
or you can create a disk so we'll create
a disk we create a disk saying okay this
is disk one
Cloud Sprint Cloud Sprint we want to
keep it in single zone yes fine you just
let it be save your central disk Source
type whether it's image snapshots will
say it's a snapshot the name of the
snapshot is Snapshot backup lab which we
just created right now which Disk type
you have size Let It Be default create a
disk now
you can see that disk Cloud spread one
which we are which we have
created is being created let's set
okay so from snapshot backup lab snapshot
snapshot
we have created a disc called Cloud
Sprint the scone Cloud Sprint okay you
can see the source is Snapshot backup
lab which which is a snapshot basically
okay now let's go ahead and create a VM
using this disk which
for doing that you'll come to disk
attach existing disk
in here you will see that option okay so
disk One Cloud Sprint you'll see read
write keep disk safe
so you're given a name called snapshot
disk to VM snapshot to disk test VM N1 series
series
and uh and in the advanced section we
choose an existing disk the disk which
we just created from the snapshot which
we had taken right you'll click on create
create
yes you can see snapshot to disk disk to
VM VM is also created so technically so
these two VMS have the same image so
what we did we created a VM from VMware
took a snapshot from snapshot we created
a disk and we created again an instance
and that attached that disk to this VM
that the full life cycle we have done
and that this is how you can take
snapshots delete it you can also
schedule a snapshot you can click here
create schedule snapshot and as I
mentioned you can choose you want to
keep it multi-regional or reasonable you
can have a schedule daily weekly hourly and
and
you can also choose when to Auto delete
snapshots you can configure this date
and you can create a schedule
this will everyday take backup as per
your schedule it will take snapshots and
save it here and then this can be used
to create disks and VMS as per the need
that's all about snapshots [Music]
the last topic of this video is machine
image machine images a compute engine
resource that stores all configuration
metadata permission and data from
multiple disks of a VM you can use a
machine image in many system maintenance
backup recovery instance loading closing
scenarios so machine image when you
create a machine image it will save all
configuration metadata permission data
and multiple disks of that particular
virtual machine and you can create that
anywhere else if you have a machine
image available you can quickly create a
VM in few clicks okay if if your system
gets crashed you can use the machine
image and create that VM replace that VM
if you want to move that VM from Dev
environment to prod environment you can
do that as well right let's see with one
of the example how we can do that I'm
creating a VM machine image with the
name machine image Cloud Sprint
so the VM is created now let's go to
machine image
when you go to machine image you can
create a click on create a machine image
okay I've given a name Cloud Sprint Dash
VM backup you can write a description
source so there's just one VM which is
running just tweet which we just created
which is machine image Cloud spread very
important same concept as snapshot you
want to keep it reasonable or you want
to use across reason
if you do it multi-reasonable you can
create it for multi reason I'm done
choosing the location
once I'm done choosing the location I'll
click on hit create
it it will create a machine image from
that VM for me now you can see Cloud
Sprint VM backup machine images created
this particular backup has everything it
has VM property metadata permission and
data from all its attached disks this
can be today used to create an instance directly
directly
either you can create it from here or
you can go to the first page where you
create a VM click on VM instances you'll
click on create instance and in here
instead of choosing new VM what you'll
do you'll click on new VM instance from
machine image
and you'll see this which the backup
which we just created over here Cloud
Sprint VM backup right and we click on
continue once you click on continue so
once you choose that you can still
change the name the reason the series
you can just customize it and then hit create
create
yes so this VM is created now from that
machine image which we created from this
VM okay from a VM you can create a
machine image and from using that
machine image you can create a VM this
can be used for multiple purpose
promoting your promoting your VMS from
one environment to other environment
taking backups uh you while planning
your Dr thing this is very very uh
useful okay that's all I had to cover
for the exam for machine images
okay thank you very much for watching
this video if you're liking the videos
subscribe to the channel and see you in
the next one bye [Music]
텍스트나 타임스탬프를 클릭하면 동영상의 해당 장면으로 바로 이동합니다
공유:
대부분의 자막은 5초 이내에 준비됩니다
원클릭 복사125개 이상의 언어내용 검색타임스탬프로 이동
YouTube URL 붙여넣기
YouTube 동영상 링크를 입력하면 전체 자막을 가져옵니다
자막 추출 양식
대부분의 자막은 5초 이내에 준비됩니다
Chrome 확장 프로그램 설치
YouTube를 떠나지 않고 자막을 즉시 가져오세요. Chrome 확장 프로그램을 설치하면 동영상 시청 페이지에서 바로 자막에 원클릭으로 접근할 수 있습니다.