Creating Managed Instance Groups (MIG) V2 | Scribe

    Creating Managed Instance Groups (MIG) V2

    • Hafeez Baig |
    • 23 steps |
    • 4 minutes
    information ordinal icon
    Refer to this guide to learn How to simplify the VM creation with Instance Templates<https://scribehow.com/shared/Simplifying_VM_creation_with_Instance_Templates__FtElAiwkTbuM1dBksux00A> \ Refer to this guide to learn How to reduce launch time with a custom image<https://scribehow.com/shared/Reducing_Launch_Time_with_a_Custom_Image__j44cfIdpQGuoOxQLUPtarg>
    1
    Sign in into the **Google Cloud Platform**
    2
    Type "**Compute Engine**" in the search bar and click on the **Compute Engine** option
    information ordinal icon
    **What is Compute Engine?** Google Compute Engine (GCE) is an Infrastructure-as-a-Service (IaaS) offering from Google Cloud Platform (GCP) that allows users to run virtual machines (VMs) on Google's infrastructure. It provides scalable and flexible computing resources, high-performance persistent storage, advanced networking capabilities, and integration with other GCP services, making it suitable for a variety of workloads including web hosting, data processing, and high-performance computing.
    3
    Click on the **Instance groups** from the left bar
    information ordinal icon
    **What are Instance groups?**\ \ Instance groups in GCP are sets of virtual machine instances managed together for load balancing and scaling. They distribute traffic evenly across instances, automatically adjust capacity based on demand, and ensure high availability by spreading instances across multiple zones.
    4
    **Instance Groups** wizard will open, click on the **CREATE INSTANCE GROUP** button
    5
    **Create Instance Group wizard** will open, click on the **New managed instance group (stateless)** option from the left bar
    information ordinal icon
    **What are New managed instance group (stateless)?**\ \ A new managed instance group (stateless) in GCP is a set of VM instances managed as a single unit without preserving individual instance data. It automatically scales, balances traffic, and ensures all instances are identical, making it ideal for applications that don't need to retain data between restarts.
    6
    Give the Name as - "**my-manged-instance-group**"
    7
    Scroll to the **Instance template** section and select the **my-instance-template-with-startup-script-with-image** from the dropdown **Note:** This instance template was created in previous labs. If you cannot find the instance template, you can create a new one.
    8
    Scroll to the **Location** section and select the option **Multiple zones**
    information ordinal icon
    **What are Multiple zones in Location?**\ \ In GCP, multiple zones in a location refer to deploying resources across different zones within the same region. This enhances availability and reliability by spreading instances across separate physical locations, reducing the impact of a single-zone failure. Each zone operates independently, but resources within a region can communicate with low latency.
    9
    Scroll to the **Autoscaling** section and select the option **On: add and remove instances to the group** from the dropdown
    information ordinal icon
    **What is the Autoscaling option On: add and remove instances to the group?**\ \ In GCP, the autoscaling option "On: add and remove instances to the group" automatically adjusts the number of VM instances based on demand. It adds instances when demand is high and removes them when demand is low, ensuring efficient resource usage and cost savings.
    10
    On the **Autoscaling** section give **"2"** as the **Minimum** and **Maximum number of instances**
    11
    Scroll to the **Autoscaling signals** section and click on the **CPU utilization: 60% (default)** option
    information ordinal icon
    **What is CPU utilization: 60% (default) option in Autoscaling signals?**\ \ The "CPU utilization: 60% (default)" option in **Autoscaling signals** in GCP means that the autoscaler will aim to keep the average CPU usage of the instances in the group at 60%. - **Add Instances**: If CPU usage exceeds 60%, the autoscaler will add more instances to reduce the load. - **Remove Instances**: If CPU usage is below 60%, the autoscaler will remove instances to optimize resource usage and costs.
    12
    On the Autoscaling signals section, scroll to the **Signal type** dropdown and select the **CPU utilization** option
    13
    Scroll to the **Predictive autoscaling** section, select the **Off** radio button and click on the **DONE** button