Running three riak node clusters using a home installation

I installed Riak on my Mac via homebrew and would like to configure a local three node cluster.

The basho high-speed tutorial , however, is based on the original build, and as far as I know, these instructions will not apply to my homebrew installation (for example, make devrel will generate 3 nodes, but my installation does not contain a make file).

I tried to make 3 copies of /usr/local/Cellar/riak called dev1 , dev2 and dev3 . Then I adjusted the http , handoff_port and pb_port in devN/1.1.1x86_64/libexec/etc/app.config , as well as the -name parameter in devN/1.1.1x86_64/libexec/etc/vm.args (I used 81XX for ports, used by node dev1, 82XX for those, node dev2, etc. For the -name parameter I used riak1@127.0.0.1 , riak2@127.0.0.1 , etc.).

Node dev1 can be successfully started with ./dev1/1.1.1x86_64/bin/riak start . But after starting node dev2 using ./dev2/1.1.1x86_64/bin/riak start , riak complains that node is already running.

How do I get riak to recognize three installations as separate nodes?

+6
source share
1 answer

The problem is the RUNNER_SCRIPT_DIR variable in the scripts ./devN/1.1.1x86_64/bin/riak - it is set to /usr/local/Cellar/riak/1.1.1x86_64/libexec/bin in the original version of homebrew that you copied .

This is used later in the script in the ping_node function (and in fact, everything else). -name and -setcookie and all other settings are pulled from the vm.args directory in /usr/local/Cellar/riak/1.1.1x86_64/libexec/etc instead of the copies you made.

Change this in each of your riak script copies, and you should be good to go.

+8
source

Source: https://habr.com/ru/post/911853/


All Articles