The Twelve Factors | ||
---|---|---|
# | Factor | Description |
I | Codebase | Only one codebase stored in a version control system for a deployed service, with the resulting deployment artifact used for many deployments. |
II | Dependencies | All dependencies should be declared / included, with no reliance on system tools or libraries. |
III | Config | Configuration that varies between deployments should be stored in the environment, or in a centrally managed location. |
IV | Backing services | All backing services are treated as attached resources and attached and detached by the execution environment. |
V | Build, release, run | The delivery pipeline should strictly consist of build, test, deploy to test environment, release, run. |
VI | Processes | Applications should be deployed as one or more stateless application or service with persisted data stored on a backing service. |
VII | Port binding / Service discovery | Self-contained services should make themselves available to other services by specified ports or service discovery methods like DNS, centralised configuration manager. |
VIII | Concurrency | Concurrency is advocated by scaling individual service instances without having deadlock situations. |
IX | Disposability | Fast startup and shutdown capabilities for a more robust / resilient / scallable system. |
X | Dev/Prod parity | All environments should be as similar as possible, like OS / Hardware spec / Firewall / Security. If they are different then a configuration management system system should automate the configuration. |
XI | Logs | Applications should produce logs as event streams and leave the execution environment to aggregate. |
XII | Admin Processes | Any needed admin tasks should be kept in source control and packaged with the application or should allowed to be executed remotely using API or tools. |