Understanding Google Cloud Deployment Manager

One of the key components of Replica Pools is the template. It contains the declaration of the pool along with a set of attributes. You could think of the template as the metadata of the Replica Pool. This template is actually based on a standard format defined by another related feature of Google Cloud Platform called the Deployment Manager. Let’s explore Google Cloud Deployment Manager and its use cases.

For those of you familiar with AWS CloudFormation, Deployment Manager concept wouldn’t be new. It allows you to declare, deploy and manage GCE resources. Like CloudFormation, Deployment Manager relies on JSON for describing the deployment. It also supports YAML as an alternative markup.

Deployment Manager is extremely useful when you need to create a repeatable configuration that needs to be provisioned and de-provisioned multiple times. For example, product teams need to manage development, test and staging environments for multiple versions of the same product. They may no keep the resources running but need to bring up the environments selectively during the development process. By defining each environment as a deployment template, DevOps teams can easily create a deployment in a short notice. Since it is based on the same template, it is guaranteed to be consistent.

With each minor change in the deployment, templates can be modified and versioned. This makes it efficient to manage the infrastructure configuration per each environment per version. Developers can treat it as an artifact by integrating the template with the source control system. The other use case of Deployment Manager is declaring a disaster recovery deployment template that is identical to the production environment. The template can be used in any region to quickly set up a DR site. Operations team should start with Deployment Manager templates instead of directly creating resources on Google Cloud. It makes the deployment efficient and less error-prone.

Let’s take a close look at Deployment Manager. It has two building blocks -Template and Deployment.
DM
A Template contains the declaration of the deployment. For example, when launching a VM, it will have the machine type, the image, firewall rules, zone, and other settings. Templates can be defined either in JSON or YAML. JSON is preferred when using the API since it can be directly embedded in the HTTP payload. When using the command line tools, Deployment Manager expects a YAML configuration file. You can either create a new template from the scratch or modify an existing template. Google has provided two sample templates for PHP + Nginx and Node.js. Exploring them will give you an idea of the template structure.

Deployments are a concrete instantiation of a template. They turn the declaration of the resources into actual deployment. It is possible to selectively override the settings defined in the template during the deployment. This feature can be used to leverage one template with minor changes that get applied during the deployment.
A Template can contain all the parameters that are used through the API or the command line tool. It can also contain commands that can be executed after launching the resources. For example, a template can contain “sudo apt-get update” command followed by the installation of required packages on a LAMP server running Debian. The following template declares a replica pool of 4 VMs in US-Central1-a zone. The actions section has the commands to install Apache web server on these VMs and creating index.html.
GCP_DM_Template
Like Replica Pools, Deployment Manager is in technical preview. To gain access to it, send a request to be whitelisted.

In the upcoming post, we will explore using the combination of Deployment Manager and Replica Pools feature to deploy a load balanced, self-healing, auto-scaled deployment on the Google Cloud Platform.

Avatar

Written by

Janakiram MSV

Janakiram MSV heads the Cloud Infrastructure Services at Aditi Technologies. He contributes to cloud related articles on YourStory.com. A former employee of Microsoft and Amazon, Janakiram built a cloud consulting company that recently got acquired by Aditi Technologies. He is an analyst with Gigaom Research contributing to the Cloud related market research and analysis. He can be reached at jani@janakiram.com.


Related Posts

Alisha Reyes
Alisha Reyes
— October 1, 2019

New on Cloud Academy: ITIL® 4, Microsoft 365 Tenant, Jenkins, TOGAF® 9.1, and more

At Cloud Academy, we're always striving to make improvements to our training platform. Based on your feedback, we released some new features to help make it easier for you to continue studying. These new features allow you to: Remove content from “Continue Studying” section Disc...

Read more
  • AWS
  • Azure
  • Google Cloud Platform
  • ITIL® 4
  • Jenkins
  • Microsoft 365 Tenant
  • New content
  • Product Feature
  • Python programming
  • TOGAF® 9.1
Joe Nemer
Joe Nemer
— September 6, 2019

Google Cloud Functions vs. AWS Lambda: The Fight for Serverless Cloud Domination

Serverless computing: What is it and why is it important? A quick background The general concept of serverless computing was introduced to the market by Amazon Web Services (AWS) around 2014 with the release of AWS Lambda. As we know, cloud computing has made it possible for users to ...

Read more
  • AWS
  • Azure
  • Google Cloud Platform
Joe Nemer
Joe Nemer
— September 3, 2019

Google Vision vs. Amazon Rekognition: A Vendor-Neutral Comparison

