Simple riak cluster bootstrap and management for dev and test environments
Originally ported from https://github.com/cheeseplus/2.0-riak-dev-cluster
- Elixir 1.0+
- OSX (OSX only for now, but other environment can be supported by pointing the
riak_download_url
at a precompiled package specific to your platform)
- Clone the repo
git clone git@github.com:chrismccord/riak_tasks.git
cd riak_tasks
- Define your clusters in
config.exs
. Defaultdev
andtest
clusters are provided for easy customization. - Create a cluster!
$ mix riak_tasks.bootstrap dev
>> cp -nr riak-2.0.2/ dev1
>> cp -nr riak-2.0.2/ dev2
>> cp -nr riak-2.0.2/ dev3
>> ulimit -n 65536; ./dev1/bin/riak start
>> ulimit -n 65536; ./dev2/bin/riak start
>> ulimit -n 65536; ./dev3/bin/riak start
=======================================
Riak dev cluster started
=======================================
>> ./dev2/bin/riak-admin join -f dev1@127.0.0.1
Sent join request to dev1@127.0.0.1
>> ./dev3/bin/riak-admin join -f dev1@127.0.0.1
Sent join request to dev1@127.0.0.1
$ mix riak_tasks.ping dev
>> ./dev1/bin/riak ping
pong
>> ./dev2/bin/riak ping
pong
>> ./dev3/bin/riak ping
pong
$ mix riak_tasks.start dev
$ mix riak_tasks.join dev
$ mix riak_tasks.stop dev
$ mix riak_tasks.destroy dev