You may have heard about running puppet in docker described in Gareth Rushgrove’s post on puppet.com called Running Puppet software in Docker containers. I took that post a step or two further and created a Terraform module that deploys a puppet environment to a Nomad cluser. This post goes over the process of using that module.
Terraform is HashiCorp’s answer to the infrastructure as code paradigm. With it you can stand up infrastructure in a myriad of areas including Amazon Web Services, Google Cloud Engine, Openstack, Nomad, and many more. With Terraform you can quickly create infrastructure and when you are done, you can easily destroy that infrastructure. In this article I will give you a quick walk through of installing terraform and using terraform to deploy some infrastructure.
After reading The DevOps Handbook it became obvious that the current trend in IT is defining your infrastructure as code. This gives you infrastructure that you can build and destroy at will. In this article we define a consul cluster in code using Hashicorp’s Terraform.
Puppet is a great tool for configuration management. The biggest problem I have found with Puppet is in a large (1000+) nodes in a production environment. Using Puppet Enterprise you have to move from the large monolithic servers to a model that splits out the puppet services to different servers. This adds a great deal of complexity to your puppet environment and makes it error prone and frankly pretty fragile. Not the most ideal solution for a production environment. Luckily, Puppet has caught on to the DevOps wave and started a project called Puppet-in-Docker where they have containerized Puppet services into containers. This is just what we need to create a Puppet-as-a-Service deployment model where we can quickly and repeatedly create production-like Puppet environments.