GCP Compute Engine Flashcards
Zone
A data center which is inside a region. A region can have multiple zones in order to achieve high availability of the region as well as fault tolerant
Region
GCP has more than 20 regions globally. The purpose of the regions is to support high availability as well as fault tolerant and adhering to the government policy and regulations
Compute Engine
It is one of the GCP services where customers are able to create their own virtual machines and hosted them in a region.
Machine Family
Machine family consists of three types which is
1) General purpose
2) Compute optimized
3) Memory optimized
Machine Types
Giving the specifications of the VM which is the vCPU, memory.
example : E1-standards-2
E1 is machine family
Standards is type of workload suitable for the machine
2 is the number of vCPU
Internal IP
Also called private IP. IP which is not exposed to the internet and only reachable via private network.
Private IP can have same value by different private network
External IP
Known as Public IP as well. It is exposed to the internet. This type of IP is not constant and will be released if the VM is shutdown or reboot.
Static IP
Static IP need to be reserved and once reserved, we can attach it directly to the VM. This static IP can replace the external IP and it will not be release even the VM is shutdown. However, static IP will be continuously charged even though it is not attached to a VM.
Startup script
A startup script is used when a VM is needed to be bootstrapped where all the OS patches and software will be installed when the VM is created.
Instance template
Instance template is another way to create a VM. An instance template can be created from a snapshot, disk, image, and also from a file in Cloud Storage. An instance template can create a VM or a group of VM call instance groups
Image
An image is a copy of a VM OS and configuration. Have two types which is public image and custom image.
It can be used to create another VM and can be shared across different GCP projects.
General purpose instance family
Best for price: performance ratio. Used for dev environments, database, web and application server
Compute optimized instance family
Compute intensive application. Used for gaming application
Memory optimized instance family
For high memory workloads. For in-memory large database and in-memory analytics
Sustained use discount
Discount obtained when VM is used according to the workload level during the billing month. The higher the usage, the bigger the discount
Committed use discount
Discount given by GCP if the VM is used with a dedicated time duration which is between 1 to 3 years time duration. Choose this when the workload is predictable
Preemptible VM
Obtain up until 80% discount however the VM is only available for 24 hours or less. Can be terminated by GCP anytime depending on the available resources. Choose this type of VM when the workload is not important.
Live Migration
VM is set to be automatically migrated to other host when there is hardware maintenance on GCP side to prevent system application down
Availability Policy
There is two choice whether to choose
1) On host maintenance
2) Auto restart
However, VM with GPU can only be terminated. Preemptible VM is not applicable for this choice
Sole Tenancy
We pick a dedicated hardware in the DC just for our resources to allocated on the specific hardware bench
On host maintenance
Two choice:
1) Migration
2) Terminate
For VM with GPU, the VM can only be terminated.
gcloud init
Used to initialize the configuration of the GCP project
gcloud config set
To set the configuration of the project by stating property of the configuration
gcloud config configuration
To manage different configurations for the project