environment
One place where a copy of the application runs with its own config, such as development, staging or production.
In more detail
Environment configuration is supplied at deploy time, so the same artifact can move from one environment to the next. The twelve-factor app warns against grouping config into named environments, because the groups multiply as staging, demo and per-developer environments appear.
Example
In Terraform: Terraform supports several environments by feeding different variable values into one configuration, and by keeping each environment's state separate. Copying the directory per environment makes them drift apart. Short-lived, or ephemeral, environments are only practical because destroy is reliable.Related terms
- staging — A pre-production environment set up like production, where changes are tried out before they reach real users.
- production — The live environment where real users use the service, as opposed to development or testing.
- config — Everything about an application that varies between deploys, such as database addresses, credentials and hostnames.
- artifact promotion — Moving the exact artifact that passed testing on to the next environment, instead of building it again.
- input variable — A named, typed value a configuration or module takes from outside, declared in a variable block and read as var.<name>.
- Terraform workspace — A named, separate state within one backend, so the same configuration can manage several copies of its infrastructure.
- teardown — Removing or releasing everything that was set up for a piece of work, from a test's open connections to a whole temporary environment, once it is no longer needed.
Taught in
- Config And Backing Services — DevOps & Site Reliability Engineering
- Building And Versioning The Artifact — DevOps & Site Reliability Engineering
- Deployment Strategies: Blue Green — DevOps & Site Reliability Engineering
- Infrastructure As Code Context — DevOps & Site Reliability Engineering
- Containers And Orchestration Context — DevOps & Site Reliability Engineering
- Tearing It Down With Destroy — Infrastructure as Code with Terraform
- Parameterising With Input Variables — Infrastructure as Code with Terraform
- Calling Your Module And Passing Variables — Infrastructure as Code with Terraform
- Workspaces For Multiple Environments — Infrastructure as Code with Terraform
- Infrastructure As Code, And One Workflow For Every Platform — HashiCorp Terraform Associate (004) Exam Prep
- Providers: How Terraform Reaches Every API — HashiCorp Terraform Associate (004) Exam Prep
- Resources, Data Sources And The References Between Them — HashiCorp Terraform Associate (004) Exam Prep
- Input Variables, Outputs, And Which Value Wins — HashiCorp Terraform Associate (004) Exam Prep
- Sensitive Data, Ephemeral Values And Secrets From Vault — HashiCorp Terraform Associate (004) Exam Prep
- The Local Backend, And Workspaces On One Machine — HashiCorp Terraform Associate (004) Exam Prep
- State Locking: One Writer At A Time — HashiCorp Terraform Associate (004) Exam Prep
- Remote State With The Backend Block — HashiCorp Terraform Associate (004) Exam Prep
References
- The Twelve-Factor App: III. Config
- GitHub Docs: managing environments for deployment
- Workspaces: when to use them