In this post we are going to discuss about handlers in Ansible

Handlers are just like normal tasks in an Ansible playbook but they run only when if the Task contains a “notify” directive. It also indicates that it changed something.

Sometimes you want a task to run only when…

So this post is extended from task

In this we have to Configure the HAProxy and Webserver over the EC2 instances in AWS

One may think that it is similar to previous task the only change we need to do is the inventory in ansible but there are few other changes that needs to be done:

  1. make root password in ec2 instance

2. enable passwordauthentication to yes

3. copy ssh keys for passwordless login

  1. For making root password use command
passwd root

2. For enabling passwordauthentication

edit /etc/ssh/sshd_config

3. For copying ssh keys use

ssh-copy-id root@PublicIP

Rest all the things are same and the reason for that is been using Ansible

The video has been made which shows ever detail about this task from scratch

This video starts from launching instances till configuring them as LB and backend servers

This Post is all about HAProxy and Webserver configuration using Ansible.

So, What is HAProxy?

HAProxy is free, open source software that provides a high availability load balancer and proxy server for TCP and HTTP-based applications that spreads requests across multiple servers.

  • Description

In this task we need to install HAProxy on one system and then we need to use this as LoadBalancer for Webserver running in other systems/server.

This all is automated using ansible

Ansible YAML file for HAProxy

Installing HAProxy

This task is about include_vars which is a way to use the variables in ansible playbook without the need to mention them in the playbook itself.

Now one may think that we need not to mention the variables in playbook but still we gonna mention variables somewhere, so what's the…

This is a docker task which needs the following to be done

  • Configuring HTTPD Server on Docker Container
  • Setting up Python Interpreter and running
  • Python Code on Docker Container

Step 1: Launch docker container using command

docker run -it --name os1 centos

Step 2: Download Httpd software using

yum install httpd

LVM stands for Logical Volume Management which includes allocating disks, striping, mirroring and resizing logical volumes.

In simple terms LVM is used for increasing the Storage allocated to any VM and also to decrease the storage depending upon the situation.

LVM includes three main terms such as PV VG LV

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.

It is a containerization engine that helps us to launch docker containers from the docker images that are available in docker hub. Docker…

Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications

Features of K8s involves

  • Automated rollouts and rollbacks → Kubernetes progressively rolls out changes to your application. If something goes wrong, Kubernetes will rollback the change for you.
  • Horizontal Scaling → Scale…

So basically Chat server is a server which is used for communication between 2 or more hosts. Here we create a python program which will act as both chat server and client and help us to chat from System A to System B.

The protocol we used here is UDP…

Abhishek Arora

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store