- Lab
- A Cloud Guru
Launching a Managed Instance Group in Compute Engine
In this lab, you will learn how to create an instance template and customize it to your needs, create a managed instance group that uses the instance template, and learn how to stress test your instances to make sure your configuration works!
Path Info
Table of Contents
-
Challenge
Create an Instance Template
-
In the Google Cloud console, go to the Compute Engine and then go to Instance templates
Click Create instance template.
-
Name your Instance Template
-
Under Machine Type choose e2-micro
-
Under Firewall allow HTTP and HTTPS
-
Click Create
-
-
Challenge
Create a Managed Instance Group
For Health Check:
- In the Google Cloud console, go to the Health Check page.
- Click Create Health Check.
- Give the health check a name, Regional Scope, TCP protocol, port 80.
- Click Create.
For Creating the Instance Group:
- In the Google Cloud console, go to the Instance groups page.
- Click Create instance group.
- Under Instance template, select the instance template you created.
- Under Location, choose Single Zone US-Central1 for region, and US-Central1-A for zone.
- For Autoscaling, choose On: add and remove instances to the group with a min of 1 and a max of 3, and CPU Untilization at 60%.
- For Health Check, choose the health check you've created.
- Click Create.
-
Challenge
Test and Stress the Managed Instance Group
- Select the instance and choose SSH.
- Use command
sudo apt-get install stress
and thensudo stress --cpu 2 --timeout 500
to stress your instance. - After eight minutes, you should see your instance scale to maximum capacity of three instances.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.