0% found this document useful (0 votes)
20 views1 page

GCP_Compute_Engine_Tutorial

Google Cloud Compute Engine (GCE) is an IaaS platform for creating and managing virtual machines. Key concepts include VM instances, machine types, and persistent disks, with various methods for creating VMs such as the console, gcloud CLI, and Terraform. Pricing options include sustained use discounts and preemptible VMs, while best practices involve using labels, snapshots, and managed instance groups for efficient management and scaling.

Uploaded by

sumit Chauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

GCP_Compute_Engine_Tutorial

Google Cloud Compute Engine (GCE) is an IaaS platform for creating and managing virtual machines. Key concepts include VM instances, machine types, and persistent disks, with various methods for creating VMs such as the console, gcloud CLI, and Terraform. Pricing options include sustained use discounts and preemptible VMs, while best practices involve using labels, snapshots, and managed instance groups for efficient management and scaling.

Uploaded by

sumit Chauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Google Cloud Compute Engine - Full Tutorial

Google Compute Engine - Full Tutorial

Google Cloud Compute Engine (GCE) is Google's IaaS platform that allows users to create and manage virtual
machines.

Core Concepts:
- VM Instance: Virtual machine in GCP
- Machine Type: Defines the CPU and memory
- Boot Disk: Disk to boot the VM
- Image: OS and configuration used to launch VMs
- Persistent Disk: Additional storage attached to VM
- Startup Script: Script that runs at VM boot
- Preemptible VMs: Low-cost, short-lived VMs

Creating VMs:
1. Console: Navigate to Compute Engine > VM instances and create a VM.
2. gcloud CLI:
gcloud compute instances create my-vm --zone=us-central1-a --machine-type=e2-medium --image-family=debian-11
--image-project=debian-cloud
3. Terraform: Use resource "google_compute_instance" to define infrastructure.

Networking:
- Use tags (http-server) and firewall rules to allow access.
- gcloud compute firewall-rules create allow-http --allow tcp:80 --target-tags=http-server

Pricing:
- Sustained Use Discounts: For VMs used long-term
- Preemptible VMs: Cheaper, max 24 hours
- Committed Use Discounts: Discounts for 1-3 year commitment

Useful gcloud Commands:


- gcloud compute instances list
- gcloud compute ssh my-vm
- gcloud compute instances stop/start/delete my-vm

Best Practices:
- Use labels and metadata
- Use snapshots and images for backups
- Use Managed Instance Groups for scaling

Exam Tip:
Know how to create/manage VMs, allow traffic via firewall, and use startup scripts and snapshots.

Page 1

You might also like