To restart this tutorial, in the Cloud Shell terminal, type:
teachme ~/deploymentmanager-samples/quickstart.md
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.
-
Select or create a Cloud Platform project, from the Manage Resources page.
-
Configure the
gcloud
command-line tool to use your project. In Cloud Shell, type the following command, and replace[MY_PROJECT]
with your project ID.gcloud config set project [MY_PROJECT]
To begin, open the quickstart configuration in 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
cd ~/deploymentmanager-samples/v2/ - Root persistent disk:
boot
- A randomly assigned external IP address
In the configuration file, replace these placeholders:
[MY_PROJECT]
with your project ID[FAMILY_NAME]
with the image familydebian-9
To save your changes, from the File menu, click Save.
In your Cloud Shell, navigate to the quick_start
folder:
cd ~/deploymentmanager-samples/examples/v2/quick_start
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
To check the status of the deployment, run the following command:
gcloud deployment-manager deployments describe quickstart-deployment
After you have created the deployment, you can review your resources in the Cloud console.
-
To see a list of your deployments, open the Deployment Manager page in the console.
-
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.
-
To see information about your VM, click quickstart-deployment-vm.
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
- Work through the Step-by-Step Guide to Deployment Manager.
- Read more about Deployment Manager Configurations.
- For a list of resources you can create and manage in your deployment, see Supported resource types.