I have recently been moving almost all of my workflows to docker. This makes allot of sense over time as things like your development environment can change from laptop to laptop or os to os. While I think something like NixOs is a great step forward in the direction of a common development and delivery platform. I still tend to fallback to docker when building simple shell scripts that I need to share with members of my team. Running things in docker can mean that you can also pin the version of the given software or libraries which has some huge stability and repeatability implications over time. Something many people miss when sharing assets among each other.
In my previous post about automating Gitlab with python I showed you how you can add a webhook to Gitlabs repos dynamically. The other side of this configuration in Puppet Enterprise is configuring r10k to point towards that repo. While Gitlab has a nice python library the Puppet Enterprise classifier libraries are written in Ruby. In this quick how to I will show you the code required to configure Puppet Enterprise’s code manager. I actually was the one who wrote this code in Puppet enterprise back in the day and reason was all about automating your PE installations end to end.
In one of my previous posts I used a third party vagrant box. This box was configured to load the GDM window manager and came with things like docker pre-installed. However as with most things in system imaging I needed to customize my images. This is normally due to requirements like size and configuration. In addition building a bare metal iso installed version of the base image allows me to more easily upgrade the installation over time. This is sort of best of both worlds approach to system imaging as you have the ability to use a image in production but also to upgrade the system using the standard OS installer.
When I left Puppet a year ago I decided to move off of the Puppet Enterprise Install I had been upgrading throughout my 7 year tenure at Puppet. I realized I didn’t need to keep up to date with the latest commercial features anymore. It gave me a long over due opportunity to setup a bare bones puppetserver. I try to use the best tools for the job and Puppet is normally one of the best configuration management solutions when you use it right. Puppet is thus one of the first servers I provision. Given its central role Puppet itself needs to be easily automated and upgraded over time. Frankly this is something most admins dont do enough of. In this how to, I will walk you through how I provision puppet server with Packer.