Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Background

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


Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId45e63be1-2551-37a6-b050-86a38172f71d
keySIMP-3479

...

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

Image Modified

...

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 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
    Write
  • 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 running bolt apply.

Managing Multiple Puppet environments (with SIMP)

...

Starting with the 6.4.0 release (

Status
colourBlue
titleSIMP 6.4
), SIMP has been retooled enough to safely support single-environment Puppetfile deployments (e.g., 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

  • Status
    colourGrey
    titleSIMP 5.0-6.3
     RPM scriptlets + simp_rpm_helper, some tools like simp config 
  • Status
    colourBlue
    titleSIMP 6.4
     The 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:

  • Status
    colourRed
    titleSIMP (ALL)
     Everything  "Secondary" data under /var/simp/environments/$environment/
  • Status
    colourRed
    titleSIMP (ALL)
     Everything under /var "Writable" data under under /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 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 

...