Introduction to Infrastructure as Code
Infrastructure as Code (IaC) is a method that’s used to provision and manage infrastructure details and configurations as software code and make changes inside the code instead of changing the infrastructure whenever required. There are many dedicated tools and software for IaC, including Ansible. Instead of manually deploying the infrastructure components, such as virtual machines, storage, network, policies, and so on, it is possible to develop IaC and use tools to deploy the infrastructure automatically. The following diagram shows some typical IaC components regarding the following:
- Infrastructure component details will be stored as code in a specific format (for example, YAML playbooks).
- IaC tools (for example, Ansible) will create and manage the infrastructure component in the private or public cloud based on the infrastructure code:
Figure 7.1 – Typical Infrastructure as Code components...