|
Q. What is Infrastructure as Code?
A. Infrastructure as code (IaC) is the process of provisioning and managing resources in public clouds such as AWS, GCP, and Azure via a set of editable text files that describe how and where infrastructure resource configurations are deployed.
These input scripts are ingested by Infrastructure as Code tools which then automatically create, update, or delete resources to ensure that the cloud infrastructure complies with the state defined in the IaC file. IaC tools are designed to manage the implicit and explicit dependencies between cloud infrastructure resources so that the creation, maintenance, and removal of resources is performed logically and takes into account these resource dependencies.
Before Infrastructure as Code (IaC) existed, resources were typically provisioned manually or, at best, through simple scripts like shell scripts or Python. Configuration management tools were very efficient when it came to configuring an instance once it was up and running, but had a gap in the ability to create the instance in the first place.
IaC emerged to help bridge this gap by automating resource provisioning and thus move away from snowflake servers. What the hell is a snowflake server? Well, it can be finicky business to keep a production server running. You have to ensure the operating system and any other dependent software is properly patched to keep it up to date. Hosted applications need to be upgraded regularly. Configuration changes are regularly needed to tweak the environment so that it runs efficiently and communicates properly with other systems. This requires some mix of command-line invocations, jumping between GUI screens, and editing text files.
The result is a unique snowflake - good for a ski resort, bad for a data center.
The introduction of high-level declarative languages to define a desired state, along with the IaC tools that automatically implemented those declarations, was a big leap forward within the industry.
Infrastructure as code (IaC) brought many benefits, among them:
- Speed and standardization: Allowing your desired state to be written in scripts for perfect reproducibility.
- Version control: Enabling these scripts to be saved in Git, thus allowing you to maintain a history of your infrastructure, as with application code.
- Documentation: Allowing the scripts to serve as documentation and a single source of truth.
- Efficiency: Extending the possibility of continuous deployments to the provisioning and management of the resources themselves.
The three major public cloud providers all offer their own custom IaC solutions, which work only for their own respective platforms:
- Amazon Web Services offers AWS CloudFormation.
- Microsoft Azure’s platform is the Azure Resource Manager.
- Google Cloud Platform uses Google Cloud Deployment Manager.
Terraform is the most widely used cloud-independent IaC software and offers the advantage of supporting many cloud vendors.
The automated configuration management software vendors, including Puppet, Chef, and Ansible, have also been working to expand their capabilities and today, offer some level of support for creating, updating, and deleting resources in public clouds. However, they were not designed as IaC from the ground up.
Hope this helps!
Cheers!
|