According to ITIL, “IT infrastructure” refers to the entire collection of hardware, software, networks, facilities, etc. (together with all information technology-related devices) needed to create, test, provide, monitor, control, or support IT services. It’s no secret that automation is a persistent, developing trend in IT.
Within the scope of a software development project, if you have a complex architecture, it requires an intense workforce to set up the servers, storage, and network for test/staging and production environments and make the necessary configurations on them, and repeat this constantly.
Thanks to cloud computing and virtualization, It is now possible to accomplish more with less manual involvement.
A DevOps technique called Infrastructure as a Code (IaC), often known as programmable infrastructure, streamlines, accelerates and makes it easier to manage your infrastructure. Infrastructure as code, or IaC, is the process of provisioning and managing infrastructure described by code as opposed to manually. For example, you can handle the following operations with IaC Tools.
- Virtual Server Provisioning
- Install Tools, Packages, SDKs, Frameworks, etc.
- Create users
- Configure Database Servers
- Configure Infrastructure (Load Balancers, Firewalls, etc.)
Reusability: You can quickly reuse a ready-made template according to the target system or platform and quickly raise your environment on the new platform.
Fast Provisioning: Automation is faster than Manual Intervention
Consistency: You might forget the steps in an installation scenario, but the infrastructure built with IaC will provide a more accurate and consistent installation
Version Control: Maintaining versions of each code snippet is important for change management. You can also version IaC code snippets and track the evolution of your infrastructure over time.
There are two common approaches to writing Infrastructure as Code
- Declarative Approach
- Imperative Approach The distinction between declarative, imperative, and intelligent approaches is ‘what’ vs ‘how’ vs ‘why.’
Declarative (functional): The declarative method specifies the target’s ideal configuration, or what the target’s desired state should be. There are no instructions about how to set up a server. Instead, a list of prerequisites or external software needed to set up the server or infrastructure is defined.
Imperative (Procedural): The imperative method specifies the orders that must be carried out in order to get the intended result. The imperative focuses on altering the infrastructure to achieve the desired outcome.
Also, these tools use two methods to manage the infrastructure
- Push: The server pushes the configuration to the target system
- Pull: The target system pulls the configuration from the server
We’ll look at a few IaC tools in an Amazon Web Services context in this post.
|Ansible||Red Hat||YAML||Declarative and imperative||Push|
|Puppet||Puppet||DSL||Declarative and imperative||Pull|
|Chef||Progress||DSL||Declarative and imperative||Pull|
|Terraform||Hashicorp||HCL/JSON||Declarative and imperative||Push|
|SaltStack||Thomas S Hatch||YAML||Declarative and imperative||Push and Pull|
|AWS CLoudFormation||Amazon||YAML/JSON||Declarative and imperative||Push|
We will be reviewing all these tools and looking at their details in later articles in the series.