Skip to content

Simple riak cluster bootstrap and management for dev and test environments

Notifications You must be signed in to change notification settings

chrismccord/riak_tasks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RiakTasks

Simple riak cluster bootstrap and management for dev and test environments

Originally ported from https://github.com/cheeseplus/2.0-riak-dev-cluster

Requirements

  • 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)

Usage

  1. Clone the repo git clone git@github.com:chrismccord/riak_tasks.git
  2. cd riak_tasks
  3. Define your clusters in config.exs. Default dev and test clusters are provided for easy customization.
  4. 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

Ping your cluster

$ mix riak_tasks.ping dev
>> ./dev1/bin/riak ping
pong

>> ./dev2/bin/riak ping
pong

>> ./dev3/bin/riak ping
pong

Tasks

Start all nodes for a configured cluster

$ mix riak_tasks.start dev

Join all configured nodes as a cluster (only needed once)

$ mix riak_tasks.join dev

Stop all nodes on a cluster

$ mix riak_tasks.stop dev

Permanently destroy all data and restart the cluster

$ mix riak_tasks.destroy dev

About

Simple riak cluster bootstrap and management for dev and test environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages