Skip to content

Creating a HAProxy server with 2 Nginx servers using Vagrant and Puppet

Notifications You must be signed in to change notification settings

eliranbz/vagrant_puppet_haproxy_basic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Environment - Vagrant + Puppet + HAProxy

Components:

  • Two VMs that act as Web servers and run Nginx
  • The web servers serve a simple page that prints "Hello World!"
  • Third VM acts as a load balancer for the web servers VMs
  • HAProxy is used as Load balancer

Requirements:

  • CentOS 6.x as Linux Distribution
  • Puppet as provisioner (see link below)
  • Puppet version 3 and up compatible recipes
  • HAproxy configured using HAProxy puppet module (see link below)
  • HAProxy balances requests between the web servers
  • HAProxy should be able to fail-over in-case one of the web servers goes down.
  • HAProxy must be accessible from outside the LAB. For example, surfing to http://<HAPROXY-IP> should work

The end result should be similar to the following diagram:

                           VM2 (Web server)
                             +---------+
                 +-------->  |  Nginx  |
   VM1 (LB)      |           +---------+
+------------+   |
|  HAProxy   +---+
+------------+   |         VM3 (Web server)
                 |           +---------+
                 +-------->  |  Nginx  |
                             +---------+

Tools used

References

Dependencies

  • vagrant plugin install vagrant-hosts,
  • puppet module install puppetlabs-haproxy,
  • puppet module install jfryman-nginx,

About

Creating a HAProxy server with 2 Nginx servers using Vagrant and Puppet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages