Infrastructure – News

An Orchestrated Puppet Infrastucture with Docker and Rancher

22 March 2016

Docker is changing the face of code packaging, delivery and infrastructure.

While we have used Docker heavily for testing purposes for over a year now, using it to host production is yet another step. For us at Camptocamp, we seized that opportunity to move our whole Puppet infrastructure on top of Docker, with the help of the Rancher orchestrator.

Puppet AIO: a new deal

Puppet 4 was released with a whole new All-In-One packaging. This meant we had to rethink the way we deployed and managed most of our Puppet Infrastructure. This, along with scalability considerations, encouraged us to consider a move to Docker for our Puppet Server infrastructure.

Docker-compose

We originally started with a simple docker-compose composition, managed manually on a server, using volumes.

This gave birth to a series of Docker images for Puppet components, orchestrated in a single docker-compose.yml file:

A lot of things in this composition were using locally built images or volumes to deploy data into the containers. In particular, one problem that was hard to solve was deploying certificates.

Rancher

After a few months of successful Docker-based Puppet infrastructure stack in production, it was time for us to move to a full-blown orchestrator to ease deployment and take advantage of advanced Docker features.

After comparing various products, we decided to move to Rancher, for its attempt to follow the Docker core closely, its open-source approach, and its support for the docker-compose.yml format.

We ported our composition to Rancher and improved it to get rid of locally built images and local volumes. The goal was to make a full-blown Puppet Infrastructure based on Docker/Rancher, installable in a few clicks, and fully pluggable and configurable.

This was made using a series of Rancher Catalog templates, which are not yet released. Each catalog template generates a stack, which can interconnect with the other stacks to setup a full Puppet Infrastructure.

Below is the schema of our current infrastructure, running on multiple hosts, and scalable at the container level:

 

The future

Building on our experience of orchestrating a complex infrastructure on Docker and Rancher, Camptocamp is launching a Docker training curriculum, which will include an introduction to Rancher orchestration.