Code Manager automates the management and deployment of
your Puppet code. When you push code updates to your source
control repository, Code Manager syncs the code to your primary
server and compilers. This allows all your servers to run the new code as soon as possible,
without interrupting in-progress agent runs. How Code Manager works Code Manager uses r10k and the file sync service to stage, commit, and sync your code to automatically manage your environments and modules. Set up Code Manager Set up Code Manager as your code management tool. Configure Code Manager To configure Code Manager, first enable Code Manager in Puppet Enterprise (PE), then set up authentication, and test the communication between the control repository and Code Manager. Deploying Code without blocking requests to Puppet Server When compiling code, Puppet Server typically blocks requests, including catalog compilation, until file sync is done updating the Puppet code directory. You can enable lockless deploys so the file sync client updates code into versioned code directories instead of blocking requests and overwriting the live code directory. Customize Code Manager configuration in Hiera To customize your Code Manager configuration, set parameters with Hiera. Triggering Code Manager on the command line The
puppet-code command allows you to trigger
Code Manager from the command line to deploy your environments. Triggering Code Manager with a webhook To deploy your code, you can trigger Code Manager by hitting a web endpoint, either through a webhook or a custom script. The webhook is the simplest way to trigger Code Manager. Triggering Code Manager with custom scripts Custom scripts are a good way to trigger deployments if you have requirements such as existing continuous integration systems, privately hosted Git repos, or custom notifications. Troubleshooting Code Manager Code Manager requires coordination between multiple components, including r10k and the file sync service. If you have issues with Code Manager, check that these components are functioning. Code Manager API Use Code Manager endpoints to deploy code and query environment deployment status on your primary server and compilers without direct shell access.