Compute Engine offers managed virtual machine. You can
configured high CPU, high memory and standard and shared core machine type like
building out a physical servers.
Also you can set persistence disk likes Standard, SSD, local
SSD and also create Snapshots (global image).
We can resized the disks without downtime.
You can create a virtual machine instance by using the
Google Cloud Platform Console or the gcloud command-line tool. A Compute Engine
instance can run Linux and Windows Server images provided by Google or any
customized versions of these images. You can also build and run images of other
operating systems.
Scale up or scale out
with Compute Engine:
You can make very large
VMs in Compute Engine. The maximum number of virtual CPUs in a VM was 96, and
the maximum memory size was at 624
These huge VMs are great for workloads like in-memory
databases and CPU-intensive analytics. But most GCP customers start off with
scaling out, not up. Compute Engine has a feature called auto scaling that lets
you add and take away VMs from your application based on load metrics. The
other part of making that work is balancing the incoming traffic among the VMs
Best practice is use small
multiple VMs instead of single big VM unless it’s needed.
Script to Create VM:
resources:
- name: the-first-vm
type: compute.v1.instance
properties:
zone: us-central1-f
machineType: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/f1-micro
disks:
- deviceName: boot
type: PERSISTENT
boot: true
autoDelete: true
initializeParams:
sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9
networkInterfaces:
- network: https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default
accessConfigs:
- name: External NAT
type: ONE_TO_ONE_NAT
- name: the-first-vm
type: compute.v1.instance
properties:
zone: us-central1-f
machineType: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/f1-micro
disks:
- deviceName: boot
type: PERSISTENT
boot: true
autoDelete: true
initializeParams:
sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9
networkInterfaces:
- network: https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default
accessConfigs:
- name: External NAT
type: ONE_TO_ONE_NAT
Comments
Post a Comment