Configure impact analysis
Impact analysis is a Continuous Delivery for Puppet Enterprise (PE) tool that lets you see the potential impact that new Puppet code will have on your PE-managed infrastructure, even before the new code is merged. When you add impact analysis to a control repo's pipeline, Continuous Delivery for PE automatically generates a report on every proposed code change to that control repo.
In order to use impact analysis, you must set the destination server for impact
analysis tasks, install the
and make a classification update.
Set the impact analysis destination
When a new PE instance is integrated with Continuous Delivery for PE, by default impact analysis tasks are automatically configured to run on the primary server. In many cases, it's better to set the impact analysis task destination to a different server, such as a compiler or load balancer, to preserve the primary server's compile capacity.
- Best: A load balancer managing a pool of compilers.
- Good: An individual compiler dedicated to impact analysis tasks.
For small installations only: The PE
primary server. Note: While running impact analysis tasks on the primary server is the default configuration, it is best suited to PE installations with limited node counts using the standard installation architecture. Impact analysis tasks can easily overrun the limited compile capacity of a primary server in a larger distributed architecture.
If you choose to run your impact analysis tasks on your primary server, skip ahead to the Install modules instructions below.
- In the Continuous Delivery for PE web UI, navigate to Settings > Puppet Enterprise and locate the PE instance you are configuring.
- Click Edit credentials and expand the Impact analysis credentials section of the page.
In the Puppet Server service field, enter the hostname
of the compiler or load balancer at
- Optional: Adjust the maximum number of catalogs that Continuous Delivery for PE is able to simultaneously compile.
- Click Save Changes.
Impact analysis requires you to install the
puppetlabs-cd4pe module and its dependent modules.
puppetlabs-cd4pe module must be used with six
dependent modules, plus a module to manage job hardware. The modules and their
required versions are as follows:
||3.1.0 or later in the 3.x series|
||4.19.0 or later|
||0.5.0 or later|
||0.9.3 or later|
||2.1.0 or later|
||4.4.1 or later|
||1.1.0 or later|
||1.0.0 or later|
Add the modules listed above to the Puppetfile
for each environment against which your compilers compile catalogs.
A sample Puppetfile entry:
mod 'puppetlabs-cd4pe', '3.2.1' # Requirements for cd4pe mod 'puppetlabs-stdlib', '7.1.0' mod 'puppetlabs-puppet_authorization', '0.5.1' mod 'puppetlabs-hocon', '1.1.0' mod 'puppetlabs-concat', '7.0.2' mod 'puppetlabs-apt', '8.1.0' mod 'puppetlabs-translate', '2.2.0' mod 'puppetlabs-cd4pe_jobs', '1.5.0'
Deploy the updated code to the relevant environments by running
puppet code deploy <ENVIRONMENT>.Remember: Continuous Delivery for PE performs this step for you if you've configured it to deploy code changes automatically to the relevant environments.
puppetlabs-cdpe and its dependencies are
deployed, you must update classification of your nodes.
- In the PE console, click Node groups (or Classification in PE versions prior to 2019.8.1) and open the PE Infrastructure group.
- Select the PE Master group and click Classes (or Configuration in PE versions prior to 2019.8.1).
In the Add new class field, select
cd4pe::impact_analysis and click Add
class, then commit your change.
If you don't find cd4pe::impact_analysis in the class list, click Refresh to update class definitions.
Run Puppet on the nodes in the PE
Important: This Puppet run restarts the
Set the maximum number of concurrent node catalog compiles allowed for each
workspace. By default, 10 concurrent catalog compilations are allowed.
Adjust this setting to manage the catalog compilation load placed on a PE instance by Continuous Delivery for PE impact analysis report generation.
- In the Continuous Delivery for PE web UI, click Settings.
- Click Puppet Enterprise and locate the PE instance you've configured to use impact analysis. Click Edit credentials.
- Locate the Impact analysis credentials section of the window. In the Max concurrent catalog compiles field, set the number of catalog compilations that are allowed to run simultaneously on this PE instance.
- Click Save changes.