SIMP 6.4+: Design `simp environment` command

SIMP 6.4+: Design `simp environment` command

This article began as an artifact of https://simp-project.atlassian.net/browse/SIMP-6380.

It describes the simp environment new command (and others), proposed in the decision log SIMP 6.4+: The ISO installation/Puppetfile workflow.

Design lineage

This design has been informed by the mapping work in SIMP 6.4: Map old/new files and capabilities.

Terminology

This page uses terminology defined in the SIMP Environments article.

 

(Mockup:) simp environment COMMAND [OPTIONS]

Manage and coordinate SIMP omni-environments

Usage:

    simp environment COMMAND [OPTIONS]

Alias:

    simp env

A complete SIMP environment (often referred to as the SIMP "omni-environment")
has three distinct sources:

  * Puppet: Puppet code and data under $environmentpath/$environment/
  * Secondary: Environment-specific SIMP data (e.g, site_files/)
  * Writable: Env-specific SIMP data created during compile (e.g., passgen)

The Secondary and Writable environment are collectively referred to as the
SIMP "Extra" environment.

In order to compile the Puppet catalog, the Puppet server MUST be able to read
from all three environments, and it MUST be able to write to the Writable
environment. The Puppet and Secondary environment's assets MUST be available
_before_ compiling the catalog.

Files:

  /etc/simp/simp_cli.yaml

       Contains configurations for the simp cli command

simp environment new ENVIRONMENT [OPTIONS]


Create a new SIMP "Extra" (default) or "omni" environment

Usage:

    simp environment new ENVIRONMENT [OPTIONS]


By default, this command will:

  * create a new environment (–-skeleton)
  * raise an error if an environment directory already exists

It can create a complete SIMP omni-environment with --puppet-env

Examples:

     # Create a new development "extra" environment
     simp env new development

     # Link staging's Secondary and Writable env dirs to production
     simp env new staging --link production

     # Create a separate copy of production (will diverge over time)
     simp env new newprod --copy production

     # Create new omni environment, 
     simp env new local_prod --puppetfile


Options:

option

purpose

--skeleton

(default) Generate environments from skeleton templates.
Implies --puppetfile

--copy ENVIRONMENT

Copy assets from ENVIRONMENT

--link ENVIRONMENT

Symlink Secondary and Writeable environment directories
to ENVIRONMENT. If `--puppet-env` is set, the Puppet
environment will `--copy`.

Comments