Saturday, April 11, 2020

Ansible Tool Introduction

                                                                                                                                   Next

What is Configuration Management? (Applicable to any CM tools)

Configuration Management (CM) is a systems engineering process for establishing and maintaining the following activities
 
  • Package installation (we have to install packages for multiple servers)
  • Configuration of servers
  • Application deployment
  • Continuous testing of already installed application
  • Provisioning (Provisioning means providing or making something available in Servers based on requirement)
  • Orchestration (Controlling multiple nodes from central location)
  • Automation of tasks

What is Ansible ?

Ansible is an Open Source tool, used as a “Configuration Management System” designed to control a large number of servers. It is used to deploy applications and provision software. Easy to use for systems administrators and DevOps teams. It allows DevOps teams to control many different nodes or systems from a central ansible server.

  • Ansible is radically simple IT automation platform that makes your applications and systems easier to deploy.
  • Ansible have the core component named Master, no need to install agent because ansible is agentless.
  • Ansible Master will controls the server infrastructure (For multiple nodes).
  • Ansible uses ssh connection between Master and Client Nodes.
  • Ansible uses push model(puppet and chef uses pull model).
  • If it is push model the configurations what we prepared at master it can directly pushed to multiple nodes.
  • Large number of ready to use modules for system management     Ex: ping, setup, apt, yum, and many more module service are ready to use modules)
  • Custom modules can be added if need (we can use existing modules or else we create our own modules)
  • Last but not least Simple and Human readable.

Ansible Architecture

Ansible Architecture



Ansible Terminologies

  • Ansible (Ansible Master)
  • Host Inventory (It contains all node IP addresses)
  • Playbooks (The scripts we develop for small tasks are playbooks)
  • Core Modules (Predefined Modules)
  • Custom Modules (We can design our own custom modules-user defined )
  • Plugins
  • Connection Plugins (Through connection plugins we can connect to multiple nodes)
Controller machine Or Ansible Master

           The controller machine is known as the Ansible Master, where Ansible is installed and configured is referred to as an Ansible Master or Controller Machine. The controller server will do the orchestration work for the respective client nodes.

Host Inventory
          
           Inventory is nothing more than a list of the server IP addresses that contains all node IP’s. By adding a node IP in the inventory file we can deploy the applications to the nodes through an SSH Connection.

Module

            A module is a Fundamental unit in Ansible. It is also referred to as “Task Plugins” or ” Library Plugins”.  Modules can be used in two ways:
                           i.   Ad-hoc Commands
                           ii.  Playbooks

Tasks

            A task is a single procedure or work to be executed, installed or configured in the process.

Playbooks

            Playbooks are a set of tasks written in python/YAML scripting languages. There are different sections in the ansible playbook:
                   i. Ansible Tasks
                   ii. Ansible Variables
                   iii. Ansible Handlers
                   iv. Ansible Templates
                   v. Ansible Files



No comments:

Post a Comment

Featured Post

Ansible Tool Introduction

                                                                                                                                    Next ...