Google Cloud: Creating Virtual Machine using Deployment Manager

Share At:

Lab Details:

  1. This lab walks you through Cloud Deployment Manager.
  2. You will be creating a Template and Deployment.

Lab Tasks:

  1. Login into GCP Console.
  2. Creating a Template file.
  3. Creating a Deployment to launch Compute Engine and Firewall Rule.

Creating a Deployment using CDM:

  1. Start the Cloud Shell from the top bar.
  2. Enter the command to create a template file.

nano vm-deploy.yaml

3. Enter the below code in the template file, save the file and exit the text editor.

You may download the above configuration file from following link: Download from here.

4. Enter the command to create a deployment from the template.

gcloud deployment-manager deployments create vm-deployment — config vm-deploy.yaml

If prompted, click on Authorize.

5. You can see the deployment completed successfully and you have created a virtual machine and a firewall rule.

6. Click on the hamburger icon on the top left corner.

7. Click on Compute Engine.

8. You can see the listed VM Instance created using a Template file.

9. Now go to VPC Network > Firewall. You will see the newly created firewall listed.

Completion and Conclusion:

  1. In this lab, you have created a Template i.e yaml file.
  2. You have created a Compute Engine and Firewall Rule using the Template defined in Deployment.

Happy Learning!!!

Share At:
0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Back To Top

Contact Us