HAPORXY

TASK 12 DESCRIPTION -

  • Use Ansible playbook to Configure Reverse Proxy i.e. Haproxy and update its configuration file automatically each time a new Managed node join the inventory. Proxy i.e. Haproxy and update its configuration file automatically each time a new Managed node join the inventory
  • Configure the same setup as 12.1 over AWS using instance over there.

REVERSE PROXY

In computer networks such as the internet, a reverse proxy is a common type of proxy server that is accessible from the public network. Large websites and content delivery networks use reverse proxies –and other techniques– to balance the load between internal servers.

The reverse proxy becomes a single point of entry for the different web applications in the organization. The web servers stay hidden and thus protected from the Internet. Security monitoring such as log review can be performed from a single point.

Configuring Haproxy via Ansible Playbook

First, we have to get into the folder we made for ansible-playbook

#cd /ansible-playbook  
#vim task12-1.yml


Then after writing the code we have to make two more files in that folder only named epel.repo and my.php as we have provided their address in our code my.php will help us give the output as our IP and epel. repo configures our service.

#vim epel.repo
#vim my.php




After making all the files required for our task we have to make changes in our haproxy configuration file (backend)

#vim /etc/haproxy/haproxy.cfg




Then we have to run the ansible-playbook

#ansible-playbook task12-1.yml




Open chrome tab in the windows and give the IP of Load balancer and port number you have provided

#IP: Port


Again refresh the page and you'll see that the IP has changed.


That's all for today, stay tuned for more blogs until then stay home, stay safe and keep learning.

Comments

Popular posts from this blog

Docker with Ansible

Summer Task 7 - (07.2 )