non-production-like environments

We manage non-production-like environments differently from production-like environments. Where production-like environments need management to ensure that only trusted code is deployed, our non-production-like branches are hampered by these same protections. 

The primary goal of these non-production-like branches is to facilitate rapid code deployment and testing cycles. Patterns like protected branches and governance policies intentionally slow development to add stability, and should not be used on these Wild-West Style development branches.

The two most common examples of non-production-like environments are Puppet staging environments and feature-branches. Puppet staging environments are built to allow all Puppet users to integrate and test changes in a single environment, prior to shipping code to a production-like environment.

If your organization needs a staging environment, you should only use a single staging environment, as merging between multiple staging environments can be difficult. Feature-branches are built exclusively to build and test new code in isolation, before sending it to staging, or directly to a production-like branch in absence of a staging environment, for organizations with robust CI/CD practices. We want to minimize overhead on these branches, to facilitate asynchronous code commits and testing without needing a trusted agent to approve every change.

A common workflow to develop Puppet code in environments at larger organizations is as follows:

  • Clone the control repository
  • Check out a new branch, based on the branch that you intend to make changes to (usually staging)

  • Add one or more nodes to this environment via the PE console, or set the environment in the agents puppet.conf
  • Iterate over code: write code and test it
  • Merge your code with the staging environment and delete the short-lived branch
  • Promote the staging environment through the multiple levels of production-like branches

With these concepts in mind, let's inspect what's contained inside of a Puppet control repository.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.162.51