Configure impact analysis
Impact analysis is a Continuous Delivery for Puppet Enterprise (PE) tool that shows you the potential impact that new Puppet code can have on your PE-managed infrastructure, without actually merging the new code. When you add impact analysis to a control/module repo's pipeline, Continuous Delivery for PE automatically generates a report on every proposed code change to that repo.
Configuration process and preparation
To configure impact analysis, you must set the destination server for impact analysis
tasks, install the
puppetlabs-cd4pe module, and make
a classification update.
Set the impact analysis destination
When you integrate a new Puppet Enterprise (PE) instance with Continuous Delivery for PE, impact analysis tasks are automatically configured to run on the primary server. In many cases, it's better to change 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: The primary server is the default configuration for running impact analysis tasks, but it is best suited to PE installations with limited node counts using the standard installation architecture. Impact analysis tasks can easily overrun the primary server's limited compile capacity in a larger distributed architecture.
If you choose to run impact analysis tasks on the primary server, skip to Install modules.
- In the Continuous Delivery for PE web UI, navigate to and locate the PE instance you are configuring.
- Click .
If you want to run impact analysis tasks through a dedicated load balancer or
compiler, in the Puppet Server service field, enter the
hostname of the primary server or a specific compiler or load balancer at
loadbalancer.example.com:8140).Tip: The Puppet Server service is used for impact analysis, among other processes. You can run impact analysis tasks on a compiler or load balancer instead of the primary server. This is strongly recommended for PE installations that use compilers or load balancers as part of their architecture.
- Optional: You can expand the Impact Analysis Settings section to adjust the maximum number of catalogs that Continuous Delivery for PE is able to simultaneously compile, as explained in Optional impact analysis settings.
- Click Save Changes.
Optional impact analysis settings
To adjust these optional settings, edit your Puppet Enterprise (PE) integration settings and expand the Impact Analysis Settings section.
Concurrent catalog compilations
This setting sets the maximum number of catalog compilations Continuous Delivery for PE is permitted to perform simultaneously. By default, Continuous Delivery for PE performs up to 10 concurrent catalog compilations.
Tune this number to fit the needs and limitations of your installation. A lower number preserves processing capacity, while a higher number reduces the time Continuous Delivery for PE spends completing each impact analysis task.
Impact analysis requires you to install the
puppetlabs-cd4pe module and its dependent modules.
puppetlabs-cd4pemodule, its dependencies, and the
puppetlabs-cd4pe_jobsmodule to the Puppetfile for each environment against which your compilers compile catalogs.There are multiple ways to Declare Forge modules in the Puppetfile. You can specify a specific version or specify
:latestto automatically check for new versions. For example:
mod 'puppetlabs-cd4pe', :latest # Requirements for cd4pe mod '<DEPENDENT_MODULE_NAME>', :latest mod 'puppetlabs-cd4pe_jobs', :latestImportant: Make sure to declare all required modules, which includes the
puppetlabs-cd4pemodule, all of it's dependent modules, and the
If you specify specific module versions in your Puppetfile, keep in mind that you must install version 1.6.0 or later of the
cd4pe_jobsmodule to Add secrets to jobs.
If you configured Continuous Delivery for PE to automatically deploy
code changes to the relevant environments, Continuous Delivery for PE
deploys the updated code for you. If you have not configured automatic code
puppet code deploy <ENVIRONMENT>to deploy the updated code 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
- Optional: You can adjust the maximum number of catalogs that Continuous Delivery for PE is able to simultaneously compile, as explained in Optional impact analysis settings.