1 00:00:01,040 --> 00:00:04,280 In this video, we will have a quick introduction of Ansible. 2 00:00:04,310 --> 00:00:07,250 We'll find out what Ansible is. 3 00:00:08,120 --> 00:00:14,720 Ansible is an open source software provisioning, configuration management and application deployment 4 00:00:14,720 --> 00:00:18,740 tool enabling infrastructure as code. 5 00:00:18,830 --> 00:00:26,210 It runs on many Unix Unix like systems and can configure both Unix like systems as well as Microsoft 6 00:00:26,210 --> 00:00:27,080 Windows. 7 00:00:27,200 --> 00:00:31,790 And that's the exact definition that we have from Wikipedia. 8 00:00:31,790 --> 00:00:40,970 So to put it in a simple words or I would say my definition, Ansible is basically a free automation 9 00:00:40,970 --> 00:00:50,180 tool that can automate it tasks on local machine where Ansible is running and on remote machine. 10 00:00:50,300 --> 00:00:56,960 So anything that you wanted to automate like a regular daily tasks for your IT needs, you could use 11 00:00:56,960 --> 00:00:59,300 Ansible to automate that. 12 00:01:00,140 --> 00:01:00,650 All right. 13 00:01:00,650 --> 00:01:06,110 So let's visualize it and understand exactly the purpose or how Ansible works. 14 00:01:06,110 --> 00:01:13,700 So let's say if you have a Linux machine or a Windows machine and you wanted to configure Apache in 15 00:01:13,700 --> 00:01:17,630 IT or NTP server or anything that you want to configure. 16 00:01:17,630 --> 00:01:18,500 So what do you do? 17 00:01:18,530 --> 00:01:22,130 You log into that machine as a session to it and configure it. 18 00:01:22,220 --> 00:01:22,970 Beautiful. 19 00:01:23,000 --> 00:01:25,000 What if you have two machines? 20 00:01:25,010 --> 00:01:28,220 Well, you could do the same thing, log in and configure it. 21 00:01:28,220 --> 00:01:34,190 And if you have three machines again, you can log into the third machine, ssh into it and configure 22 00:01:34,190 --> 00:01:34,520 it. 23 00:01:34,520 --> 00:01:34,880 All right. 24 00:01:34,880 --> 00:01:38,690 That works in a smaller environment. 25 00:01:38,930 --> 00:01:47,990 Now, what if you have three, six, nine, 12 thousands or thousands of machines, for example, in 26 00:01:47,990 --> 00:01:57,140 a larger environment, are you going to log into every single machine if you have to change a configuration 27 00:01:57,140 --> 00:02:00,230 on or similar configuration on all of them? 28 00:02:00,680 --> 00:02:01,190 No. 29 00:02:01,190 --> 00:02:01,670 Right. 30 00:02:01,670 --> 00:02:09,020 It would be very cumbersome and it will take you a lot of time to log into every single machine and 31 00:02:09,020 --> 00:02:10,460 make that change. 32 00:02:11,390 --> 00:02:18,950 That's where you create an Ansible server or that's where the Ansible tool is born. 33 00:02:19,130 --> 00:02:24,500 So you set up an Ansible server, which is also known as a control node. 34 00:02:24,500 --> 00:02:34,160 You install the Ansible software onto that machine, then you log into that machine using S-H the same 35 00:02:34,160 --> 00:02:40,820 way you will log into any Linux machine, and then you make the change to a configuration file on that 36 00:02:40,820 --> 00:02:51,020 control node and then push that configuration to all the different nodes or make the change to all the 37 00:02:51,020 --> 00:02:53,090 configuration of all the machines. 38 00:02:53,540 --> 00:02:58,190 See how easy it becomes when you do that through one server. 39 00:02:58,520 --> 00:03:05,210 Please note Ansible is written in Python language, but it does not mean you need Python knowledge to 40 00:03:05,210 --> 00:03:14,270 use Ansible because Ansible has provided a very easy language to use to automate your task, which we'll 41 00:03:14,270 --> 00:03:15,290 cover later on. 42 00:03:15,770 --> 00:03:16,250 All right. 43 00:03:16,430 --> 00:03:24,230 Ansible can be used to provisioned system, meaning you could actually build systems from scratch using 44 00:03:24,230 --> 00:03:24,980 Ansible. 45 00:03:25,280 --> 00:03:28,580 Ansible is also used to configure those systems. 46 00:03:28,580 --> 00:03:30,320 Now you have the operating system build. 47 00:03:30,320 --> 00:03:31,310 A system is ready. 48 00:03:31,310 --> 00:03:38,300 Now you have to configure the system, meaning services or which way you want your system to work. 49 00:03:38,480 --> 00:03:42,620 Once that is done, then you could deploy applications as well. 50 00:03:42,620 --> 00:03:51,290 Let's say if you have to install Apache application or SAP application or database on your system, 51 00:03:51,290 --> 00:03:54,740 then you could deploy those applications using Ansible. 52 00:03:54,770 --> 00:03:57,830 Once those are deployed, it doesn't end here. 53 00:03:57,980 --> 00:04:02,120 You could manage those systems and applications using Ansible. 54 00:04:02,120 --> 00:04:08,240 So if you have to upgrade your system, for example, six months from now or after the deployment, 55 00:04:08,240 --> 00:04:10,550 then you could use Ansible to do that. 56 00:04:10,970 --> 00:04:16,730 Now let's take a look at a few examples of the tasks that can be automated. 57 00:04:16,730 --> 00:04:23,540 Using Ansible provisioning, which we have already have talked about, you could actually provision 58 00:04:23,540 --> 00:04:31,460 your bare metal server, virtualization systems, network devices, storage system, cloud platform. 59 00:04:31,610 --> 00:04:34,910 Also you could do system configuration, as I mentioned. 60 00:04:34,940 --> 00:04:42,260 What are the examples of system configurations such as updates or upgrades, package installation, 61 00:04:42,260 --> 00:04:50,780 a service configuration, stop, start restart of any services that can be done using Ansible users 62 00:04:50,780 --> 00:04:57,980 and groups, you could create one user on one server, or you could create that same user to multiple 63 00:04:57,980 --> 00:04:59,570 servers at the same time. 64 00:04:59,900 --> 00:05:03,260 Assigning permissions to files and directories. 65 00:05:03,590 --> 00:05:10,880 Moving on, you could use application deployment backups weekly or monthly system reboots. 66 00:05:11,240 --> 00:05:12,560 Orchestration. 67 00:05:12,860 --> 00:05:14,540 What is orchestration? 68 00:05:14,540 --> 00:05:21,980 Orchestration is a way of automating your system step by step in a specific order. 69 00:05:21,980 --> 00:05:25,940 So let's take an example of e commerce and e commerce. 70 00:05:25,940 --> 00:05:30,560 You have to have application setup, database setup and Web services. 71 00:05:30,740 --> 00:05:35,360 So you could actually let the system know through orchestration. 72 00:05:35,360 --> 00:05:42,410 And that orchestration wraps around Ansible that it should reboot or restart application services, 73 00:05:42,410 --> 00:05:47,120 database services, and then it should start the Web services. 74 00:05:47,120 --> 00:05:49,910 Everything happens in a certain order. 75 00:05:49,910 --> 00:05:56,300 That is an orchestration that you could actually have that within Ansible to handle it. 76 00:05:56,660 --> 00:05:59,210 So that's how Ansible works or. 77 00:05:59,540 --> 00:06:02,030 Quick overview of Ansible. 78 00:06:03,280 --> 00:06:06,490 In this video, we will cover a brief history of Ansible. 79 00:06:06,520 --> 00:06:11,110 The Ansible project was started in 2012 by Michael de Haan. 80 00:06:11,440 --> 00:06:18,130 It is an open source and community driven and I'm sure you know the open source and the community driven. 81 00:06:18,280 --> 00:06:25,570 When people get together from different part of the world toward one goal, to build a tool and open 82 00:06:25,570 --> 00:06:33,020 source is you could build your own code and add that to that tool to enhance features. 83 00:06:33,040 --> 00:06:38,650 Then Ansible Incorporation was purchased by Red Hat in 2015. 84 00:06:39,370 --> 00:06:46,950 When it's purchased even today, it is still open source but certain part or certain features of it. 85 00:06:46,960 --> 00:06:54,310 Say if Ansible can be purchased from RedHat such as Ansible Tower, or if you need a subscription for 86 00:06:54,310 --> 00:07:02,020 support or consulting that you could buy from RedHat, it is available from for most of the Linux distributions, 87 00:07:02,020 --> 00:07:08,080 such as Red Hat, Santos, Fedora, a Bantu, Debian and sushi. 88 00:07:08,320 --> 00:07:11,890 Now Ansible can only be installed. 89 00:07:11,890 --> 00:07:15,580 The engine itself can only be installed on Linux systems. 90 00:07:15,940 --> 00:07:19,120 You cannot install on Windows servers. 91 00:07:19,120 --> 00:07:25,660 However, you could manage and automate Windows Systems task using Ansible. 92 00:07:26,410 --> 00:07:26,860 All right. 93 00:07:26,860 --> 00:07:31,390 Let's take a quick look at the need of Ansible once again, very fast. 94 00:07:31,390 --> 00:07:35,860 Infrastructure management, especially the virtualization, when we have thousands of thousand virtual 95 00:07:35,860 --> 00:07:43,150 machines and we build the virtual machines in a very fast, fast way, you don't want to build them 96 00:07:43,150 --> 00:07:44,200 manually. 97 00:07:44,200 --> 00:07:45,940 It becomes cumbersome and tedious. 98 00:07:45,940 --> 00:07:51,820 That's when you use ansible configuration management for system and application multi-tier application 99 00:07:51,820 --> 00:07:55,120 automation like orchestration, single point of automation. 100 00:07:55,120 --> 00:08:01,030 Meaning if you have a one server like Ansible, you could change everything on that server and then 101 00:08:01,030 --> 00:08:06,490 push it out to all the rest of the world or meaning rest of the virtual machines.