Got it

Get to know about Infrastructure As Code

Latest reply: Apr 23, 2022 12:45:46 370 4 3 0 0

Introduction to IAC:

Infrastructure as code (IaC) is the management of stuff like networks, virtual machines, load balancers, and connection topologies in a way that is similar to how source code is managed. IaC also uses a versioning system that is similar to how source code is managed. Every time you make an application, the same source code will be used to make the same binary. In the same way, an IaC model creates the same environment every time it is used. People who work with DevOps use IaC a lot, and it is often used with continuous delivery.


Approaches for IAC:

Generally, Infrastructure As Code  is divided into two approaches:


It is also known as functional. The declarative approach is concerned with what the ultimate target configuration should be; The declarative approach specifies the desired state, and the system then performs the necessary actions to attain that state.


The imperative approach is concerned with how the infrastructure should be modified to achieve this. It can also be called procedural  The imperative specifies particular commands that must be executed in the proper order to get the desired result.

There are four broad categories of IAC tools:

·                     Ad hoc scripts

·                     Configuration management tools

·                     Server templating tools

·                     Server provisioning tools



Ad hoc scripts

In Adhoc scripting You break down whatever function you were doing manually into distinct parts, write each of those steps in code using your favorite scripting language (e.g., Bash, Ruby, Python), then run the script on your server. Ad hoc scripts allow you to use popular general-purpose programming languages and write code in whatever way you desire. The bad thing with ad hoc scripts is that you can write code in any popular general-purpose programming language.

Using a general-purpose programming language requires writing custom code for every activity, whereas IAC-specific tools provide simple APIs for complex tasks. On the other hand, general-purpose programming languages allow developers to express their creativity and use their tools. These issues are minor for an eight-line script that installs Apache but become major when managing dozens of servers, databases, load balancers, network configurations, etc.

it is hard to manage someone else's collection of unmaintainable ad hoc scripts. Ad hoc scripts are wonderful for little tasks, but if you want to manage your entire infrastructure as code, you need to use an IAC solution designed for the job.


Configuration Management Tools


Chef, Puppet, Ansible, and SaltStack are all configuration management tools, which means they're meant to help you install and manage software on your existing servers. Tools for managing large numbers of remote servers are known as configuration management tools. most Configuration management tools are idempotent.


Server Templating Tools

server templating tools make a "snapshot" of a server that includes everything from the operating system to the software to the files. In the next step, you can use a tool from IAC to install that image on all of your servers. Using server templating tools like Docker, Packer, and Vagrant as an alternative to configuration management has become more popular in the last few years. Instead of setting up a bunch of servers the same way by running the same code on each one

Immutable infrastructure requires server templating. This principle comes from functional programming, where variables are immutable, meaning that once set, they can never be changed. Create a new variable to update something. It's easier to reason about code when variables don't change.

Immutable infrastructure works similarly: once deployed, a server is never changed again. You produce a fresh image from your server template and deploy it on a new server if you need to update something.

Server provisioning Tools

Server provisioning tools like Terraform, CloudFormation, and OpenStack Heat are used to build the servers themselves. Configuration management and server templating tools are used to set up the code that runs on each server. It turns out that you can use provisioning tools to do more than just set up servers. You can also use them to set up databases, load-balancers, queues, monitors, subnets and firewalls, routing rules, SSL certificates, and almost everything else in your infrastructure.


IAC has a variety of benefits which includes saving time to test failover without causing production disruptions, IaC also aids in the tracking of audit infrastructure changes. Commits to your Git repository reflect who, when, and why changes were made because your infrastructure is represented in code. You'll be able to examine the code and understand how environments are created, what's going on, and why. because everything is documented fewer efforts are put into training the subject matter expert and it can be reused by others using the comments to aid them.





  • x
  • convention:

Moderator Created Apr 23, 2022 12:23:12

Thanks for Sharing
View more
  • x
  • convention:

MahMush Created Apr 25, 2022 19:21:25 (0) (0)
Hope you get good information  
Moderator Created Apr 23, 2022 12:45:46

learned about Infrastructure as code Get to know about Infrastructure As Code-4871705-1
View more
  • x
  • convention:

MahMush Created Apr 25, 2022 19:20:40 (0) (0)
Learning about new terms is fun  


You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits


Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.