This is a simple procedure:
Ensure using Basho's patched version of Erlang. Instructions to do that are found at Installing Basho Erlang/OTP.
Then install a slim version by following following the instructions at Creating a Nitrogen project. Please use the "slim-release" versions such that you build your project using the Basho's Erlang
Pull the riak-erlang-client from github. For more information Check here or simply do this from the ../$MYPROJECT/lib directory, where $MYPROJECT is your nitrogen project name. git clone git://github.com/basho/riak-erlang-client.git
. This will include riak-erlang-client in the lib directory
Edit the rebar.config file by doing this nano ../$MYPROJECT/rebar.config
to include the riak-erlang-client dependencies. ** Look for riakc dep in the code block below **, in this project i used make slim_cowboy
{deps, [
{cowboy, ".*", {git, "git://github.com/ninenines/cowboy", {tag, "1.0.0"}}},
%% Uncomment the following lines and comment the bottom lines with specific
%% tags to always pull the latest versions
{simple_bridge, ".*", {git, "git://github.com/nitrogen/simple_bridge",{branch, master}}},
{nprocreg, ".*", {git, "git://github.com/nitrogen/nprocreg", {branch, master}}},
{nitrogen_core, ".*", {git, "git://github.com/nitrogen/nitrogen_core",{branch, master}}},
%% The riak-erlang-client dep starts
{riakc, "1.4.1", {git, "git://github.com/basho/riak-erlang-client", {tag, "1.4.1"}}},
%% The riak-erlang-client dep ends
{sync, ".*", {git, "git://github.com/rustyio/sync", {branch, master}}}
%% Get specific tagged version
%{simple_bridge, ".*", {git, "git://github.com/nitrogen/simple_bridge",{tag, "v2.0.0-beta5"}}},
%{nprocreg, ".*", {git, "git://github.com/nitrogen/nprocreg", {tag, "v0.2.1"}}},
%{nitrogen_core, ".*", {git, "git://github.com/nitrogen/nitrogen_core",{tag, "v2.3.0-beta6"}}},
%{sync, ".*", {git, "git://github.com/rustyio/sync", {tag, "4dbe32bb4"}}}
]}.
From ../$MYPROJECT recompile your project by using make all
.
At the end of this step just start nitrogen by ./bin/nitrogen console
. Try connecting to one of your riak nodes by {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", <PORT>).
Then you are ready to go.