June 23, 2019 · Exploration

Lightning-Quick Maintenance With Puppet Bolt

In my quixotic quest for the perfect configuration management tool™️, I recently came across Puppet's Bolt.

As I read more into it, it seemed like an excellent solution to the problem I needed to solve that week, which was an accelerated rollout of Substance Designer and Painter's 2019 versions to our macOS lab environment.

I didn't want to have to create a custom payload-free pkg script to remove the old version, wait for that to deploy, and then finally deploy the standard vendor-provided installer to production. So, Bolt to the rescue!

Bolt behaves in much the same way as Ansible, in that its primary purpose is to run scripts, commands, or "plans" (similar to Ansible "playbooks"). We used Bolt and an inventory file with the FQDNs of our lab machines to deploy a quick script to uninstall the old versions of Substance Designer and Painter – and, boy, was it fast! Bolt connected to all ~50 hosts and uninstalled the applications in under 15 seconds.

The command looked something like this:

bolt script run myscript.sh --nodes "maclab"

Bolt's flexibility and ease of use mean this is one tool that's getting prime placement in our CPE toolbox. If you already have a repository of Bolt tasks & plans that you use in your environment, I'd love to see it! Come find me in the MacAdmins Slack – I'm @gyamada619.