An Ubuntu Riak #devrel

Setting up Riak to test out, prototype against, develop and use in a general way is extremely easy. Just setup a devrel on your local development machine. This is however limited to certain *nix based operating systems, so Windows as a dev platform is out – but not completely. Get a virtual machine running on Ubuntu, RHEL or some other Linux instance and you’re ready to go. What I’ve put together here is an example of getting a devrel up and running with an Ubuntu Virtual Machine.

Step 1: Get the basic reqs installed.

  • Install Erlang R15B01.
    	sudo apt-get install build-essential libncurses5-dev openssl libssl-dev git
    	tar zxvf otp_src_R15B01.tar.gz
    	cd otp_src_R15B01
    	./configure && make && sudo make install
  • Install Riak from source.
    curl -O
    tar zxvf riak-1.3.1.tar.gz
    cd riak-1.3.1
    make rel
  • Install 4 Riak nodes to #devrel.
    make all
    make devrel DEVNODES=4
    cd dev

Step 2: With each of the nodes, now join and build the Riak cluster.

  • Start each node.
    dev1/bin/riak start
    dev2/bin/riak start
    dev3/bin/riak start
    dev4/bin/riak start
  • Check to determine that the riak services are running.
    ps aux | grep beam
  • Add each node to a single node.
    dev2/bin/riak-admin cluster join dev1@
    dev3/bin/riak-admin cluster join dev1@
    dev4/bin/riak-admin cluster join dev1@
  • Set and get the cluster plan.
    dev2/bin/riak-admin cluster plan

    NOTE: This plan can be run from any of the instances.

  • Last, commit the cluster plan.
    dev2/bin/riak-admin cluster commit

    NOTE: The commit can also be run from any of the instances.

1 thought on “An Ubuntu Riak #devrel

  1. Pingback: Philadelphia Riak Training & Presentations | Composite Code

Comments are closed.