Google Cloud Deployment Manager can be used through the Cloud SDK command-line
gcloud), the Google Cloud Platform Console, and the RESTful API.
This step-by-step guide goes through Deployment Manager using the
Follow the setup steps to prepare your local environment to use Deployment
Create a project
Deployment Manager requires a GCP Console project to use. A GCP Console project contains APIs, credentials, and billing information that allow your application to use Google Cloud Platform services. You must always have a project in order to use any Google Cloud Platform APIs. If you already have a project, you can use your existing project.
If you are new to Google Cloud Platform, you can create a new project and take advantage of Google Cloud Platform’s free trial package, which gives you $300 to spend on all Google Cloud Platform products over 12 months. To sign up for the free trial:
- Go to the GCP Console.
- Follow the instructions to sign up for the free trial.
- When prompted to create a project, enter a name and a project ID that will be used to identify your project, or accept the defaults, and click Create. Consultez les consignes relatives à l'attribution de noms.
Enable APIs for which you want to use Deployment Manager
Deployment Manager uses the APIs of other Google Cloud Platform services to create and manage your resources. To use these other APIs, you must first enable the APIs for your project. Depending on what you want to deploy, the APIs you enable may vary.
For this step-by-step guide, we deploy Google Compute Engine resources, so you need to enable Google Compute Engine.
Next, enable Deployment Manager:
Install Cloud SDK
The Cloud SDK offers a command-line tool,
gcloud, that makes interacting with
Deployment Manager easy.
To install Cloud SDK:
Set your project ID.
Every command requires a project ID. Set a default project ID so you do not need to provide it every time. Remember to replace
myprojectwith your own project ID.
gcloud config set project myproject
Set your default zone and region. Some Google Cloud Platform resources require a zone or a region and you can set a default zone or region, similar to a default project. To set a default zone or region, use
gcloud config set. In this case, use
us-central1as the region and
us-central1-fas the zone:
gcloud config set compute/region us-central1 gcloud config set compute/zone us-central1-f
Create a local folder on your computer
It will help keep all the files you create in this guide organized:
Now that you have set up your environment, you can begin constructing your deployment.
Next: Create a Configuration