homeblogenabling faster puppet enterprise code deploys

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.

  1. Click Node groups under the Inventory section on the side navigation menu.
  2. Select the PE Master classification group (All Nodes > PE Infrastructure > PE Master).
node groups
  1. Click on the Classes tab to access the class declaration page.
  1. 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.
  2. Select download_pool_size from the Parameter drop-down menu under the puppet_enterprise::master::code_manager class.
  3. Specify the desired number of threads that should be used by Code Manager to download Puppet modules. The default value is 4.
  4. Click the Add to node group button to the right of the value textbox to add the parameter to the class.
  5. Click the Commit 1 change button in the lower right corner to commit the changes.
  6. 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.

Learn more