This is first post in this series where different tools and technologies are discussed under this domain. So lets get things straight, what exactly is IaC?
Infrastructure as code (IaC) is the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. The IT infrastructure managed by this comprises both physical equipment such as bare-metal servers as well as virtual machines and associated configuration resources. The definitions may be in a version control system. It can use either scripts or declarative definitions, rather than manual processes, but the term is more often used to promote declarative approaches.https://en.wikipedia.org/wiki/Infrastructure_as_code
Infrastructure as code, also referred to as IaC, is a type of IT setup wherein developers or operations teams automatically manage and provision the technology stack for an application through software, rather than using a manual process to configure discrete hardware devices and operating systems.https://searchitoperations.techtarget.com/definition/Infrastructure-as-Code-IAC
From these definitions we can conclude that IaC is basically a DSL (Domain Specific Language) that describes IT infrastructure in terms of hardware as well as software through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. Infrastructure as code is also referred to as programmable or software-defined infrastructure.
In today's world lines between technology domains are blurred first by introduction of WWW and now the introduction of cloud technologies. Managing applications and infrastructure is a challenge for both developers and operations teams. IaC is a fresh air in this scenario, where configuration is defined in terms of dependencies needed to deploy an application.
IaC concept is new but technologies that enable this concept are not new. Scripts and scripting languages are at the core of this concept. Scripts made automating IT processes a breeze in near past and even heavily used today. Containers/jails are becoming more popular these days and paving way for programmable application virtualization environments. Modern tools like Docker made this application virtualization a breeze and tools like 'ansible', 'chef' and 'puppet' made trivial to orchestrate infrastructure provisioning. An intriguing fact is that we are still talking about a single machine or container and our application have already been spun out of realm of a single machine.
Modern cloud infrastructures are mixture of physical and logical machines of hardware to hyper-visor to kernel based virtual machines to containers. Managing and offering services with these technologies as service provider and consuming these services as SaaS, PaaS etc. require lot of planning and do diligence. Now here comes IaC to rescue and opens up new horizons where infrastructure is available as code :)
Introduction of IaC can yield following benefits;
- Versioning of infrastructure same like application code
- Continuous integration and Deployment (CI/CD)
- Application Virtualization
- Predictable and controlled scaling up/down
- Cost reduction
Despite its benefits, infrastructure as code has its own potential cons.
- Requires additional tools i.e. more resources, learning curve etc.
- Configuration Drift
- May require new policies and procedures if you're big enterprise