A configuration defines the structure of your deployment. You must specify a configuration to create a deployment.
In this step, you will access a configuration that creates a deployment with two Compute Engine virtual machine (VM) instances. A VM instance is one of several kinds of resources you can deploy with Deployment Manager.
In this step, you'll examine a configuration for a deployment with two VM instances.
Open the configuration YAML file
Change to the directory you created in Installation and setup:
cd deploymentmanager-samples/examples/v2/step_by_step_guide/step2_create_a_configuration
Then, open two-vms.yaml
:
nano two-vms.yaml # use your preferred text editor
In the resources
section, note that there are two resources: the-first-vm
and the-second-vm
. Each resource has a name
, type
, and properties
field:
name
: A name that you define for the resource.type
: Specifies what type of resource you're creating. For example, a VM iscompute.v1.instance
. Similarly, a Cloud SQL
instance has the typesql.v1beta4.instance
.properties
: Specifies the properties of the resource. The properties required to create the resource are the same properties required by the resource's API. For example, when you create a Compute Engine VM instance, you must provide a machine type, an image, a network interface, and a boot disk specification.
Set up the configuration file
In two-vms.yaml
, replace MY_PROJECT with your project
ID.
Save your changes
This basic configuration file is all you need to create your first deployment. You declared the resources that you want to create (in this case, two VM instances that had different machine types), and Deployment Manager takes care of creating the resources.
In the next step, you use this configuration to deploy new resources.