|
|
Cloud Deployment Manager
Author: Venkata Sudhakar
Google Cloud Deployment Manager is an infrastructure deployment service that automates the creation and management of GCP resources using declarative templates. It allows you to define your infrastructure as code using YAML, Python, or Jinja2 templates. Key Features: 1. Declarative configuration - Define desired infrastructure state; Deployment Manager handles provisioning. 2. Repeatable deployments - Deploy identical environments (dev, staging, prod) consistently. 3. Preview changes - Preview what changes will be made before deploying. 4. Rollback - Roll back to a previous deployment if something goes wrong. 5. Templates - Reusable templates using Python or Jinja2 for complex configurations. The below example shows a Deployment Manager template that creates a VM with a static IP.
Deploy and manage using gcloud,
# Deploy
gcloud deployment-manager deployments create my-deployment \
--config=deployment.yaml
# Preview changes
gcloud deployment-manager deployments update my-deployment \
--config=deployment-v2.yaml --preview
# Apply changes
gcloud deployment-manager deployments update my-deployment
Deployment [my-deployment] completed successfully.
Resources created: 3
- my-static-ip (compute.v1.address)
- allow-http (compute.v1.firewall)
- my-web-server (compute.v1.instance)
Deployment Manager vs Terraform: Cloud Deployment Manager - GCP-native IaC tool. No external state file needed. Best for GCP-only infrastructure with simpler requirements. Terraform - Multi-cloud IaC tool with a large ecosystem of providers. Better for complex multi-cloud or hybrid environments. Widely adopted industry standard.
|
|