Table of Contents |
---|
Background
Info |
---|
This document requires familiarity with Puppet Environments and their relationship to SIMP Environments. |
Jira Legacy | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
The upshot is that a control repository branch defines everything needed to recreate a specific Puppet environment.
...
Puppet environments as code
Since a A branch contains everything required to recreate a Puppet environment, so Puppet Environments can be treated like code:
- (Using r10k/Code Manager,) Adding or removing a git branch will add or remove that environment on the Puppet master(s) (via r10k/Code Manager)
- Environment Puppet environment updates can be submitted as merge/pull requests in the git hosting service
- User can test, diff, and review changes before promoting them into important environments
- As When branches are updated, CI pipelines can automatically trigger tests and deployments deployments
...
Multiple environments using Control repositories
Since an SCM 1 control repo branch = a 1 Puppet environment, managing multiple Puppet environments is as simple as using git:
- Creating To create a temporary testing (canary) environment is as simple as forking from , fork an existing branch
- Once the canary branch is validated, you can simply merge it back into its original branch
- Control write access to important permanent environments can be controlled by by protecting their git branches.Deploying
Control repos + Puppet deployment tools enable advanced environment scenarios:
- (r10k, Code Manager:) Deploy consistent Puppet environments across Puppet architectures that involve multiple masters becomes as simple as
r10k deploy environment BRANCHNAME
.You can use Puppet bolt to manage - (Bolt:) Manage remote "agentless" hosts by checking out an environment's modules (using
bolt puppetfile install
) and before runningbolt apply
.
Managing Multiple Puppet environments (with SIMP)
...
Starting with the 6.4.0 release (
Status | ||||||
---|---|---|---|---|---|---|
|
r10k puppetfile install
from a Puppet environment directory). However, The there are still two major sources of conflicts with multiple Puppet environments in the earlier and 6.4.0 releases of and SIMP:Conflicts with Control Repositories
SIMP automation can
...
alter files under the Puppet and SIMP environment directories
RPM scriptlets +Status colour Grey title SIMP 5.0-6.3 simp_rpm_helper
, some tools likesimp config
TheStatus colour Blue title SIMP 6.4 simp environment new
command, which- This is much safer than earlier versions, because it only alters environment files at user direction
Conflicts with Multiple Puppet Environments
SIMP expects a Secondary and Writable "extra" directory for each Puppet environment:
Everything "Secondary" data underStatus colour Red title SIMP (ALL) /var/simp/environments/$environment/
Everything under /var "Writable" data under underStatus colour Red title SIMP (ALL) /opt/puppetlabs/server/data/puppetserver/simp/environments/$environment/
...
Earlier SIMP releases
In earlier SIMP releases (5.0–6.3), it was technically possible to deploy multiple environments from a control repository—but in practice, it was cumbersome and risky:
...
- Puppetfile-based deployment tools like r10k or Code Manager and now preferred to deploy SIMP's Puppet modules
- To prevent conflicts with these tools, SIMP no longer interferes with any files under the Puppet or SIMP environment directories, unless directed to by the user.
- SIMP module RPMs now install tagged versions into local git repositories, for use in local Puppetfiles
- The
simp puppetfile
tool was introduced to automatically generate Puppetfiles based on the current module RPMs.
- The
- The
simp environment new
tool was introduced to help users ensure that corresponding SIMP and Puppet environments are created.
Improvements focused on making it simple to use Puppetfiles in a single environment, with multiple
...