RabbitMQ High availability configuration by haproxy and Keepalived.
NOTE: This repository is for self-study.
# vagrant up
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-proxyconf # if you needed
vagrant up
vagrant reload # to reflect SELINUX setting change, reload.
# install itamae
# NOTE: in the following command example omit "bundle exec"
bundle install --path vendor/bundle
# Primary node `mq1`: RabbitMQ
itamae ssh -h mq1 -y node/develop.yml roles/rabbit_master.rb
# Standby node `mq2`: RabbitMQ
itamae ssh -h mq2 -y node/develop.yml roles/rabbit_slave.rb
# `mq1` and `mq2`: haproxy
itamae ssh -h mq1 -y node/develop.yml roles/haproxy.rb
itamae ssh -h mq2 -y node/develop.yml roles/haproxy.rb
# `mq1` and `mq2`: keepalived
itamae ssh -h mq1 -y node/develop.yml roles/keepalived.rb
itamae ssh -h mq2 -y node/develop.yml roles/keepalived.rb
- Detailed configurate of
haproxy
- ref: ./cookbooks/haproxy/files/etc/haproxy.cfg
- Change the
frontend
andbackend
pairs tolisten
- ./cookbooks/keepalived/files/etc/keepalived/man-8-keepalived
- ./cookbooks/keepalived/files/etc/keepalived/man-5-keepalived.conf
- ./cookbooks/keepalived/files/usr/share/doc/keepalived-1.3.5/keepalived.conf.SYNOPSIS
- keepalived | Read the Docs
- keepalived.conf - configuration file for keepalived - Linux Man Pages (5)
- 17.5.1 Keepalived構成ファイルについて