My first GCP deployment

less than 1 minute read

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.

Source on GitHub

blogs

Prerequisites

  1. Existing GCP Project.
  2. 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
  1. 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

Leave a Comment