Google Cloud Computing Overview
Compute Engine is the Azure Service, that provides VM, that runs in GCP.
When VM runs in GCP, it runs images, that contains Operating systems, Libraries and other code. GCP provides public images based on Windows and Linux. There are other public images provided by open source projects or third party vendors.
Public Images: It includes range of Operating system such as CentOS, Container Optimized OS from Google, Debian, Red Hat Enterprise Linux, SUSE Enterprise Linux Server, Ubuntu, Windows Server.
Custom Images: These images can be created from boot-disk or by starting with another images. These images are useful if you have to configure an operating system and install additional software on each instance VM. Instead of repeatedly configuring and installing software of each instance, you should configure and install once and then create a custom images from the boot disk of the instance.
Custom images must be compatible with GCP. Below are some base operating system that are available to build custom images
Linux Operating System
- CentOS 6
- CentOS 7
- Debian 8
- Debian 9
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Ubuntu 14.04 LTS
- Ubuntu 15.04 LTS
Windows Operating System
- Windows Server 2008 R2
- Windows Server 2012 R2
- Windows Server 2012 R2 Core
- Windows Server 2016
- Windows Server 2016 Core
Inorder to create an VM Instance, Click Compute Engine | VM Instances | Create instances
Now choose an images that you need to create a VM. Once you created a VM, and made any changes you’d like, navigate to compute Engine menu in GCP and select Snapshot. Now While creating a snapshot, you have to specify name of snapshot, description, Source Disk for Snapshot and then click Create.
Below figure describes some example related to how to create a snapshot.
Whenever you create an instance, you must specify the project, so that your instance would be part of that Project.
Once you have VM instance, you must have a Zone Assigned. Zones may or may not comprised of one or more closely coupled Data Center and are located in respective regions.
A Region is a geographical location which contains Zones that are linked by low-latency, High-Bandwidth network connections.
In above figure, while creating Instance, you can see, we have to select the Regions and Zones.
Below are several factors that needs to be considered when choosing where to run your VM:
- Cost must be considered as it can vary between Regions.
- Data Locality Regulations, such as keeping Data
- High Availability, if you are running multiple instance, and if you want to run them in multiple zones and possibility different regions. If one of the zones or regions become inaccessible, instance in other zones and regions can still provide services.
- Latency: You must keep your data and instances, geographically close to application users, Inorder to reduce latency.
In order to create a Compute Machine, user must be part of same project and must have appropriate permissions to perform specific task.
Users can be associated with projects as follows:
- Individual Users
- A google Group
- A G Suit domain
- A Service Account
Once a user or set of users are added to a project, permission can be assigned, by granting roles to user or set of users.
Below are some predefined roles:
- Compute Engine Admin: Users have full control over compute engine instance.
- Compute Engine Network Admin: Users with this role can create, modify, and delete most networking resources, and provides read-only access to firewall rules, SSL Certifications. This role does not give user permission to create or alter instances.
- Compute Engine Security Admin: Users with this role can create, modify and delete SSL Certificate and firewall rules.
- Compute Engine Viewer: Users with this role, can get and list Compute Engine resources but cannot read data from those resources.
Preemptible Virtual Machines
They are short-Lived Compute instances for running certain types of Workloads- for applications that perform financial modeling, rendering, big-data, Web Crawling Operations.
If an application is fault-tolerant and can withstand possible instance interruptions (with a 30 sec warning), then using pre-emptible VM instances can reduce Google Compute Engine costs significantly.
Below are these Characteristics:
- Can be terminated at any time. If they terminate within 10 min of starting, you will not be charged for that time.
- Will be terminated within 24 hrs.
- May not always be available and its availability may very across zones and regions
- Cannot migrate to a regular VM
- Cannot be set to automatically restart.
- Are not covered by any service level agreement (SLA)
Below are some Custom machine types available in GCP.
- Standard Instance
- High-Memory Machines
- High-CPU Machines
- Shared Core Type
- Memory Optimized Machine
Below is some example of Custom Machines.
- N1-standard-1 has 1 vCPU and 3.75 GB of Memory.
- N1-standard-32 has 32 vCPU and 120 GB of Memory
- N1-highmem-32 has 32 vCPU and 208 GB of Memory
- N1-highcpu-32 has 32 vCPU and 28.8 GB of Memory
It is the PaaS Compute Service, which provides a managed platform for running Applications. When using APP engine, Application is main focus and not VM that runs Application. In this Application owner provides some requirements along with code and Google manages the resources requires to run the code.