DocsContinuous Delivery for Puppet Enterprise
Previewing the impact of code changes

Previewing the impact of code changes

Sections

Continuous Delivery for Puppet Enterprise (PE) lets you see the potential impact that new Puppet code will have on your PE-managed infrastructure even before the new code is merged. You can generate an impact analysis report for any commit, or add impact analysis to a control repo's pipeline to automatically generate a report on all proposed code changes.

Important information about the limitations of impact analysis

We've designed impact analysis to give you helpful information about the potential results of code changes to your infrastructure. However, impact analysis is not designed to be an exhaustive report — do not use it as a substitute for more exhaustive testing. For instance, there are certain circumstances in which we can't reliably calculate the full impact of a code change. As an impact analysis user, it's critical that you understand that these limitations exist, and that you remain alert to the possibility that code changes might have consequences for your infrastructure beyond what impact analysis shows.

The following is a non-exhaustive list of some of the limitations of impact analysis. This list might be updated from time to time, but is not complete.

  • Changes to Hiera data. The imapct of changes to Hiera data cannot be analyzed.

  • Changes to an environment's environment.conf file. The downstream impact of changes to an environment.conf file cannot be analyzed.

  • Brand-new code. New Puppet classes, facts, or functions that have never before been applied to any of your nodes cannot be analyzed.

  • Changes to functions. The impact of changes to a function cannot be analyzed.

  • Changes to facts. The impact of changes to a fact cannot be analyzed.

  • Changes to class names used in classification. Changes to the names of classes that have been previously classified in the classifier cannot be analyzed. A classification update in the classifier is required before Puppet can locate the newly renamed class.

  • Imported resources. While impact analysis can provide information about nodes that export resources, the impact to nodes that receive those exported resources cannot be analyzed.

  • Sensitive data types. Any changes to data types marked as sensitive will not be analyzed.

  • Alias metaparameter. Any resources using the alias metaparameter cannot be analyzed.

Remember: Reports generated by impact analysis are provided "AS-IS."

Add impact analysis to a control repo pipeline

Once you add an impact analysis task to your control repo pipeline, the impact analysis report is automatically generated each time the pipeline is triggered and the conditions you've set are met.

Before you begin
  1. Configure impact analysis.

  2. Set up a pipeline for your control repo that includes at least one deployment.

CAUTION: Impact analysis fails if you include the $environment variable in your Puppet manifest. Instead, use Hiera and class parameters.

Impact analysis reports are generated by diffing a newly generated catalog for the deployment conditions you've set against the current catalog for the same deployment. The results of this process are shown in the impact analysis report.

You can add as many impact analysis tasks to your pipeline as you wish, but each stage in the pipeline can have only one impact analysis task. An impact analysis task cannot be in the same stage as a deployment.

  1. In the Continuous Delivery for PE web UI, click Control Repos. Click the name of the control repo you wish to add impact analysis to.
  2. Select the pipeline you wish to add impact analysis to. Make sure there is at least one deployment present in the pipeline.

    Impact analysis is calculated for your pipeline using the deployment conditions you've chosen.

  3. Add impact analysis to a stage that does not contain a deployment. Click More Actions . Select Add item to Stage, then select Impact Analysis.
    Tip: For best results, add impact analysis to a stage in your pipeline that comes before a PR gate and before any deployment stages.
  4. Set the catalog compilation batch size. By default, Continuous Delivery for PE compiles 10 catalogs at a time when performing an impact analysis task.
  5. Determine which environments you want to generate an impact analysis report for.
    • Select Run for all environments in the pipeline to generate impact analysis for all environments used by all deployments in the pipeline.

    • Select Run for selected environments to choose which environments to run impact analysis on from among those used by the pipeline's deployments.

  6. Click Add Impact Analysis.

Impact analysis is now enabled for your control repo pipeline. An impact analysis report is generated each time the pipeline runs.

Add impact analysis to a module pipeline

Once you add an impact analysis task to your module pipeline, the impact analysis report is automatically generated each time the pipeline is triggered and the conditions you've set are met.

Before you begin
  1. Configure impact analysis.

  2. Set up a pipeline for your module that includes at least one deployment.

CAUTION: Impact analysis fails if you include the $environment variable in your Puppet manifest. Instead, use Hiera and class parameters.

Impact analysis reports are generated by diffing a newly generated catalog for the deployment conditions you've set against the current catalog for the same deployment. The results of this process are shown in the impact analysis report.

You can add as many impact analysis tasks to your pipeline as you wish, but each stage in the pipeline can have only one impact analysis task. An impact analysis task cannot be in the same stage as a deployment.

Important: Impact analysis reports for module code are supported on PE 2018.1.9 and newer versions in the 2018.1 series, PE 2019.1.1 and newer versions in the 2019.1 series, and all versions in the 2019.2 series.
  1. In the Continuous Delivery for PE web UI, click Modules. Click the name of the module you wish to add impact analysis to.
  2. Select the pipeline you wish to add impact analysis to. Make sure there is at least one deployment present in the pipeline.

    Impact analysis is calculated for your pipeline using the deployment conditions you've chosen.

  3. Add impact analysis to a stage that does not contain a deployment. Click More Actions . Select Add item to Stage, then select Impact Analysis.
    Tip: For best results, add impact analysis to a stage in your pipeline that comes before a PR gate and before any deployment stages.
  4. Set the catalog compilation batch size. By default, Continuous Delivery for PE compiles 10 catalogs at a time when performing an impact analysis task.
  5. Select the environments you want to generate an impact analysis report for.
  6. For each selected environment, choose the control repo where the code associated with that environment is stored.
  7. Click Add Impact Analysis.
Impact analysis is now enabled for your module pipeline. An impact analysis report is generated each time the pipeline runs.
How helpful was this page?
Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.