Enabling faster Puppet Enterprise code deploys
The 2019.8.2 release of Puppet Enterprise has added a significant improvement to code deployment by enabling Puppet modules to be downloaded in parallel instead of serially. This functionality was added to the upstream r10k project almost a year ago and has now been added to Puppet Enterprise Code Manager.
The feature utilizes multiple CPU threads to enable the deployment of Puppet modules in parallel. Based upon testing, the optimal number of threads to use for most PE installations is 4, which is the default value in Puppet Enterprise 2019.8.2. A new configuration parameter, download_pool_size, has been added that lets you specify the number of threads r10k uses to download modules. This setting can be configured in the Puppet Enterprise console or by using Hiera. In this blog post both methods of configuration will be shown.
Puppet Enterprise Console
The settings for Code Manager can be configured through the Puppet Enterprise console.
- Click Node groups under the Inventory section on the side navigation menu.
- Select the PE Master classification group (All Nodes > PE Infrastructure > PE Master).
- Click on the Classes tab to access the class declaration page.
- Enter puppet_enterprise::master::code_manager in the Add new class search box and click the Add class button to add the class to the node group.
- Select download_pool_size from the Parameter drop-down menu under the puppet_enterprise::master::code_manager class.
- Specify the desired number of threads that should be used by Code Manager to download Puppet modules. The default value is 4.
- Click the Add to node group button to the right of the value textbox to add the parameter to the class.
- Click the Commit 1 change button in the lower right corner to commit the changes.
- Run Puppet on the primary Puppet server to apply the changes.
The Code Manager setting can also be configured through Hiera by adding the following to Hiera.
Add the following to the data/common.yaml file in your control repository.
Run Puppet on the primary Puppet server to apply the changes.