Dan Bode

Dan Bode

Building Application Stacks with Puppet

Managing Google Compute Engine Instances with Puppet

Puppet is an IT automation language that has traditionally been used to configure individual nodes. Puppet's declarative language and dependency model is also suitable for describing entire application stacks on top of public cloud offerings. This post will explain how Puppet can be used to model resources through Google Compute Engine's API in order to describe application stacks as reusable and composable configuration files.
Google Compute Engine (GCE) is a service offering from Google that allows users to provision virtual machine instances that run on Google's infrastructure. The one thing that really stands out about this service compared to similar offerings is how fast it is. Machine instances generally take seconds, not minutes, to spin up. The GCE API allows users to create all of the resources needed to dynamically model application stacks, including: virtual machine instances, networks, firewalls, and persistent disks. It also allows you to specify a lot of the characteristics of a virtual machine instance like the image that should be used, and how much memory and CPU to allocate to that instance. What this API can't do is tell a machine how it should be configured. There is no way to say: "Use this image as a starting place, and then configure yourself to be a mysql database." This is where Puppet comes in. It can be used with GCE in order to configure the roles that should be assigned to created instances. Puppet can also be used to perform ongoing management of those instances. This blog will take the concept one step further, explaining not only how Puppet can be used to assign roles to compute instances, but also how Puppet can be used to model the management of all of the compute objects in GCE that are used to create an application stack.
Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.