Start the interactive Nanite Mapper:
./nanite/bin/nanite-mapper -i
see what instances are up:
1 2 | ?> request('/rabbit_cluster/hostname', nil, :selector => :all) {|res| p res } >> {"nanite-d6f568bf"=>"ip-10-251-110-196\n", "nanite-d7f568be"=>"ip-10-251-201-239\n"} |
make sure both RabbitMQ instances are running OK (started with "rabbitmq-server -detached"):
1 2 | ?> request('/rabbit_cluster/status', nil, :selector => :all) {|res| p res } #"both Rabbit instance report Running OK" |
Manually go through adding Node2 into a Cluster with Node1 (to be scripted, or added to Agent):
1 2 3 4 | ?> request('/rabbit_cluster/stop_app', nil, :target => "nanite-d7f568be") {|res| p res } ?> request('/rabbit_cluster/reset', nil, :target => "nanite-d7f568be") {|res| p res } ?> request('/rabbit_cluster/cluster', "rabbit@ip-10-251-110-196", :target => "nanite-d7f568be") {|res| p res } ?> request('/rabbit_cluster/start_app', nil, :target => "nanite-d7f568be") {|res| p res } |
Check again the status of both RabbitMQ instances (should be Clustered now):
1 2 3 | ?> request('/rabbit_cluster/status', nil, :selector => :all) {|res| p res } #"Note that both instance report they are in a Cluster together, like so:" {running_nodes,['rabbit@ip-10-251-201-239','rabbit@ip-10-251-110-196']} |