brew install riak
cd `brew --prefix riak`
- copy the
create_cluster.sh
script into this dir
- run the script
chmod u+x create_cluster.sh
./create_cluster.sh
- Reset
ulimit
ulimit -n 4096
- Otherwise, you'll get a warning with Riak and your instances will keep dying:
WARNING: ulimit -n is 256; 4096 is the recommended minimum.
- To make this permanent, put it in your
~/.zshrc
or similar.
ps -ef | grep riak
- Kill the
epmd
daemon. That's cause we need it to restart after the config change above.
- Start the riak instances
/usr/local/Cellar/riak/dev/dev1/bin/riak start
- make sure it responds to ping with a
pong
/usr/local/Cellar/riak/dev/dev1/bin/riak ping
- Repeat for instances 2-n
- Join the instances into a cluster:
/usr/local/Cellar/riak/dev/dev2/bin/riak-admin cluster join dev1@127.0.01
/usr/local/Cellar/riak/dev/dev3/bin/riak-admin cluster join dev2@127.0.01
- etc.