Skip to main content

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.

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

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
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
  • Amazon Web Services
  • Cloud Computing
  • Google Cloud Platform
  • microsoft azure
Michael Sheehy
— May 14, 2015

PaaS (Platform as a Service): The Top Five Cloud Players

The PaaS choicesFirst up, I guess we'll need to define Platform as a Service. I would describe PaaS environments as cloud computing services platforms that allow developers to launch and manage their web applications without having to confront the complexity of infrastructure creation...

Read more
  • Azure
  • Google Cloud Platform
Michael Sheehy
— May 6, 2015

Free Cloud Hosting: Comparing What the Top Providers Offer

Most providers offer some free cloud hosting to encourage you to get acquainted with their platforms. And some services actually remain free indefinitelyLet's face it, everyone likes something for free, and free cloud hosting is no different. Most providers offer some kind of free ser...

Read more
  • AWS
  • Azure
  • Google Cloud Platform
Andrea Colangelo
— October 13, 2014

The First Google Cloud Course Lands on Cloud Academy

(Update) Since publishing this post, we've released some great new content on Google Cloud Platform on the Cloud Academy training library, including Machine Learning on Google Cloud Platform, Google Data Engineer Exam Professional Certification Preparation, and Google Cloud Platform Fun...

Read more
  • Cloud Computing
  • Google Cloud Platform
Andrea Colangelo
— September 17, 2014

gcloud-node: the Library for Node.js on Google Cloud Platform

Just a few hours ago Google announced very interesting news about improved support for Node.js on its Cloud platform. In fact, a client library for Node.js has been released by BigG for better integration of Cloud Datastore and Cloud Storage into Node.js applications. According to Googl...

Read more
  • Google Cloud Platform
Andrea Colangelo
— September 12, 2014

How to Move Your Startup to the Cloud: the Best Free Programs

Google's Senior Vice President for Technical Infrastructure Urs Hölzle just announced at the Google for Entrepreneurs Global Partner Summit a huge change in its company's free program for startup, that will now offer 100,000$ in cloud credits for those who qualify for the program. Quite...

Read more
  • AWS
  • Cloud Computing
  • Google Cloud Platform
Praveen Kumar Muppala
— August 13, 2014

SSH in the Browser: Pros and Cons of the Latest News in Google Developer Console

Remotely connecting to Linux VM instances using SSH (Secure Shell) with clients like OpenSSH or PuTTY is a common task for developers and administrators to perform their daily routine tasks. Nevertheless, there are many situations where it can be a little inconvenient, like for example ...

Read more
  • Google Cloud Platform
  • Security
Janakiram MSV
— July 14, 2014

Load Balancing in Google Compute Engine

Load balancing is an important feature of cloud infrastructure services. With the ability to rapidly launch VMs, it is important to ensure that all the VMs are evenly utilized. Amazon’s Elastic Load Balancer (ELB) is quite popular for its ability to route the traffic across a set of ins...

Read more
  • Compute
  • Elastic Load Balancer
  • Google Cloud Platform
Janakiram MSV
— July 10, 2014

When to Use Google BigQuery? Big Data in the Cloud

(Update) We’ve recently uploaded new training material on Big Data using services on Amazon Web Services, Microsoft Azure, and Google Cloud Platform on the Cloud Academy Training Library. On top of that, we’ve been busy adding new content on the Cloud Academy blog on how to best train y...

Read more
  • Big Data
  • Google Cloud Platform