...
Outside of SIMP, Git-based control repositories have been become the dominant technology to manage and deploy Puppet code since 2015.
At a high-level, this a control repository workflow involves:
- A Puppetfile that defines a collection of Puppet modules and where to get them
- A (Git) Control repository, where each branch defines a complete Puppet environment (which includes a Puppetfile)
- A tool (r10k or PE Code Manager) to deploy Puppet environments from the control repository branches
- (Advanced, but preferred) Repository webhooks that automatically trigger environment deployments on the Puppet master(s) whenever a branch is updated.
The upshot is that a control repository branch defines everything needed to recreate a specific Puppet environment.
Puppet environments as code
A branch contains Defining everything required needed to recreate create a Puppet environment , so enables Puppet Environments can to be treated handled like code:
- (Using r10k/Code Manager,) Adding or removing a git branch in the control repository will add or remove that environment on the Puppet master(s)
- (using r10k/Code Manager + webhook triggers)
- The Puppet environment updates change control process can be submitted as handled as merge/pull requests
- User Developers can test, diff, and review Puppet environment changes before promoting them into important environments
- When As control repo branches are updated, CI pipelines can automatically trigger tests and master-side deployments
Multiple Puppet environments
...
Since Because 1 control repo branch = 1 Puppet environment, managing multiple Puppet environments is as simple as using git:
- To create a Fork an existing branch to create a new temporary testing (canary) environment, fork an existing branch
- Once After the canary branch is validated, merge it back into the original
- Control write Write access to important permanent environments by can be controlled by protecting their branches.
Control repos + Puppet deployment tools enable advanced environment scenarios:
...
Scaling Puppet with Control Repository-based workflows
- r10k, Code Manager :) Deploy make it easy to deploy consistent Puppet environments across Puppet architectures that involve multiple masters
- (Bolt:) Manage Bolt makes it possible to manage remote "agentless" hosts by checking out an environment's modules (using
bolt puppetfile install
) before runningbolt apply
...
Limitations and conflicts
Although it It has been technically possible to use multiple Puppet environments and control repositories since SIMP 5.0 (
Status | ||||||
---|---|---|---|---|---|---|
|
The recent 6.4.0 release (
Status | ||||||
---|---|---|---|---|---|---|
|
r10k puppetfile install
from a Puppet environment directory) out of the box. in a single, permanent Puppet environment (i.e., production
).However, there are still two major sources of conflicts problems when using SIMP 6.4.0 with multiple Puppet environments and control repositories:
Issue 1: SIMP automation alters files under the Puppet and SIMP environment directories
...