Code Manager settings

After configuring Code Manager, you can adjust its settings in the PE Master node group in the puppet_enterprise::profile::master class.

Code Manager requires these options, unless otherwise noted:

puppet_enterprise::profile::master::code_manager_auto_configure

Specifies whether to autoconfigure Code Manager and file sync.

Default: false

Setting this to true also sets environment_timeout to unlimited.

puppet_enterprise::master::file_sync::chown_code_to_pe_puppet

By leaving this enabled, users help ensure they do not hit a class of errors that can occur by committing Puppet code files with the wrong permissions (or at least have those errors resolved on the next Puppet run). However, some users have codedirs large enough and I/O throughput restrictive enough that they require disabling these executive resources in the compiler catalogs.

Defaults: true

Valid values: true or false

puppet_enterprise::master::file_sync::copy_method

Specifies the implementation method used for copying versioned deploys to their location.

Default:shell-cp

Valid values are shell-cp and java. Using the previous default of java is slower but may resolve issues if you see compilation errors where files appear non-existent or partially written during first compilation, but upon inspection appear to exist in their totality.

puppet_enterprise::master::file_sync::versioned_sync_pool

Specifies the number of threads available for concurrent code deployments.

Default: 2

This may be set higher for faster deploy alls of environments. Deploying multiple environments at once may saturate I/O on the compiler syncing code with adverse effects. Watch metrics for I/O usage during code deploys and adjust the concurrency level as appropriate.

puppet_enterprise::profile::master::r10k_remote

The location, as a valid URL, for your Git control repository.

Example: "git@<YOUR.GIT.SERVER.COM>:puppet/control.git"

puppet_enterprise::profile::master::r10k_private_key

The path to the file containing the private key used to access all Git repositories. Required when using the SSH protocol, and optional in all other cases.

Example: "/etc/puppetlabs/puppetserver/ssh/id-control_repo.ed25519"

puppet_enterprise::profile::master::r10k_proxy

Optional proxy used by r10k when accessing the Forge. If empty, no proxy settings are used.

If r10k_proxy is specified, you must use an HTTP URL for the r10k_remote parameter and all Puppetfile module entries.

Example: "http://proxy.example.com:3128"

More information: Set proxies for Code Manager traffic

Additional and alternative Code Manager proxy configurations: Customize Code Manager configuration in Hiera (specifically Configuring proxies and Configuring Forge settings)

puppet_enterprise::profile::master::r10k_trace

Configuration option that includes the r10k stacktrace in the error output of failed deployments when the value is true.

Default: false

puppet_enterprise::profile::master::versioned_deploys

Setting for the lockless code deploys feature. Define the parameter to specify whether code is updated in versioned code directories instead of blocking requests and overwriting the live code directory.

Setting versioned_deploys to false will cause the Puppet Server process to lock the JRuby pool for each deployment. This will cause the compiler to become unavailable every time Puppet code is updated. This is the older method for code deployment, if you experience issues with code deployments trying this method may work for you. This setting should only be set to false in consultation with Puppet Support.

Default: true

More information: Lockless code deploys

puppet_enterprise::master::environment_timeout

Specifies if and how long environments are cached, which can significantly reduce your Puppet Server's CPU usage. You can specify these values:

  • No caching: 0
  • Retain environment data caches indefinitely: unlimited
  • Cache environments for a specified length of time after their last use: Any length of time, such as 5m

Default when Code Manager is enabled: 5m

Default when Code Manager is not enabled: 0

If code_manager_auto_configure is set to true: unlimited

More information: Change the environment_timeout setting

puppet_enterprise::master::file_sync::copy_method

Specifies the implementation method used for copying versioned deploys to their location.

Default: java

Valid values are java and shell-cp. Changing the method to shell-cp can help to improve file sync speed for lockless code deploys.

puppet_enterprise::master::file_sync::versioned_sync_pool

Specifies the number of threads available for concurrent code deployments.

Default: 1

Increasing the value allows multiple code environments to be deployed concurrently, enhancing the performance of lockless code deploys when puppet code deploy --all is run. Increasing the thread pool size can also improve file sync performance when different code environments are deployed in quick succession.

Customize Code Manager configuration in Hiera explains how you can use Hiera to further customize your Code Manager configuration.