Benefits of Infrastructure as Code

Tom Lewis / May 28, 2019

In the past few years, cloud computing has completely changed how companies build, scale, and maintain workloads. The ability to quickly provision networking, storage, and compute resources has resulted in the highest developer productivity ever seen.  The companies enjoying the highest productivity are simultaneously adopting cloud and DevOps practices facilitated by Infrastructure as Code (”IaC”).  IaC is made possible by the API-driven nature of cloud service provisioning and configuration, and is a critical part of unifying infrastructure operations and software engineering.  But, many companies lack the familiarity and skillsets in IaC to be successful.  The first step for any company in adopting an IaC operating model is to understand the business benefits of IaC so that the consensus exists to build the skills, establish the processes, and adopt the tools

What is Infrastructure as Code?

IaC, is a method of provisioning and managing IT infrastructure through the use of source code, rather than by using manual processes and standard operating procedures. With IaC, developers and operations teams automatically manage the tech stack for an application through software, helping to configure and deploy these components quickly and consistently.

Key Benefits of Infrastructure as Code

Increased speed and efficiency

IaC allows you to spin up an entire infrastructure architecture, not only running virtual servers, but also launching storage systems, network infrastructure, databases, and other cloud services, as well. The code used to create production environments can be used to quickly create high-fidelity development, testing and staging environments in minutes.

Because security and other enterprise standards are established in the infrastructure code, developers have independence to move more rapidly.  In addition, testing can occur in separate staging environments simultaneously. IaC also offers the opportunity to introduce Continuous Integration and Continuous Deployment techniques, further reducing the issues of human error and increasing speed.

Enhanced security

If all compute, storage, and networking services are provisioned with code, then they are deployed the same way every time. This means that security standards can be easily and consistently deployed across an enterprise without having to have a security gatekeeper review and approve every change.

Reduced risk

Adopting IaC means very low cost disaster recovery. As production environments are reduced to code and deployed on AWS, that code can be used to provision a new production environment in a different AWS region without having to pay for any standby failover environments.

Another instance of reduced risk is the case of employee turnover. Should a lead engineer leave the company, the institutional knowledge doesn’t have to completely go with them. IaC serves as a form of documentation of the correct way to represent infrastructure, providing a transparent record of changes made to configurations. As code can be version-controlled, IaC ensures any change to the service configuration is documented through the version control process.

Improved customer experience

When infrastructure is deployed with code, all the same disciplines and quality gates that are used to manage code (code reviews, versioning. etc) can be applied to infrastructure services. This leads to fewer errors and less overall downtime, thus improving the entire customer experience.

Straightforward compliance

One of the critical pieces of an IaC operating model is that little or no access to production is given to humans.  Changes to production are made by machines running versioned code.  If no humans are touching production, then the production change logs are 1) the versioning history of the infrastructure code, and 2) the machine logs of the machines on which the code was executed to provision the infrastructure.  3) centralized logs of api calls on the cloud platform  When an auditor can quickly see the history of change, confidence rises and audits go much more quickly.

Cost savings

Thanks to automation, engineers spend less time performing repetitive, manual work and more on higher-value tasks.   Another added advantage is that the spinning down of unused resources and environments can be automated, decreasing cloud computing costs and other maintenance expenses.  But, the largest hard cost savings usually comes from the ability to have high-fidelity development, testing, staging and failover environments when needed without having to pay for them when they are not in use.

Infrastructure as Code Challenges

The biggest challenge for any organization adopting IaC is undoubtedly culture change and learning curve.  People tend to do what they are comfortable doing, and asking them to learn new skills and to think differently takes effort.  Getting people to understand that making a manual patch or update to production is actually creating technical debt for the organization is a sea change in thinking.  But, the minute a manual change is made, the code no longer represents a high-fidelity copy of production. Therefore, in a failover scenario the code can no longer successfully be used to deploy the existing production environment.  Nor can it be used to deploy high-fidelity development, test and staging environments.  Developing the skills, process discipline, and tools to change the code first and then apply the new code to production takes time.  But, in the end, the benefits of infrastructure as code are certainly worth the effort.

Need Help Getting There?

Cloud maturity is a journey–not a state of being.  Every company starts somewhere.  Many companies are moving more quickly with fewer mistakes along the journey by using an embedded Blue Sentry Managed Cloud Center of Excellence(“CCoE”).  This service begins with your commitments to platforms, strategies, security frameworks, etc; translates them into cloud best practice; and reduces them to code. The CCoE then works with your team to build skills sets, select tools and establish good DevOps operational process including IaC.  To learn more, contact us today!