Skip to content

Latest commit

 

History

History
113 lines (75 loc) · 3.56 KB

quickstart.md

File metadata and controls

113 lines (75 loc) · 3.56 KB

Deployment Manager Quickstart

To restart this tutorial, run this command in the Cloud Shell terminal:

teachme ~/cloudshell_open/deploymentmanager-samples/quickstart.md

Introduction

In this quickstart, you use Deployment Manager to deploy a virtual machine instance. The virtual machine is a resource, which you add to a deployment configuration file. After you create a configuration file, you use it to create a deployment, which is a collection of resources that you can create or manage together.

Your deployments can contain dozens of resources from various Google Cloud services, and you use Deployment Manager to manage them from a single file.

This quickstart walks you through creating a basic configuration file, and using that file to create a deployment. To complete this tutorial, you must be comfortable running commands in a Linux terminal.

Setting up

  1. Select or create a Google Cloud Platform project:

  2. Enable billing.

  3. Configure the gcloud command-line tool to use your project:

    gcloud config set project {{project-id}}
  4. Run this command to enable the Deployment Manager and Compute APIs:

    gcloud services enable compute.googleapis.com deploymentmanager.googleapis.com  

Define your resources

To begin, run these commands to open the quickstart configuration in vm.yaml:

cd ~/cloudshell_open/deploymentmanager-samples/examples/v2/quick_start/
cloudshell edit vm.yaml

This basic configuration file describes a deployment that contains one virtual machine instance with the following properties:

  • Machine type: f1-micro
  • Image family: debian-9
  • Zone: us-central1-f
  • Root persistent disk: boot
  • A randomly assigned external IP address

In the configuration file, replace [MY_PROJECT] with your project ID.

To save your changes, from the File menu, click Save.

Deploy the resources

To deploy your resources, use the gcloud command-line tool to create a new deployment, using your configuration file:

gcloud deployment-manager deployments create quickstart-deployment --config vm.yaml

Check on your deployment

To check the status of the deployment, run this command:

gcloud deployment-manager deployments describe quickstart-deployment

Review your resources

After you have created the deployment, you can review your resources in the Cloud console.

  1. To see a list of your deployments, open the Deployment Manager page.

  2. To see the resources in the deployment, click quickstart-deployment. The deployment overview opens, with information about the deployment, and the resources that are part of the deployment.

  3. To see information about your VM, click quickstart-deployment-vm.

Clean up

To avoid incurring charges on your Cloud Platform account, delete the deployment and all the resources that you created:

gcloud deployment-manager deployments delete quickstart-deployment

What's next