Google Cloud Vision and Amazon Rekognition offer a broad spectrum of solutions, some of which are comparable in terms of functional details, quality, performance, and costs. This post is a fact-based comparative analysis on Google Vision vs. Amazon Rekognition and will focus on the tech...

Read more
  • Amazon Rekognition
  • AWS
  • Google Cloud Platform
  • Google Vision
Alisha Reyes
Alisha Reyes
— August 30, 2019

New on Cloud Academy: CISSP, AWS, Azure, & DevOps Labs, Python for Beginners, and more…

As Hurricane Dorian intensifies, it looks like Floridians across the entire state might have to hunker down for another big one. If you've gone through a hurricane, you know that preparing for one is no joke. You'll need a survival kit with plenty of water, flashlights, batteries, and n...

Read more
  • AWS
  • Azure
  • Google Cloud Platform
  • New content
  • Product Feature
  • Python programming
Avatar
Andrew Larkin
— August 13, 2019

Content Roadmap: AZ-500, ITIL 4, MS-100, Google Cloud Associate Engineer, and More

Last month, Cloud Academy joined forces with QA, the UK’s largest B2B skills provider, and it put us in an excellent position to solve a massive skills gap problem. As a result of this collaboration, you will see our training library grow with additions from QA’s massive catalog of 500+...

Read more
  • AWS
  • Azure
  • content roadmap
  • Google Cloud Platform
Avatar
Andrew Larkin
— August 7, 2019

Disadvantages of Cloud Computing

If you want to deliver digital services of any kind, you’ll need to estimate all types of resources, not the least of which are CPU, memory, storage, and network connectivity. Which resources you choose for your delivery —  cloud-based or local — is up to you. But you’ll definitely want...

Read more
  • AWS
  • Azure
  • Cloud Computing
  • Google Cloud Platform
Joe Nemer
Joe Nemer
— August 6, 2019

Google Cloud vs AWS: A Comparison (or can they be compared?)

The "Google Cloud vs AWS" argument used to be a common discussion among our members, but is this still really a thing? You may already know that there are three major players in the public cloud platforms arena: Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP)...

Read more
  • AWS
  • Google Cloud Platform
  • Kubernetes
Luca Casartelli
Luca Casartelli
— April 19, 2019

4 Key Takeaways from Google Cloud Next ’19

Google Cloud Next ’19 was the flagship Google Cloud Platform developers conference, held in San Francisco’s Moscone Center. I was lucky enough to attend it with Cloud Academy, and got the chance to check out tons of breakout sessions and get great insight firsthand.   Next ’19 was my...

Read more
  • Google Cloud Platform
  • Kubernetes
  • Machine Learning
Avatar
Giacomo Marinangeli
— March 29, 2019

NEW: Custom Hands-On Labs for Azure and Google Cloud Platform

Harvard Business Review recently estimated that some 90% of corporate training never gets applied on the job. Given the $200B training industry, that is a staggering amount of waste. One reason for the disconnect? Lack of context. Cloud Academy’s platform was built to make it extraor...

Read more
  • Azure
  • Content Engine
  • Google Cloud Platform
  • Hands-on Labs
Avatar
Andrew Larkin
— January 15, 2019

2018 Was a Big Year for Content at Cloud Academy

As Head of Content at Cloud Academy I work closely with our customers and my domain leads to prioritize quarterly content plans that will achieve the best outcomes for our customers. We started 2018 with two content objectives: To show customer teams how to use Cloud Services to solv...

Read more
  • AWS
  • Azure
  • Cloud Computing
  • Google Cloud Platform
Avatar
Guy Hummel
— November 21, 2018

Google Cloud Certification: Preparation and Prerequisites

Google Cloud Platform (GCP) has evolved from being a niche player to a serious competitor to Amazon Web Services and Microsoft Azure. In 2018, research firm Gartner placed Google in the Leaders quadrant in its Magic Quadrant for Cloud Infrastructure as a Service for the first time. In t...

Read more
  • AWS
  • Azure
  • Google Cloud Platform
Avatar
Cloud Academy Team
— September 18, 2018

How to Optimize Cloud Costs with Spot Instances: New on Cloud Academy

One of the main promises of cloud computing is access to nearly endless capacity. However, it doesn’t come cheap. With the introduction of Spot Instances for Amazon Web Services’ Elastic Compute Cloud (AWS EC2) in 2009, spot instances have been a way for major cloud providers to sell sp...

Read more
  • AWS
  • Azure
  • Google Cloud Platform
  • SpotInst