This is a redis clone of mysql_role_swap, which automatically promote slave to master as this docs described.
You must use virtual ip to use this script.
How to setup virtual ip on gentoo, you can refer to this link: http://www.gentoo-wiki.info/HOWTO_Setup_Bonded_ethernet_adapters#Kernel_Configuration
- iproute2 (/sbin/ip)
- ruby
- ruby bundle install
./redis_role_swap.rb -c cluster.yml