Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
After the successful installation of Continuous Delivery for PE, the next step is to configure and integrate the Puppet Enterprise. Check out this blog on Continuous Delivery for PE before reading this article. To establish communication with the source control system, we need to configure the Puppet Enterprise.
⚙️ Configure Impact Analysis
Impact analysis is a tool of Continuous Delivery for PE. This tool helps you in finding the impact of the new puppet code on your PE-managed infrastructure without actually merging the new code. When you add an impact analysis tool in your module/control repo's pipeline, automatically, a report is generated on every proposed code that brings a change in the repo.
💿 Configuration Process and Preparation
You must install the puppetlabs-cd4pe module, define the destination server for impact analysis activities, and update the categorization before you can configure impact analysis.
You must do the following things before configuring impact analysis:
📌Installation of Continuous Delivery for PE
📌Integratation with your source control system
📌Integratation with Puppet Enterprise
🧭 Set the Impact Analysis Destination
Impact analysis jobs are immediately set up to execute on the primary server when you integrate a new Puppet Enterprise (PE) instance with Continuous Delivery for PE. To maintain the primary server's compile capability, it is usually preferable to move the impact analysis task destination to a different server, such as a load balancer or compiler.
Following is the way to run an impact analysis task on a compiler or load balancer:
📌In the web UI of Continuous Delivery for PE, click on Settings > Puppet Enterprise and navigate to the PE instance you are configuring.
📌Click on the Edit Credentials and enlarge the Impact analysis credentials section on the page.
📌Enter the hostname of the load balancer or compiler at :8140 (for example, loadbalancer.example.com:8140) in the Puppet Server Service.
📌This step is completely optional. As described in Optional impact analysis settings, you can modify the maximum number of catalogs that Continuous Delivery for PE is capable of compiling concurrently.
📌Click on the Save Changes button.
☣️ Optional Impact Analysis Settings
Go to your Puppet Enterprise (PE) instance credentials in the Settings page and expand the Impact analysis credentials section to make these optional changes.
📑Concurrent Catalog Compilations
This parameter establishes the most simultaneous catalog compilations that Continuous Delivery for PE is capable of. Up to 10 concurrent catalog compilations can be carried out by Continuous Delivery for PE by default. Adjust this value to suit your installation's requirements and constraints. A lower value maintains processing power, whereas a higher value speeds up Continuous Delivery for PE's completion of each impact analysis work.
💾Install Modules
You need to install puppetlabs-cd4pe module and its dependent modules for Impact analysis.
📌You need to add puppetlabs-cd4pe_jobs module, its dependencies, and the puppetlabs-cd4pe module to the Puppetfile for each environment against which your compilers compile catalogs.
📌The Continuous Delivery for PE deploys the updated code if you configure PE to automatically deploy code changes to the applicable environments. If you haven't already, run puppet code deploy <ENVIRONMENT> to deploy the updated code to the appropriate environments.
🧩Update Classification
You need to update the classification of your nodes once you deploy puppetlabs-cdpe and its dependencies.
📌Click on the Node groups and open the PE Infrastructure group on the PE console.
📌Click on Classes after selecting the PE Master group.
📌Select cd4pe::impact_analysis and click Add class, then commit your change in the Add new class field. Click Refresh to update class definitions if you don't find cd4pe::impact_analysis in the list of classes.
📌Now, go into the PE Master group and run Puppet on nodes.
📌Optional: For each workspace, specify the maximum number of concurrent node catalog builds. Ten concurrent catalog compilations are allowed by default.
💡Integrate with Puppet Enterprise
To integrate your Puppet Enterprise (PE) instance with Continuous Delivery for PE, create a dedicated PE user with suitable rights, then append your PE instance's credentials to Continuous Delivery for PE.
⛑️Create a Continuous Delivery User and User Role in PE
Inside the PE, build a “Continuous Delivery” user and user role. This role is used to generate a PE authentication token, which is required during the setup process. Also, this role is used to view a centralized log of the activities. This is performed by Continuous Delivery for PE on your behalf.
📌Click on the Access control > Users in the PE console.
📌Click on Add local user after filling in a full name and a login name.
📌Next, build a user role with the permissions that the Continuous Delivery user needs while running Continuous Delivery for PE. Click on the Access control > User roles in the PE console.
📌Fill in the details for the new role (name and optional description). Then click on the Add role button.
📌From the list on the User roles page, select the new user role.
📌Now, go to the Permissions, and assign the following permissions:
Type
Permission
Object
Job orchestrator
Stop, view, and start jobs
-
Node groups
View
All
Node groups
Create, delete, and edit child groups
All
Node groups
Edit configuration data
All
Node groups
Set environment
All
Nodes
View node data from PuppetDB
-
Tasks
Run tasks
At minimum, cd4pe_jobs::run_cd4pe_job, which is required when running job hardware using a Puppet agent.
Puppet environment
Deploy code
All
Puppet Server
Compile catalogs for remote nodes
-
Puppet agent
Run Puppet on agent nodes
-
📌Click on Commit Changes after configuring all the permissions.
📌Make your Continuous Delivery user a member of the user role. Click Member users, enter the name of the user you just created, click Add user, and then save your changes.
📌Make a password for the user of Continuous Delivery.
📢Add your Puppet Enterprise Credentials
By connecting to your Puppet Enterprise (PE) instance, Continuous Delivery for PE can use PE tools. Tools like the orchestrator service and Code Manager to deploy Puppet code updates to your nodes.
You can add several PE instances to your Continuous Delivery for PE installation if necessary.
📌Check that you are logged in to your own Continuous Delivery for PE user account.
📌Click on the Settings in the web UI of Continuous Delivery for PE
📌Click on the Puppet Enterprise, and then click on the Add new credentials button.
📌Enter a unique, suitable name for your Puppet Enterprise installation in the New Puppet Enterprise credentials window.
📌In the New Puppet Enterprise credentials window, enter a unique, friendly name for your Puppet Enterprise installation. If you need to interact with numerous PE installations within Continuous Delivery for PE, these suitable names help you to distinguish which installation's resources you're managing, so pick them wisely.
📌Enter the FQDN (fully qualified domain name) you use to access the PE console. The FQDN must match the certname of your PE primary server or an alias listed in the dns alt names column in your puppet.conf file.
📌Select API token or Basic authorization and fill in the required information.
📍Basic authorization: Enter the username and password for your user. This information is used by Continuous Delivery for PE to generate an API token. If you want to change the lifespan of your token, then click on Change.
📍API token: To generate a PE access token for your "Continuous Delivery" user, use puppet-access or the RBAC v1 API, as described in Token-based authentication. Copy the token and paste it into the API token area.
📌Click the Save changes button. Continuous Delivery for PE accesses the principal SSL certificate produced during PE installation and looks up the endpoints for the orchestrator, Code Manager, node classifier, and PuppetDB using the provided information.
♟️Create Environment Node Groups
To ensure that code deployments handled by Continuous Delivery for PE run smoothly, your environment node groups must be organized in a specified structure.
Changes are deployed to environment node groups using Continuous Delivery for PE. You can specify node groups to which you can select to distribute modifications by setting up environment node groups.
📌Click on the Node groups in the PE console.
📌If it consists of a node group that is an Agent-specified environment, then ensure that the group’s parent is the All Environments group. The Agent-specifiedenvironment node group is void of rules and unmatched by any nodes.
📌Ensure that the Production environment node group has the All Environments group as its parent. Ensure that the rules of the Production environment node group only correspond to production nodes.
📌Deploy an environment branch and establish an environment node group for each of your environments (such as development, testing, and staging).
📌Optional: There are two situations in which your environment node groups may have offspring even though this is not usual for them.
📍Performing canary testing.
📍Running impact analysis on fewer nodes.
Frequently Asked Questions
What is Puppet?
With the aid of Puppet, you can manage and automate the configuration of servers. When using Puppet, you specify the ideal state for the infrastructure systems that you want to manage.
Why is Puppet used in DevOps?
Puppet has the ability to manage many servers, specify infrastructure as code, and enforce system configuration. Puppet is one of the best DevOps tools for managing numerous servers.
What is DevOps?
DevOps is a collection of cultural ideas, operational procedures, and technical resources that enhance an organization's ability to deliver products and services rapidly.
Is Puppet a CI/CD tool?
Yes, Puppet is a true CI/CD solution for modern development.
What is continuous delivery for Puppet Enterprise?
A solution for optimizing and making continuous integration and delivery of your Puppet code is called Continuous Delivery for Puppet Enterprise (PE). A prescribed methodology for testing and deploying Puppet code across environments is provided by Continuous Delivery for PE.
Conclusion
In this article, we have discussed configuring and adding integrations in Puppet Enterprise.