Showing posts with label iac. Show all posts
Showing posts with label iac. Show all posts

Thursday, February 10, 2022

Infrastructure as Code (IaC)



Data Centres a.k.a DC:- is a location where the company has a collection of computers and servers.

FOR Virtual Machines:

The master server will have scripts to manage IaC on the host machines/agents (like dev server, prod server, UAT server,etc.)(VMs)

The configuration management tool has two methods/topology:

1. Pull based:- If host machines/agents machines send a request to execute script to master and then master creates an execution file and send it to agent machines for execution. The master will use pull based infrastructure tools such as: Puppet, Chef.

2. Push based:- Master decides on which agent machine the script is to be executed. The master will use push based infrastructure tools such as: Ansible, Terraform, Saltstack.

Manifest file:- system configuration

Benefits of IaC:

Main benefit: you are writing a script on a master server. For e.g a boss came to you and say can you install java in 1000 machines? If no IaC, you install it manually, you may forget to install on some machines. But with IaC, can install via a master server using infrastructure as a Code. When we change in master machine, all agents machine will change also.

In summary:

1. Automation with IaC

2. Managing agent machines’ infrastructure with the help of Master server’s configuration manifest file.

3. Change in the infrastructure is a matter of updating master’s manifest file.

4. Chances of errors/mistakes are low.


FOR cloud (AWS):

The infrastructure tools are Terraform (mainly), Ansible.

Fluentd

Open-source log data collector > why logs? - for compliance (auditing, company, business) - for security (transparency, monitoring, admin...