Enquire Now
Cloud

GCP - VM Compute Engine - Configuration Steps 

Part II | Part I

Google Cloud's Compute Engine provides scalable and customizable Virtual Machines (VMs) for running a wide range of workloads in the cloud. Users can create VMs with tailored configurations for CPU, memory, and storage, choosing from predefined machine types or custom setups. Compute Engine supports various operating systems and offers features like live migration, automatic scaling, and global load balancing to ensure high availability and performance. Integrated with other GCP services, it provides a secure, reliable, and cost-effective solution for applications, development, and data processing.

Step 1: Sign in to Google Cloud Console. Go to the Google Cloud Console.  Sign in with your Google account or GCP project credentials.

Ensure you have a project created or select an existing project where the VM will be deployed.

Step 2: Navigate to Compute Engine In the left-hand navigation menu, click on Compute Engine. Select VM instances from the drop-down or main dashboard.

Step 3: Create a New VM Instance

  • Click the Create Instance button to start configuring your VM

Machine Configuration

Defines the compute resources for the VM, including machine series (E2, N1, N2, etc.), vCPU & memory, and region & zone selection. In this case, the configuration is e2-medium (2 vCPUs, 4GB RAM) in us-central1, optimized for general-purpose workloads with balanced performance and cost.

e2-medium (us-central1) - GCP

The e2-medium machine type in us-central1 offers 2 vCPUs and 4GB RAM, optimized for cost-effective general-purpose workloads. E2 instances provide automatic CPU bursting, efficient resource utilization, and are ideal for web applications, small databases, and development environments. The us-central1 region ensures low latency and high availability in North America.

OS and Storage - GCP

Specifies the operating system and disk configuration for the VM. In this case, the VM runs Debian GNU/Linux 12 (Bookworm), a stable and secure Linux distribution. The boot disk is typically a persistent disk, with customizable size and performance options. Additional storage, such as local SSDs or attached persistent disks, can be configured based on workload requirements.

Networking Configuration - GCP VM

The Networking section in GCP VM Compute Engine allows users to configure network settings for connectivity, security, and performance. Key options include:

  • Network Interface: Defines the Virtual Private Cloud (VPC) network and subnet for the VM.
  • External IP Address: Assigns an ephemeral (dynamic) or static public IP for internet access.
  • Private Google Access: Enables VMs without public IPs to access Google services securely.
  • Firewall Rules: Controls incoming and outgoing traffic by allowing or restricting specific protocols (e.g., HTTP, HTTPS, SSH).
  • Network Tags: Used to apply firewall rules and routes to specific instances.

Observability Configuration in GCP

In GCP, Observability refers to the tools and settings available for monitoring and logging the performance and health of virtual machines (VMs) and applications. The key components include:

  • Cloud Monitoring: Collects metrics such as CPU usage, memory usage, and disk I/O. It provides dashboards, alerts, and analysis to ensure optimal performance.
  • Cloud Logging: Captures and stores logs from VMs, applications, and Google Cloud services, making it easier to troubleshoot and audit events.
  • Stackdriver Integration: Offers detailed visualizations and insights into system behavior, enabling proactive issue detection and resolution.

Security Configuration in GCP VM

Security configurations in Google Cloud Platform (GCP) ensure that your virtual machines (VMs) are protected from unauthorized access and vulnerabilities. Key security options include:

  • Shielded VMs: Provides protection against rootkit and boot-level attacks by ensuring that the VM’s boot process is secure with features like secure boot and virtual Trusted Platform Module (vTPM).
  • OS Login: Manages SSH access using IAM roles rather than static SSH keys, making user access more secure and easier to control.
  • VPC Firewall Rules: Allows users to control inbound and outbound traffic to the VM, defining specific rules for network access.
  • Identity and Access Management (IAM): Provides granular access control, allowing only authorized users and services to interact with the VM based on the principle of least privilege.

Advanced Configuration in GCP VM

Advanced Configuration in Google Cloud Platform (GCP) provides additional options to tailor the virtual machine (VM) to specific needs:

  • Preemptible VMs: Cost-efficient, short-lived VMs that are automatically terminated when Google Cloud requires resources, suitable for batch processing or fault-tolerant workloads.
  • Startup Scripts: Custom scripts that run when the VM instance starts, allowing for automated configuration and software installation.
  • Shielded VMs: Provides enhanced security with secure boot, integrity monitoring, and protection against rootkits and boot-level attacks.
  • Confidential VMs: Protects data in memory using encryption during processing, ideal for sensitive workloads requiring high levels of security.
  • Sole-Tenant Nodes: Assigns VMs to dedicated physical servers for greater isolation and compliance, ensuring resources are not shared with other tenants.

Uses of Google Cloud Compute Engine (VM)

  • Hosting Websites & Web Applications
    Deploy scalable web servers or complex applications with customized configurations.
  • Running Business Applications
    Host enterprise applications like ERP, CRM, and databases with tailored compute resources.
  • Development & Testing Environments
    Set up isolated environments for software development, testing, and staging before production.
  • Big Data Processing
    Leverage high-performance VMs to process large datasets, run analytics, or perform data modeling.
  • Machine Learning & AI Workloads
    Run AI/ML models, training jobs, and inference tasks on powerful GPU/TPU-equipped VMs.
  • Batch Processing & Automation
    Use preemptible VMs for cost-efficient batch processing or automated jobs that don’t require persistent availability.
  • Backup & Disaster Recovery
    Create VM instances for backup solutions or as part of a disaster recovery plan.
  • Virtual Desktops
    Run virtual desktop infrastructure (VDI) for remote teams, ensuring secure and scalable access to resources.
  • CI/CD Pipeline Automation
    Set up Continuous Integration/Continuous Deployment pipelines to automate testing and deployment.
  • High-Performance Computing (HPC)
    Run simulations, scientific computations, or other resource-intensive tasks with high-spec VM instances.
  • Secure & Isolated Environments
    Use Shielded VMs and Confidential VMs to handle sensitive workloads that require high security.
  • Gaming Servers
    Deploy game servers with customizable resources for multiplayer online games or cloud-based gaming platforms.
  • IoT Data Collection & Processing
    Process and analyze data from IoT devices using scalable compute resources.
  • Cost-Effective Short-Term Jobs
    Use Preemptible VMs for short-lived, cost-efficient workloads, such as transient computing tasks.
  • Private Cloud Infrastructure
    Set up a private cloud with dedicated resources, using Sole-Tenant Nodes for exclusive hardware access.

Flow Chart - Vm Compute Engine Creation

 

Sridhar S

Author

Sridhar S

Server Admin - Chadura Tech Pvt Ltd

Related Posts

Comments (0)