Managing code with r10k
r10k is a code management tool that allows you to manage your environment configurations (such as production, testing, and development) in a source control repository.
Based on the code in your control repo branches, r10k creates environments on your master and installs and updates the modules you want in each environment. If you are running PE 2015.3 or later, we encourage you to use Code Manager, which uses r10k in the background to automate the deployment of your code. If you use Code Manager, you won't need to manage or interact with r10k manually. To learn more about Code Manager and begin setup, see the Code Manager page. However, if you're already using r10k and aren't ready to switch to Code Manager, you can continue using r10k alone.
To set up r10k to manage your environments:
- Set up a control repository for your code.
- Create a Puppetfile to manage the content for your environment.
- Configure r10k. Optionally, you can also customize your r10k configuration in Hiera.
- Run r10k to deploy your environments and modules.
We've also included a reference of r10k subcommands.
-
Configuring r10k
When performing a fresh text-mode installation of Puppet Enterprise (PE), you can configure r10k by adding parameters to thepe.conf
file. In existing installations, configure r10k by adjusting parameters in the console. -
Customizing r10k configuration
If you need a customized r10k configuration, you can set specific parameters with Hiera. -
Deploying environments with r10k
Deploy environments on the command line with ther10k
command. -
r10k command reference
r10k accepts several command line actions, with options and subcommands.