Setting up a Riak cluster in a single host

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting up a Riak cluster in a single host

Aníbal Rojas-2
Hello,

I have not find a simple way to setup a small Riak cluster just for
fun (testing) in my laptop.

Looks like I need to hack  /usr/sbin/riak to be able to specify
alternate folders for config and other files.

Am I missing something?

--
Aníbal Rojas
Ruby on Rails Web Developer
http://www.google.com/profiles/anibalrojas

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Setting up a Riak cluster in a single host

Rusty Klophaus
Hi Aníbal,

No need to hack any startup scripts. Just make multiple copies of the $RIAK/rel/riak directory, and then change settings in vm.args and app.config to prevent node name and port conflicts.

Alternatively, we provide a quick way to get started with a three node cluster, just run "make all devrel".

The "devrel" target creates three nodes in $RIAK/dev/dev1, $RIAK/dev/dev2, and $RIAK/dev/dev3. From there, you can start each of them and join them together using the following commands.

# Start the nodes...
./dev/dev1/bin/riak start
./dev/dev2/bin/riak start
./dev/dev3/bin/riak start

# Join the nodes together...
./dev/dev2/bin/riak-admin join [hidden email]
./dev/dev3/bin/riak-admin join [hidden email]

Note that Web port for the three nodes is 8091, 8092, and 8093, which is different from the default of 8098 that you get when you run "make all rel".

Best,
Rusty

2010/3/14 Aníbal Rojas <[hidden email]>
Hello,

I have not find a simple way to setup a small Riak cluster just for
fun (testing) in my laptop.

Looks like I need to hack  /usr/sbin/riak to be able to specify
alternate folders for config and other files.

Am I missing something?

--
Aníbal Rojas
Ruby on Rails Web Developer
http://www.google.com/profiles/anibalrojas

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



--
Rusty Klophaus
Basho Technologies, Inc.
http://basho.com

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Setting up a Riak cluster in a single host

Aníbal Rojas-2
Rusty,

Thanks for your quick response, and great there is a way to do it:

> No need to hack any startup scripts. Just make multiple copies of the
> $RIAK/rel/riak directory, and then change settings in vm.args and app.config
> to prevent node name and port conflicts.

Would you plz $ echo $RIAK ? I found:

usr/lib/riak/releases/0.9.1/riak.rel

But I am not sure what are you talking about.

> Alternatively, we provide a quick way to get started with a three node
> cluster, just run "make all devrel".

This requires installing from sources, right?

> The "devrel" target creates three nodes in $RIAK/dev/dev1, $RIAK/dev/dev2,
> and $RIAK/dev/dev3. From there, you can start each of them and join them
> together using the following commands.
> # Start the nodes...
> ./dev/dev1/bin/riak start
> ./dev/dev2/bin/riak start
> ./dev/dev3/bin/riak start
> # Join the nodes together...
> ./dev/dev2/bin/riak-admin join dev1@127.0.0.1
> ./dev/dev3/bin/riak-admin join dev1@127.0.0.1
> Note that Web port for the three nodes is 8091, 8092, and 8093, which is
> different from the default of 8098 that you get when you run "make all rel".

Great. This is the test env I want to try.

Thanks in advance,

--
Aníbal Rojas
Ruby on Rails Web Developer
http://www.google.com/profiles/anibalrojas

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Setting up a Riak cluster in a single host

Rusty Klophaus
Hi Aníbal,

I didn't realize that you had installed from our pre-built .deb package. Currently, those only support a single node per machine. As you said, you could probably modify the startup scripts to make it work, but it will probably be more straightforward to just build Riak from source code.


Once you have successfully compiled, you will see the "./rel/riak" directory that I mentioned in my previous email. Make multiple copies of this and tweak the config files.

Best,
Rusty

2010/3/14 Aníbal Rojas <[hidden email]>
Rusty,

Thanks for your quick response, and great there is a way to do it:

> No need to hack any startup scripts. Just make multiple copies of the
> $RIAK/rel/riak directory, and then change settings in vm.args and app.config
> to prevent node name and port conflicts.

Would you plz $ echo $RIAK ? I found:

usr/lib/riak/releases/0.9.1/riak.rel

But I am not sure what are you talking about.

> Alternatively, we provide a quick way to get started with a three node
> cluster, just run "make all devrel".

This requires installing from sources, right?

> The "devrel" target creates three nodes in $RIAK/dev/dev1, $RIAK/dev/dev2,
> and $RIAK/dev/dev3. From there, you can start each of them and join them
> together using the following commands.
> # Start the nodes...
> ./dev/dev1/bin/riak start
> ./dev/dev2/bin/riak start
> ./dev/dev3/bin/riak start
> # Join the nodes together...
> ./dev/dev2/bin/riak-admin join [hidden email]
> ./dev/dev3/bin/riak-admin join [hidden email]
> Note that Web port for the three nodes is 8091, 8092, and 8093, which is
> different from the default of 8098 that you get when you run "make all rel".

Great. This is the test env I want to try.

Thanks in advance,

--
Aníbal Rojas
Ruby on Rails Web Developer
http://www.google.com/profiles/anibalrojas



--
Rusty Klophaus
Basho Technologies, Inc.
http://basho.com

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Setting up a Riak cluster in a single host

Rusty Klophaus
This information is now on the Riak Wiki: https://wiki.basho.com/display/RIAK/Basic+Cluster+Setup

2010/3/15 Rusty Klophaus <[hidden email]>
Hi Aníbal,

I didn't realize that you had installed from our pre-built .deb package. Currently, those only support a single node per machine. As you said, you could probably modify the startup scripts to make it work, but it will probably be more straightforward to just build Riak from source code.


Once you have successfully compiled, you will see the "./rel/riak" directory that I mentioned in my previous email. Make multiple copies of this and tweak the config files.

Best,
Rusty

2010/3/14 Aníbal Rojas <[hidden email]>
Rusty,


Thanks for your quick response, and great there is a way to do it:

> No need to hack any startup scripts. Just make multiple copies of the
> $RIAK/rel/riak directory, and then change settings in vm.args and app.config
> to prevent node name and port conflicts.

Would you plz $ echo $RIAK ? I found:

usr/lib/riak/releases/0.9.1/riak.rel

But I am not sure what are you talking about.

> Alternatively, we provide a quick way to get started with a three node
> cluster, just run "make all devrel".

This requires installing from sources, right?

> The "devrel" target creates three nodes in $RIAK/dev/dev1, $RIAK/dev/dev2,
> and $RIAK/dev/dev3. From there, you can start each of them and join them
> together using the following commands.
> # Start the nodes...
> ./dev/dev1/bin/riak start
> ./dev/dev2/bin/riak start
> ./dev/dev3/bin/riak start
> # Join the nodes together...
> ./dev/dev2/bin/riak-admin join [hidden email]
> ./dev/dev3/bin/riak-admin join [hidden email]
> Note that Web port for the three nodes is 8091, 8092, and 8093, which is
> different from the default of 8098 that you get when you run "make all rel".

Great. This is the test env I want to try.

Thanks in advance,

--
Aníbal Rojas
Ruby on Rails Web Developer
http://www.google.com/profiles/anibalrojas



--
Rusty Klophaus
Basho Technologies, Inc.
http://basho.com



--
Rusty Klophaus
Basho Technologies, Inc.
http://basho.com

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com