This document requires familiarity with Puppet Environments and their relationship to SIMP Environments.


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:

The upshot is that a control repository branch defines everything needed to recreate a specific Puppet environment. 

Puppet environments as code

A branch contains everything required to recreate a Puppet environment, so Puppet Environments can be treated like code:

Multiple environments using Control repositories

Since 1 control repo branch = 1 Puppet environment, managing multiple Puppet environments is as simple as using git:

Control repos + Puppet deployment tools enable advanced environment scenarios:

SIMP + Multiple Puppet environments

Limitations and conflicts

Although it has been technically possible to use multiple Puppet environments and control repositories since SIMP 5.0 (), in practice this has been cumbersome, risky, and easy to get wrong.  Getting it right requires an in-depth knowledge of Puppet environments and SIMP's "extra" environments, and there are still significant limitations.

The recent 6.4.0 release () retooled SIMP so it can safely support single-environment Puppetfile deployments (e.g., 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:

Issue 1: SIMP automation alters files under the Puppet and SIMP environment directories 

  1.  RPM updates and simp_rpm_helper could modify existing files Puppet and SIMP environment directories
  2.  User-initiated tools like simp config could modify existing files Puppet and SIMP environment directories
  3.   The user-initiated tool simp environment new can ensure that there is a corresponding secondary and writable environments
    1. This is a safety improvement from earlier releases, because it will only alter environment files when the user initiates it
    2. However, the simp environment tool is only partially implemented, and the rest cannot be implemented safely.
    3. As things stand, this means SIMP 6.4.0:
      1. Safely supports SIMP extra data with the Local (Puppetfile-only) deployment scenario with a single environment (production)
      2. 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

  1.  "Secondary" data/assets under /var/simp/environments/$environment/.  
    These are files too sensitive and/or too large to check into git in plaintext, maintained by site admins.
    1. "Site Files" modules, like pki_files (keydist) and krb3_files
    2. The FakeCA support script, including the FakeCA's private key
    3. RSync directories, used by the simp::server::rsync_shares profile to serve files for various modules.

  2.  "Writable" data/assets under under /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:
    1. 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
    2. 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

SIMP 6.4.0 addressed many of tool and RPM-related problems by making Puppetfile-based module deployments the preferred method to deploy modules.

Improvements focused on making it simple to use Puppetfiles in a single environment, with multiple 

made it simple to deploy environments, but they didn't make them safe.  


During the development of SIMP 6.4.0, it became apparent that the simp environment workflow would have problems down the road:





Proposed SIMP 6.5+



Legacy 6.4 assets in SIMP 6.5+