Configuring Reverse Proxy over AWS instances
What is AWS?
Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow. Running web and application servers in the cloud to host dynamic websites.
Amazon EC2
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment.
TASK 12.2 Description
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. Configure the setup over AWS using instance over there.
Ansible Playbook to configure Reverse Proxy over AWS instances
#inventory file vim ip.txt
#Running the playbook ansible-playbook haproxy.yml
#Checking the haproxy.cfg file to see if the webservers are added or not vim /etc/haproxy/haproxy.cfg
#Going to the Loadbalancer IP using port 8080 to check the connectivity 52.87.237.193:8080/web.php
So as we can see, IP 52.87.237.193 is working as the loadbalancer. The task is successfully completed!