rsprangemeijer / vagrant-riak-cluster

A sandbox to play with multiple Riak nodes via Vagrant.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vagrant Riak Cluster

This is a Vagrant project powered by Chef to bring up a local Riak cluster. Each node can run either Ubuntu 12.04 or CentOS 6.4 64-bit with 1024MB of RAM by default. If you want to tune the OS or node/memory count, you'll have to edit the Vagrantfile directly.

Configuration

Install Vagrant

Download and install Vagrant via the Vagrant installer.

Install Vagrant plugins

$ vagrant plugin install vagrant-berkshelf
$ vagrant plugin install vagrant-omnibus

Launch cluster

$ vagrant up

Accessing individual nodes

Each node in the cluster is named in the form riakN — where N is a number between 1 and the number of nodes defined for the cluster (defaults to 3).

$ vagrant ssh riak1

Vagrant boxes

The Vagrant boxes used in this project were created by Veewee. To view the Veewee definitions, please follow the links below:

Erlang template helper

In order to set the appropriate Erlang data types for attributes, please use the following methods provided by erlang_template_helper:

  • to_erl_string
  • to_erl_binary
  • to_erl_tuple
  • to_erl_list

How is this better than make devrel?

Standing up a local Riak cluster within Vagrant is better than make devrel because:

  • It installs Riak on the operating system you intend to deploy on in production
  • It uses the actual packages you'll deploy with in production
  • It allows you to test failure scenarios that include the machine (failed disks, network partitions, etc.)

How is this worse than make devrel?

Standing up a local Riak cluster within Vagrant is worse than make devrel because:

  • It takes longer (minutes) to stand up a cluster
  • It uses more resources on your local machine
  • It involves VirtualBox

About

A sandbox to play with multiple Riak nodes via Vagrant.