Saranya. S
3 min readDec 9, 2020

ARTH — Task 12 👨‍💻

Task Description 📃

12.1 Use Ansible playbook to Configure Reverse Proxy i.e. Haproxy and update it’s configuration file automatically on each time new Managed node (Configured With Apache Webserver) join the inventory.

INTRODUCTION:

  • HAProxy, or High Availability Proxy is used by RightScale for load balancing in the cloud
  • 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. It is written in C and has a reputation for being fast and efficient.
  • This is useful in cases where too many concurrent connections over-saturate the capability of a single server.

TASK STARTS:

STEP:1:Create groups in inventory(ip.txt) file.

  • one for load balancer
  • other for backend servers(webserver)

STEP:2:Install the haproxy in controller node using command

cmd: yum install haproxy

OR copy the haproxy config file in controller node from where haproxy installed

cmd: scp /etc/haproxy/haproxy.cfg <controller node ip>:/<foldr name to copy>/

STEP:3:Update the haproxy.cfg file in controller node.

STEP:4:Create a playbook to configure haproxy.

STEP:5:Run the playbook.

TO CHECK:

  1. Go to LB configured server:

2. Go to browser: <LB IP>:<port>

TASK COMPLETED!!!

No responses yet