Environments
A non-production environment earns its cost by being wrong in the same ways production is.
The purpose of an environment that is not production is to be wrong in exactly the ways production is wrong. Where the two drift — a different database version, a variable set in one and not the other, a service stubbed out because wiring it up was tedious — testing stops predicting anything and starts manufacturing confidence instead.
Parity is maintained on the things that actually differ in behavior: the version of the platform underneath, the database engine and its version, the presence of every configuration value, and the outside services being real rather than simulated. Parity on machine size matters far less and is frequently not worth paying for.
Configuration differs between environments only in values, never in shape. Where the live system reads a value the test system does not have at all, the difference surfaces as an error in front of a customer, because that is the first time the path is exercised.
Non-production environments are suppressed from search engines by a mechanism that cannot survive promotion. Suppression written into a committed file travels with the code to production and quietly keeps the live site out of every index for months; suppression driven by a configuration value disappears when the value does, which is the correct direction for the failure to point.
Test data is realistic in shape and never a copy of live personal data. A test system holding real customer records is a live system with weaker access control and less attention paid to it, which is a description of where breaches happen.
Every environment has an owner and a stated purpose, and ones that no longer have either are shut down. Long-lived environments created for a single piece of work are where forgotten credentials, unpatched software, and copies of old data accumulate out of view.
Access differs by environment deliberately. Broad access to a test system is useful and cheap; the same access to production is neither, and collapsing them because it is convenient removes the only boundary that was doing anything.
Secrets are per-environment and never shared across them. A key that works in both means a compromise of the weaker one is a compromise of the stronger one, which defeats the reason for having two.
Where a full second environment cannot be justified — and for a small site it frequently cannot — that is said plainly rather than papered over with something that exists but is never kept current. A stale test environment is worse than none, because it produces results people believe.
What this does not cover.
- Copies of live personal data in non-production environments.
- Search-engine suppression by a mechanism that survives promotion to production.
- Maintaining a test environment that is not kept at parity with the live one.
Managed Services & Infrastructure
Releasing changes
The commit that was built is verified by its identifier, and the release is verified against the live address instead of against a build status.
Backup and recovery
A backup nobody has restored is a belief; recovery time is measured by performing it, not estimated from the size of the file.
Monitoring
Watching the things a business would actually notice losing, rather than the things that are easy to graph.
Keeping software current
Few enough third-party components that keeping them current stays possible three years after launch.
Ownership and access
The domain, the payment account and the cloud accounts are the client's; handover is a transfer of access, not a negotiation.
Coverage and response
Stated hours, not implied availability, because a commitment is only worth what somebody can plan around.