Last active
August 29, 2015 13:57
-
-
Save mattsta/9689072 to your computer and use it in GitHub Desktop.
Redis Cluster Linux Bring-Up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Launch 18 redis cluster instances on one machine using two IPs | |
cd redis/src | |
for dir in {1..9}; do mkdir $dir; pushd $dir; rm -f *.conf *.rdb; ../redis-server --bind 127.0.0.1 --cluster-enabled yes --port 700$dir & popd; done | |
IP=`/sbin/ifconfig eth0 |grep "inet addr" | tail -1 |awk '{printf $2}' |awk -F: '{printf $2}'` | |
for dir in {21..29}; do mkdir $dir; pushd $dir; rm -f *.conf *.rdb; ../redis-server --bind $IP --cluster-enabled yes --port 70$dir & popd; done | |
./redis-trib.rb create --replicas 1 127.0.0.1:{7001..7009} $IP:{7021..7029} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment