Solution to GSP302 – Configure a Firewall and a Startup Script with Deployment Manager Answers
Solution to GSP302 – Configure a Firewall and a Startup Script with Deployment Manager Answers
Challenge scenario
Your company is ready to launch a brand new product and you have been asked to develop a Deployment Manager template to deploy and configure the Google Cloud environment that is required to support this product. To start off, you’ve been given an existing basic deployment manager template that just deploys a single compute instance.
Topics covered
- Configure a deployment template to include a startup script
- Configure a deployment template to add a firewall rule allowing http traffic
- Configure a deployment template to add a networking tag to a compute instance
- Deploy a configuration using Deployment Manager
Solution
Task 1: Open the Cloud Shell, run the following:
- mkdir deployment_manager
- cd deployment_manager
- gsutil cp gs://spls/gsp302/* .
Task 2:
- use nano or open editor to edit qwiklabs.jinja and qwiklabs.yaml
Task 3:
back to cloud shell, run the following commands:
- gcloud deployment-manager deployments create vm-test –config=qwiklabs.yaml
Congratulations!
You have successfully accomplished your challenge.