liveBook · Manning

Mutable infrastructure

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

Mutable infrastructure is an infrastructure-management approach in which resources are modified in place without being recreated or restarted.

Mutable infrastructure modifies an existing resource in place without recreating or restarting it. This can shorten change time, but it can also introduce configuration drift and compatibility failures. section 2.2 section 2.2.1

Upgrading Python on a server

A script can log into a server running Python 2 and upgrade it to Python 3 without restarting the server. If other packages depend on Python 2, replacing the server with compatible dependencies is safer. When an urgent in-place change is unavoidable, update version control afterward so the desired configuration matches the actual state. section 2.2 section 2.2.1

Figure 2.2 You treat the server mutably by logging in and updating the Python package version. By comparison, you treat the server immutably by replacing the old server with a new one upgraded to Python 3.

Compare an in-place Python update with replacing the server through immutable infrastructure. section 2.2

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Explains the definition, trade-offs, server scenario, and remediation step, but defers detailed implementation procedures.
Examples
Uses Python 2-to-3 server upgrades, package compatibility, and a mutable-versus-immutable infrastructure figure.
What it assumes
Assumes familiarity with servers, packages, infrastructure as code, and version control while defining mutable infrastructure explicitly.
What you can do after
Diagnose/debug with it by identifying risky in-place changes and reconciling actual state with version-controlled configuration.
How it connects
Connects mutable infrastructure to immutable infrastructure, infrastructure as code, configuration drift, version control, and idempotency.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.