What is it?
Everything as Code is the practice of treating all parts of the system as code. This means, storing configuration along with Source Code in a repository such as git or svn. Storing the configuration from bottom to top (communication switches, bare metal servers, operating systems, build configurations, application properties and deployment configurations…) as code means they are tracked and can be recreated at the click of a button.
Everything as Code includes system design, also stored as code. In old world IT, infrastructure required specialised skills and physical hardware and cables to be installed. Systems were precious or were not touched / updated often as the people who created them no longer work for the company. The dawn of cloud computing and cloud native applications has meant it is cheap and easy to spin up virtual infrastructure. By storing the configuration of virtual environments as code, they can be life-cycled and recreated whenever needed.
Why store all things as code?
- Traceability - storing your config in
gitimplies controls are in place to track who / why a config has changed. Changes can be applied and reverted and are tracked to a single user who made the change.
- Repeatable - moving from one cloud provider to another should be simple in modern application development. Picking a deployment target should be like shopping around for the best price that week. By storing all things as code, systems can be re-created in moments in various providers.
- Tested - Infra and code can be rolled out, validated and promoted into production environments with confidence and assurance it will behave as expected.
- Phoenix server - No more fear of a servers’ configuration drifting. If a server needs to be patched or randomly dies, it’s OK. Just create it again from the stored configuration.
- Shared understanding - When a cross-functional team is using ‘Everything as Code’ to describe all the parts of the Product they are developing together, they contribute to increase the shared understanding between Developers and Operations, they speak same language to describe the state of this Product and they use the same frameworks to accomplish their goals.