Check out my latest project PullPreview - Deployment previews for your pull requests, on servers you control

Who said Puppet was hard?

Yesterday I was at the second edition of the Devcamp in Rennes, where developers from various horizons and communities gather to share ideas and tools related to a specific theme.

This time the theme was about deployment, and I took the lightning talk slot to present a short demo with the goal of demystifying Puppet.

Indeed, Puppet (or Chef for that matter) is often seen as a tool only used and usable in large organizations. People often think it has to be a client-server architecture, with lots of dependencies and configuration to setup, but the truth is that it comes with a solo mode that is really painless to use, even for simple deployments on a single or few machines.

If you're interested in the end result, you can just go look at the demo on github.

Puppet

Puppet manifest

Puppet modules

Manage your Puppet module dependencies with librarian-puppet

Usage

Automate with Capistrano

Demo

The demo started with a fresh Ubuntu 10.04LTS EC2 instance (with a single click from the Ubuntu Cloud image repository which is great stuff by the way), and then the single Capistrano command deployed everything on that bare server in less than 5'. For a last minute presentation, I think it went great.

Have a look at the demo on github.

Conclusion

If you want to get one or more servers deployed in no time, find the Puppet modules you need on the forge or create your own simple manifests, and use Puppet in solo mode to apply the recipes on any number of server with a simple Capistrano task.

Also, it's likely that you can get to the same result with Chef (see the original Librarian gem, which comes with librarian-chef), so there is really no excuse to keep using your shell scripts or half-backed libraries to provision servers.

Resources