Imagine you arrive at work on a Monday morning looking forward to a productive week. Instead, you’re given the task of setting up a server in multiple environments. You must also cater for the necessary infrastructure required by your application.
Your checklist of things to consider and remember looks something like this:
- What software should be installed?
- What versions of the software are required?
- How does it all need to be configured?
- What specific criteria are required for the infrastructure?
- For example, the server has a minimum memory requirement or needs to be in a certain subnet.
By now you’re probably thinking that this sounds like the start of a terribly painful couple of days. Using the manual approach, this could take you all week to complete. Once complete, you wait with baited breath, hoping that everything will work correctly.
But can’t you just use scripts achieve this?
Scripts are primarily used to automate the same set of steps multiple times on different servers. Infrastructure as Code (IaC) is more than just that. IaC entails writing code to simplify, not only the configuration of your servers but also, the initial set up and the creation of the necessary servers, network infrastructure, load balancers, and so on. Furthermore, programmable infrastructure should be treated the same as programmable software and should use design patterns, be tested, have code reviews, etc.
IaC is a methodology
It’s important to note that IaC is not a product, it’s a methodology, and there are various ways of implementing the methodology. Since Symbiotics is an AWS partner we will be focusing this discussion on Infrastructure as Code with AWS CloudFormation.
The advantages for using AWS CloudFormation can be found on the official AWS CloudFormation documentation page.
Why you would want to use Infrastructure as Code?
The IaC methodology is ideal because:
- You create a repeatable method for creating and configuring your infrastructure.
- It is automated which reduces the time taken for the infrastructure creation/setup process.
- Rapid deployment: Infrastructure can be changed quickly and easily.
- Developers do not have to wait days, weeks or even months for new infrastructure to be provisioned.
- The code can be placed under version control.
Stay tuned for part 2 of this blog post which will discuss specific examples of how we, at Symbiotics, use AWS CloudFormation.