GCP Compute - Demo on Launching an VM Instance

Deep Dive: GCP Compute Services

Google Cloud Platform (GCP) offers a diverse spectrum of compute services, ranging from total infrastructure control to fully automated, "code-only" serverless environments. Choosing the right tool depends on your specific application's needs and the level of management you wish to undertake.

Abstraction Levels

GCP organizes its compute offerings by abstraction level. The lower the abstraction, the more control you have over the underlying hardware and OS.

Service Abstraction Best For
Compute Engine (GCE) IaaS (Low) Virtual Machines (VMs), legacy apps, and full OS control.
GKE Hybrid (Med) Orchestrating containerized microservices at scale.
Cloud Run Serverless (High) Stateless containers with automatic scaling to zero.
App Engine PaaS (High) Web applications and APIs where you don't manage servers.
Cloud Functions FaaS (Highest) Event-driven "glue" code or micro-tasks.

Steps to Launch a VM Instance

Launching a VM can be done via the Google Cloud Console (UI) or the gcloud CLI. Below is the manual process for the Console.

Phase 1: Preparation

  • Create a Project: All GCP resources must belong to a project.
  • Enable Billing: Ensure a valid billing account is linked to the project.
  • Enable the API: Search for "Compute Engine API" in the Library and enable it.

Phase 2: Configuration

  1. Navigate: Open the Console > Compute Engine > VM instances.
  2. Start Creation: Click Create Instance.
  3. Set Basics: Define a Name and select a Region/Zone close to your users.
  4. Machine Configuration: Choose a Machine Family (e.g., E2) and Machine Type (CPU/RAM).
  5. Boot Disk: Click Change to select your OS (Ubuntu, Windows, etc.) and disk type.
  6. Firewall: Check Allow HTTP/HTTPS traffic if hosting a web service.

Phase 3: Launch and Connect

  • Deploy: Click Create. Provisioning usually takes less than a minute.
  • Connect: Click the SSH button to open a terminal in your browser.
CLI Shortcut: Use gcloud compute instances create [NAME] --zone=[ZONE] --image-family=[IMAGE] to launch via terminal.

Compute Engine (GCE)

As Google’s Infrastructure-as-a-Service (IaaS) offering, Compute Engine provides maximum flexibility by allowing you to run Virtual Machines (VMs) on Google's global infrastructure. You have complete control over the operating system, storage, and hardware configurations (including specialized GPUs and TPUs), making it the ideal choice for legacy applications, custom server setups, or any workload that requires deep OS-level access.

Steps to Deploy to Google App Engine

1. Initialization

Install the gcloud CLI and run gcloud init to link your terminal to your Google Cloud Project.

2. Configuration

Ensure your project folder contains an app.yaml file. This file must specify the runtime (e.g., runtime: python39).

3. Execution

gcloud app deploy

Confirm the deployment by typing 'Y'. Google will handle the provisioning and scaling automatically.

4. Verification

Use the command gcloud app browse to view your live web application in the browser.

Google Kubernetes Engine (GKE)

GKE is a managed environment for deploying and orchestrating containerized applications using Kubernetes. It automates operational tasks like cluster scaling, patching, and node management, allowing you to focus on managing your microservices rather than the underlying container infrastructure. In 2026, it has further evolved into an "AI Hypercomputer" platform, specifically optimized for high-performance AI inference and large-scale agentic workloads.

Cloud Run

Cloud Run is a fully managed serverless platform that allows you to run containerized applications that automatically scale from zero to thousands of instances based on incoming traffic. It combines the portability of containers with the simplicity of serverless, ensuring you only pay for the exact resources consumed while your code is executing. It is the go-to service for modern web apps, APIs, and microservices that need to be deployed quickly without manual server configuration.

App Engine (GAE)

App Engine is a Platform-as-a-Service (PaaS) designed for building and hosting web applications in a completely "hands-off" environment. Developers simply upload their code—supporting languages like Python, Java, Node.js, and Go—and Google handles the entire stack, from provisioning servers to managing load balancing and security updates. It is best suited for monolithic web applications and backend services where developer velocity is a higher priority than infrastructure customization.

Cloud Functions

Now often referred to as Cloud Run Functions, this is a Function-as-a-Service (FaaS) offering that allows you to execute small, single-purpose snippets of code in response to specific cloud events. Whether it is a file being uploaded to Cloud Storage, a message appearing in Pub/Sub, or a direct HTTP request, these functions trigger instantly and scale automatically. This makes them perfect for "glue code," real-time data transformation, or lightweight background tasks that don't require a full application server.