Everything-as-Code

Save everything as code - configuration, infrastructure and pipelines
Contributed by

Donal Spring

Marcos Entenza

Published August 15, 2018
Collection
1

What Is Everything-as-Code?

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 Do Everything-as-Code?

  1. Traceability - storing your config in git implies 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.
  2. 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.
  3. Tested - Infra and code can be rolled out, validated and promoted into production environments with confidence and assurance it will behave as expected.
  4. 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.
  5. 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.

How to do Everything-as-Code?

  • Martin Fowler on Infra as Code.
  • Terraform is an infrastructure as code platform that can provision to AWS, Azure, Google Cloud, other clouds, or an on-premises datacenter. This infrastructure could include servers, databases, load balancers, caches, firewall settings, SSL certificates, queues, monitoring, subnet configurations, routing rules, and much more.
  • Ansible is an infrastructure automation tool created by Red Hat, the huge enterprise open source technology provider.

Look at Everything-as-Code

Links we love

Check out these great links which can help you dive a little deeper into running the Everything-as-Code practice with your team, customers or stakeholders.


Except where noted, content on this site is licensed under a Creative Commons Attribution 4.0 International license. This site is graciously hosted by Netlify