Monday, January 06, 2020

Ansible IT automation Engine

Ansible is IT automation provisioning tool. It is used for Orchestra :- for maintain Sequence of S/W installation, Configuration management:-to maintain all the system are maintained in consistent desired stage other tool used for the same is puppet and chef, in Provisioning :- Software installation on many other system at the same time , and Deploy :- To deploy the S/W packages.
To understand Ansible it is mandate to know how ansible work and what is ansible architecture
Ansible architecture:-
Ansible is software/automation engine that need to be installed. The machine on which we installed ansible is called as Controller machine or local machine. Additional all the other machine on which we connect using ansible and execute our code/module are called client machine or host machine When we deploy ansible we get following items
1- Ansible Automation Engine:- This is the base of ansbile. All the functionality which we execute using ansible is control by this engine.
2- Inventory - This is the simple file which contain the list of host on which we want to connect from ansible using ssh, kerberos, plugin etc and execute module.
3- Playbook:- IT is the collection of Play which in terns is a collection of Task and it contains modules, API and plugins.As stated above it is written in YAML language and is collection of plays and task. In YAML we have HOST, variables, Task and handlers
3- Modules - this are the core part of the ansible. This contains files written in YAML- yet another mark up language and is responsible for execution the code written in it on client machine. Once the code is executed module from the client machine is removed by the Ansible engine.
In short If Ansible modules are the tools in your workshop, playbooks are your instruction manuals, and your inventory of hosts are your raw material.
4- API - This is the API which is generally used when we want Ansible to be executed by another language rather than plan old prompt. i.e. using API we can execute Ansible from python.This API enables us to use Ansible programmatically through Python.
5- Plugin - Plugin is special type of module. it is of type like action plugin , cache plugin, connection plugin (used to connect Docker directly) and callback plugin. Best use of action plugin is lets say we want to execute something on control machine before execution module on the client machine this can be done using action plugin. We can also build out our plugin.

Advantage of Ansible
Agentless:- Nothing is required to install on client machine.
Idempotent:-Same thing run always same without any error.
Simple:- Written in YAML and hence similar to english language to understand
Automated reporting:- Provide reporting of all jobs run for audit purpose.
Flexible:- Easy to install and scalable with any system.
Efficient:- As nothing is installed on client so space utilization is good and highly secure and speedy

Ansible

No comments: