The language-puppet library is a complete rewrite of the puppetmaster component present in the Puppet configuration management system. It is not yet feature complete, but will let you do things that can’t be done with the original toolset, such as:
- Generating full catalogs locally. This is the most important feature, as it
lets you test all parts of your manifests before you
git pushthem and apply them on a host.
- Computing the differences between two versions of the manifests for a single host, or the differences between hosts. This also can be done between Puppet masters, and comes handy when migrating hosts between Puppet masters, upgrading modules or just during development, to check that you didn’t add more (or less) than expected.
- Displaying the output of the
templatefunction, so that you can test your complex Erb templates.
All of these points are made possible and convenient thanks to the following features:
- Speed. This is about ten times faster than Puppet on my computer. The main
reasons are that this tool is not feature complete yet, but also because this
program is not written in Ruby. The speed should improve in the future. This
also means you don’t have to wait for tens of seconds for
puppet --test --noopto finish.
- PuppetDB access. Facts and exported resources can now be retrieved from PuppetDB. This means that although you are testing the catalogs on your workstation, they are computed with the facts of the real host, and can access all that is in PuppetDB.
- Extensability. The source code should be structured in a way that makes it easy to extend. The library API let you experiment easily too.
The project, while used daily, is still in an alpha stage. Error messages might be unclear, behaviour might not always be Puppet-perfect, documentation might be incomplete and some important features might be missing. This should still result in a huge productivity increase, especially when developping complex templates.
To get an idea of how this works, take a look at this post.
The next project milestones are:
- Full support of resource dependency, including generation of the dependency graph.
- Generation of the catalog in Yaml format that is compatible with the Puppet client.
- Developpement of a “stub” PuppetDB, for local tests involving new exported resources.
With these three additions, it would be possible to embed this library in a Web server and fully replace the current Puppet master for catalog computation.