First Retrieve the Rebar Templates and put them in ~/.rebar/templates
git clone git://github.com/rzezeski/rebar_riak_core.gitmkdir ~/.rebar /templatescp rebar_riak_core/* ~/.rebar /templates
You’ll also need Rebar and Erlang. I used homebrew to get them:
[bash] brew install erlang rebar [/bash]
Now that you’re set up, you can create a new multinode app from the templates. Replace myapp with whatever you want to call your new app in the following command:
cd ~/where/I/want/my/app
rebar create template=riak_core_multinode appid=myapp nodeid=myapp
You can now make
and run the code.
make rel./rel/myapp/bin/myapp console
If all goes well you should be sitting in a console for your app. Run [erlang] myapp:ping(). [/erlang] to ping a random vnode.
myapp:ping().
method.