After earning the Google Cloud Professional Architect certification, I wanted to deep dive on Deployment Manager. Deployment Manager is powerful but would benefit from more comprehensive documentation for noobs like me. The service is well-designed but it’s not always intuitive (consistent).
Started as a play and finished after almost two weeks the deployment create a network with one subnet, a CloudSQL instance, http load-balancer with all required components. The WordPress is installed and configured on instance startup-script, but it can be replaced with any web application.
- Existing GCP Project.
- Activate the following APIs on the DM Creation Project.
- Google Cloud Deployment Manager V2 API
- Cloud SQL Admin API
- Compute Engine API
You may use
gcloud services enable command to do this:
gcloud services enable deploymentmanager.googleapis.com gcloud services enable sqladmin.googleapis.com gcloud services enable compute.googleapis.com
- Change values for default variables in default.py as desired.
Using the template
Once the prerequisites have been completed, projects can be created with Deployment Manager via CLI:
gcloud deployment-manager deployments create wp-01 --config wordpress-deployment.yaml