In this video, we will have a quick introduction of Ansible.
We'll find out what Ansible is.
Ansible is an open source software provisioning, configuration management and application deployment
tool enabling infrastructure as code.
It runs on many Unix Unix like systems and can configure both Unix like systems as well as Microsoft
Windows.
And that's the exact definition that we have from Wikipedia.
So to put it in a simple words or I would say my definition, Ansible is basically a free automation
tool that can automate it tasks on local machine where Ansible is running and on remote machine.
So anything that you wanted to automate like a regular daily tasks for your IT needs, you could use
Ansible to automate that.
All right.
So let's visualize it and understand exactly the purpose or how Ansible works.
So let's say if you have a Linux machine or a Windows machine and you wanted to configure Apache in
IT or NTP server or anything that you want to configure.
So what do you do?
You log into that machine as a session to it and configure it.
Beautiful.
What if you have two machines?
Well, you could do the same thing, log in and configure it.
And if you have three machines again, you can log into the third machine, ssh into it and configure
it.
All right.
That works in a smaller environment.
Now, what if you have three, six, nine, 12 thousands or thousands of machines, for example, in
a larger environment, are you going to log into every single machine if you have to change a configuration
on or similar configuration on all of them?
No.
Right.
It would be very cumbersome and it will take you a lot of time to log into every single machine and
make that change.
That's where you create an Ansible server or that's where the Ansible tool is born.
So you set up an Ansible server, which is also known as a control node.
You install the Ansible software onto that machine, then you log into that machine using S-H the same
way you will log into any Linux machine, and then you make the change to a configuration file on that
control node and then push that configuration to all the different nodes or make the change to all the
configuration of all the machines.
See how easy it becomes when you do that through one server.
Please note Ansible is written in Python language, but it does not mean you need Python knowledge to
use Ansible because Ansible has provided a very easy language to use to automate your task, which we'll
cover later on.
All right.
Ansible can be used to provisioned system, meaning you could actually build systems from scratch using
Ansible.
Ansible is also used to configure those systems.
Now you have the operating system build.
A system is ready.
Now you have to configure the system, meaning services or which way you want your system to work.
Once that is done, then you could deploy applications as well.
Let's say if you have to install Apache application or SAP application or database on your system,
then you could deploy those applications using Ansible.
Once those are deployed, it doesn't end here.
You could manage those systems and applications using Ansible.
So if you have to upgrade your system, for example, six months from now or after the deployment,
then you could use Ansible to do that.
Now let's take a look at a few examples of the tasks that can be automated.
Using Ansible provisioning, which we have already have talked about, you could actually provision
your bare metal server, virtualization systems, network devices, storage system, cloud platform.
Also you could do system configuration, as I mentioned.
What are the examples of system configurations such as updates or upgrades, package installation,
a service configuration, stop, start restart of any services that can be done using Ansible users
and groups, you could create one user on one server, or you could create that same user to multiple
servers at the same time.
Assigning permissions to files and directories.
Moving on, you could use application deployment backups weekly or monthly system reboots.
Orchestration.
What is orchestration?
Orchestration is a way of automating your system step by step in a specific order.
So let's take an example of e commerce and e commerce.
You have to have application setup, database setup and Web services.
So you could actually let the system know through orchestration.
And that orchestration wraps around Ansible that it should reboot or restart application services,
database services, and then it should start the Web services.
Everything happens in a certain order.
That is an orchestration that you could actually have that within Ansible to handle it.
So that's how Ansible works or.
Quick overview of Ansible.
In this video, we will cover a brief history of Ansible.
The Ansible project was started in 2012 by Michael de Haan.
It is an open source and community driven and I'm sure you know the open source and the community driven.
When people get together from different part of the world toward one goal, to build a tool and open
source is you could build your own code and add that to that tool to enhance features.
Then Ansible Incorporation was purchased by Red Hat in 2015.
When it's purchased even today, it is still open source but certain part or certain features of it.
Say if Ansible can be purchased from RedHat such as Ansible Tower, or if you need a subscription for
support or consulting that you could buy from RedHat, it is available from for most of the Linux distributions,
such as Red Hat, Santos, Fedora, a Bantu, Debian and sushi.
Now Ansible can only be installed.
The engine itself can only be installed on Linux systems.
You cannot install on Windows servers.
However, you could manage and automate Windows Systems task using Ansible.
All right.
Let's take a quick look at the need of Ansible once again, very fast.
Infrastructure management, especially the virtualization, when we have thousands of thousand virtual
machines and we build the virtual machines in a very fast, fast way, you don't want to build them
manually.
It becomes cumbersome and tedious.
That's when you use ansible configuration management for system and application multi-tier application
automation like orchestration, single point of automation.
Meaning if you have a one server like Ansible, you could change everything on that server and then
push it out to all the rest of the world or meaning rest of the virtual machines.