...
Jira Legacy | ||||||||
---|---|---|---|---|---|---|---|---|
|
Managing Multiple Puppet environments (without SIMP)
Control repositories
Outside of SIMP, Git-based control repositories have been the dominant technology to manage and deploy Puppet code since 2015. At a high-level, this workflow involves:
...
- (r10k, Code Manager:) Deploy consistent Puppet environments across Puppet architectures that involve multiple masters
- (Bolt:) Manage remote "agentless" hosts by checking out an environment's modules (using
bolt puppetfile install
) before runningbolt apply
...
SIMP + Multiple Puppet environments
...
Limitations and conflicts
Although it has been technically possible to manage use multiple Puppet environments from a and control repository 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. However, there are still two major sources of conflicts with multiple Puppet environments and SIMP:Conflicts with Control Repositories
Issue 1: SIMP automation
...
alters files under the Puppet and SIMP environment
...
directories
Status colour
...
RPMRed title SIMP 5.0-6.3
...
- updates and
simp_rpm_helper
...
- could modify existing files Puppet and SIMP environment directories
User-initiated tools likeStatus colour Red title SIMP 5.0-6.3 simp config could modify existing files Puppet and SIMP environment directories
Status colour
...
Green title SIMP 6.4
...
The user-initiated toolStatus colour Yellow title PARTIALLY FIXED simp environment new
...
- can ensure that there is a corresponding secondary and writable environments
- This is
...
- a safety improvement from earlier releases, because it
...
Conflicts with Multiple Puppet Environments
...
- will only alter environment files
...
- when the user initiates it
- However, the
simp environment
tool is only partially implemented, and the rest cannot be implemented safely. - As things stand, this means SIMP 6.4.0:
- Safely supports SIMP extra data with the Local (Puppetfile-only) deployment scenario with a single environment (production)
- Does not safely support SIMP extra data with the Control Repository deployment scenarios (without additional conventions and limitations)
Issue 2: SIMP expects there to be separate Secondary and Writable assets to complement each Puppet environment
SIMP has always assumed that there will be two SIMP-specific "environment" data directories to complement each Puppet environment directory
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:
- Whenever a new Puppet environment was deployed, (manual) follow-on actions were required to ensure the appropriate SIMP data was available for that environment
- RPM updates and
simp_rpm_helper
could modify existing files Puppet and SIMP environment directories - It assumed an in-depth knowledge of Puppet and SIMP
- It still suffered from significant limitations and risks
"Secondary" data/assets underStatus colour Red title SIMP (ALL) /var/simp/environments/$environment/.
These are files too sensitive and/or too large to check into git in plaintext, maintained by site admins.- "Site Files" modules, like
pki_files
(keydist) andkrb3_files
. - The FakeCA support script, including the FakeCA's private key
- RSync directories, used by the
simp::server::rsync_shares
profile to serve files for various modules.
- "Site Files" modules, like
"Writable" data/assets under underStatus colour Red title SIMP (ALL) /opt/puppetlabs/server/data/puppetserver/simp/environments/$environment/
...
These are secrets, read by certain Puppet functions while compiling catalogs (and automatically generated if they are missing).
There are only two Puppet functions in SIMP that use the writeable environment directory:simplib::passgen()
- a popular function, used to generate secret passwords
- Used in 14 SIMP modules—usually (but not always) exposed as a parameter default
- Secrets read by this function can also be generated by the
simp passgen
CLI tool
ssh::autokey()
—this function is unused by the stock SIMP modules, but is provided to allow local admins to automatically set up SSH keys as needed.
SIMP 6.4.0: Deploy single environment from a Puppetfile
...
During the development of SIMP 6.4.0, it became apparent that the simp environment
workflow would have problems down the road:
- Making a new SIMP writable and secondary environment for ever Puppet environment was arbitrary
- The dependence on
$environment
made it necessary to adopt workarounds like `simp environment new [--copy|--link
]` when environments used the same (or similar) resources - Linked
- The dependence on
- It would be too easy to permanently lose data from linked environments with the proposed
simp environment rm
command
Puppet Environments and SIMP Assets
...
Proposed SIMP 6.5+
Legacy 6.4 assets in SIMP 6.5+
...