A playbook building high availability Load Balancer with HAProxy and keepalived.
- VirtualBox. Tested on 4.3.x.
- Vagrant. Tested on 1.6.3
- Ansible. Tested on 1.7.1
It will install high availability Load Balancer with HAProxy and keepalived. You can customize it by edit vars file. Tested on Ubuntu 14.04 Trusty and CentOS 6.5.
-
Edit vars/main.yml
-
Test on Vagrant virtual machine(Requires Ansible).
$ vagrant up
- Install to remote server.
Edit ansible_hosts
.
default ansible_ssh_host=xxx.xxx.xxx.xxx ansible_ssh_port=22
Run playbook.
ansible-playbook site.yml -i ansible_hosts
haproxy_user: haproxy
haproxy_major_version: 1.5
haproxy_minor_version: 8
haproxy_download_url: "http://www.haproxy.org/download/{{ haproxy_major_version }}/src/haproxy-{{ haproxy_major_version }}.{{ haproxy_minor_version }}.tar.gz"
haproxy_src_dir: /tmp
haproxy_make_option: TARGET=linux2628 CPU=x86_64 USE_OPENSSL=1 USE_ZLIB=1 USE_PCRE=1
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request