Getting started guide
If you're using Continuous Delivery for Puppet Enterprise (PE) for the first time, you'll need to perform some initial workspace setup tasks and learn how to use the core features.
Soon, you'll have a more streamlined, powerful, and flexible Puppet code delivery process.
Part 1: Install Puppet Application Manager and deploy Continuous Delivery for PE
First, install Puppet Application Manager (PAM) and then configure and deploy Continuous Delivery for Puppet Enterprise (PE).
- Make sure your system meets the PAM system requirements.
- Follow the instructions for your environment to Install PAM.
- Deploy Continuous Delivery for PE.
Part 2: Create your user account and set up a workspace
If Continuous Delivery for Puppet Enterprise (PE) were a city, workspaces would be neighborhoods within that city. Your workspace is where you store and access resources such as control repos, pipelines, and jobs. When you're ready to collaborate, you can invite team members to join your workspace.
-
If you have not done so already, navigate to the Continuous Delivery for PE web UI URL (
https://<HOSTNAME>
) you received at the end of Part 1. -
Create your personal user account.
-
Set up a workspace.
- On the Choose a workspace screen, click Add new workspace.
- Enter a name for your workspace and click Create workspace.
Part 3: Set up integrations
Next, integrate with your Puppet Enterprise (PE) instance and the source control system where you keep your Puppet code.
- Follow the instructions to Integrate with Puppet Enterprise.
- Follow the instructions to Configure impact analysis.
- Follow the integration instructions for your source control system:
Part 4: Configure job hardware
Configure a node running a Puppet agent to be a job hardware server, where your code is tested before deployments.
- Install a Puppet agent on the node you plan to use as job hardware. Instructions for Installing agents are in the Puppet Enterprise (PE) documentation.
-
Make sure your Continuous Delivery user role
in PE has permission to run the
cd4pe_jobs::run_cd4pe_job
task. -
Install the
puppetlabs-cd4pe_jobs
module from the Forge, which is required to run Continuous Delivery for PE jobs on your node. - The job hardware server must be able to use the pre-built jobs included in Continuous Delivery for PE. Since these jobs are Docker-based, you must install and configure Docker on the node. You can find installation files and instructions on the Docker website.
-
Tell Continuous Delivery for PE that this node is ready to be used as
job hardware for Docker-based jobs by assigning
it to a hardware capability. Capabilities organize your job hardware servers and
ensure that jobs run on hardware with the right characteristics. Continuous Delivery for PE automatically creates a
Docker hardware capability for you.
- In the Continuous Delivery for PE web UI, click Hardware.
- Locate the Docker capability and click Edit.
- Select the PE instance that manages the node you've selected as job hardware, and then select your job hardware node. The selected node appears in the Hardware with this capability list.
- Click Save.
Part 5: Add a control repo
A control repo in Continuous Delivery for Puppet Enterprise (PE) tracks the changes made
on the active development branch of your source control system. When adding a control repo
to Continuous Delivery for PE, it's important to connect the main
Git branch.
Adding a repo in Continuous Delivery for PE configures a webhook to the repository in your source control system. The webhook reports new commit activity on the repository to Continuous Delivery for PE, enabling you to track code changes and take action (such as triggering pipelines or running individual tests on the new code).
Part 6: Set up a pipeline
Continuous Delivery for Puppet Enterprise (PE) pipelines are made up of stages and tasks. Tasks include jobs to test code, deployments, and impact analysis. Stages group tasks into a series of sequential phases.
- In the Continuous Delivery for PE web UI, click Control repos and click the name of the control repo you added in Part 5.
- You'll create a pipeline in the Pipelines section of the page. Click Add default pipeline.
- The Code validation stage includes two tasks (jobs to test Puppet code).
- The Impact analysis stage includes an impact analysis task with a pull request gate (more on this later).
- The Deployment stage, which is where you'll add deployment instructions in Part 8.
Part 7: Set up an environment node group
Next, set up a small environment node group to use for deployment testing and to demonstrate how Continuous Delivery for Puppet Enterprise (PE) deploys new code to PE-managed nodes.
You can learn more About environments in the Puppet documentation and learn about Managing environments with a control repository in the PE documentation.
Part 8: Deploy changes to your nodes
Once you've added a deployment to your pipeline, you can automatically move code changes to your nodes according the deployment conditions you've set.
- In the Continuous Delivery for PE web UI, in your control repo's pipeline, click Add a deployment.
- Select your PE instance and then select the CD4PE test group node group you created in Part 7.
- Select Direct deployment policy. Don't set special conditions for this deployment.
- Click Add deployment to stage. On the confirmation screen, click Done.
- To trigger the deployment, you need to create a change to pass through to production. On the main branch of your Git repository, make a code change, such as updating a package version. Commit the change and then return to the Continuous Delivery for PE web UI to watch your pipeline in action.
Part 9: Create an impact analysis report
Impact analysis reports show the potential impact that new Puppet code will have on the nodes and resources you're managing with Puppet Enterprise (PE). In Continuous Delivery for PE, you can add impact analysis tasks to your pipelines and you can generate impact analysis reports on demand.
Here, you'll generate an on-demand impact analysis report to review how a change impacts the nodes in the CD4PE test group node group you created in Part 7.
Congratulations! By completing the getting started guide for Continuous Delivery for PE, you've become familiar with some of Continuous Delivery for PE's core features, and you have a basic understanding of how Continuous Delivery for PE helps you deploy Puppet code and preview the impact of code changes.