Ansible playbook to set up a five node Docker Swarm cluster (three managers and two workers) with two HAProxy loadbalancers with keepalived
- Ansible 2.1
- Vagrant
After cloning this repo you need to get the submodules which contains the roles.
$ git submodule init
$ git submodule updateRun this command to set up the hosts with Vagrant
$ vagrant upSet correct permissions on the private key for Ansible
$ chmod 600 files/ansible_rsaRun this command to provision your machines with Ansible
$ ansible-playbook site.ymlIn order to access the service you need to add an entry to /etc/hosts
$ echo "10.1.43.200 test.haproxy.local" | sudo tee -a /etc/hostsNow everything should be set up. You can access your service at http://test.haproxy.local
Stats for HAProxy can be found at http://test.haproxy.local:1963/haproxy?stats Username and password for this UI is admin/password