chapter three

3 Environment Management

 

This chapter covers:

  • What is an environment?
  • Designing the “right for me” environment using namespaces
  • How to organize your Git repo/branching strategy to support your environment
  • How to implement Config Management for your environment

3.1       Introduction to Environment Management

In software deployment, an environment is where code is deployed and executed. Different environments serve different purposes in the life cycle of software development. For example, a development environment (aka laptop) is where engineers can create, test, and debug new versions of code. After engineers complete the code development, the next step is to commit the changes to Git and kick off a deployment to additional environments for integration testing and eventual production release. This process is known as Continuous Integration/Continuous Deployment (CI/CD) that typically consists of the following environments.

The QA environment is where the new code will be tested against hardware, data, and other production-like dependencies to ensure the correctness of your service. If all tests pass in QA, the new code will be promoted to the E2E environment as a stable environment for other pre-release services to test/integrate with. QA and E2E environments are also known as pre-production (pre-prod) environments because they do not host production traffic or use production data.

3.1.1   Components of an environment

3.1.2   Namespace Management

3.1.3   Network isolation

3.1.4   Pre-prod and Prod Clusters

3.2       Git Strategies

3.2.1   Single branch (multiple directories)

3.2.2   Multiple branches

3.2.3   Multiple repos vs. Monorepo

3.3       Configuration Management

3.3.1   Helm

3.3.2   Kustomize

3.3.3   Jsonnet

3.3.4   Configuration Management Summary

3.4       Durable vs. Ephemeral Environments

3.5       Summary