Book Image

Mastering Puppet

By : Thomas Uphill
Book Image

Mastering Puppet

By: Thomas Uphill

Overview of this book

Table of Contents (17 chapters)

Using r10k


r10k is an automation tool for Puppet environments. It is hosted on GitHub at https://github.com/adrienthebo/r10k. The project is used to speed up deployments when there are many environments and many Git repositories in use. From what we've covered so far, we can think of it as librarian-puppet and Git Hooks in a single package. r10k takes the Git repositories specified in /etc/r10k.yaml and checks out each branch of the repositories into a subdirectory of the environment directory (the environment directory is also specified in /etc/r10k.yaml). If there is a Puppetfile in the root of the branch, then r10k parses the file in the same way that librarian-puppet does, and it uses puppet module install to install the specified modules in a directory named modules under the environment directory.

To use r10k, we'll replace our post-receive Git Hook from the previous chapter with a call to r10k, and we'll move our librarian-puppet configuration to a place where r10k is expecting it...