Posts

Showing posts with the label configuration

ANSIBLE: Haproxy Configuration over AWS using Ansible

Image
  CONFIGURATION OF HAPROXY  USING ANSIBLE OVER AWS Lets configure Reverse Proxy that is  Haproxy  using ansible Playbook. Check this blog to know more about Haproxy :  ANSIBLE : Configuration of Haproxy As every server has a hard coded limit . At one point in time, only limited clients can connect to the web server. If more clients try to connect, the will get some error. That's why we are using  Load Balancer.  Here we want to achieve  high availability  and  extra security  for our web server using haproxy. But the problem is that, if we need to add more servers, we can add them by adding their IP in inventory file and run the playbook. But  how Load balancer will come to know that more servers have been added???? For this we will have to manually update the configuration file of Haproxy. And manually updating is not good as we are using ansible. So the solution is, we can use  JINJA  language to write code in ...

ANSIBLE : Handlers

Image
 PROBLEM :   We all know that ansible is famous for it's  idempotency .  But if we configure some service and if we change anything in it's configuration file, then we need to restart that service.  The problem is : if configuration file is unchanged, then? Then also our ansible task will run and restart service unnecessarily. In this case, ansible is not working as idempotent. Our service will restart every time we run the playbook, even if configuration file is not updated. SOLUTION : HANDLERS We can use Handlers in Ansible to tackle this problem.  Handlers are just like a normal task. Handlers will perform an action when listens for a notify event. If nothing notifies a handler, it will not run. Regardless of how many tasks notify a handler, it will run only once, after all of the tasks completed in a particular play. To know more about ansible and it's playbook, check my this blog :  ANSIBLE : How Industries are solving Challenges using Ans...

ANSIBLE : Configuration of Haproxy

Image
  ANSIBLE Ansible  automates and simplifies repetitive, complex, and tedious operations . Everybody likes it because it brings  huge time savings  when we install packages or configure large numbers of servers. Its architecture is simple and effective. It works by connecting to your nodes and pushing small programs to them. These programs make the system comply with a desired state, and, when they have finished their tasks, they are deleted. To know more about ansible, check my this blog :    ANSIBLE : How Industries are solving Challenges using Ansible HAPROXY HAProxy is an open source, free, very fast and reliable solution offering high availability, load balancing and proxying for TCP and HTTP-based applications.  It is particularly suited for web sites crawling under very high loads while needing persistence or Layer7 processing. It distributes a workload across a set of servers to maximize performance and optimize resource usage. HAProxy can be us...