wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update -y
sudo apt-get install -y erlang erlang-nox
echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
sudo apt-get update -y
sudo apt-get install -y rabbitmq-server
sudo systemctl start rabbitmq-server
sudo systemctl status rabbitmq-server
sudo systemctl enable rabbitmq-server
sudo rabbitmq-plugins enable rabbitmq_management
Create Admin User in RabbitMQ
sudo rabbitmqctl add_user admin password
sudo rabbitmqctl set_user_tags admin administrator
sudo rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
Setup Cluster On The Master Node
wget https://gist.githubusercontent.com/fernandoaleman/05cbf15e0e58f8de7a29a21b24f9debb/raw/55efa7b36c245a9f6ffa3bcd2382c078cce0e9a2/rabbitmq-cluster.sh
chmod +x rabbitmq-cluster.sh
./rabbitmq-cluster.sh
Enable RabbitMQ and Management SSL
[
{rabbit, [
{ssl_listeners, [5671]},
{ssl_options, [{cacertfile,"/path/to/cacertfile"},
{certfile,"/path/to/certfile"},
{keyfile,"/path/to/keyfile"},
{verify,verify_peer},
{fail_if_no_peer_cert,true}]}
]},
{rabbitmq_management, [
{listener, [{port, 15671},
{ssl, true},
{ssl_opts, [{cacertfile, "/path/to/cacertfile"},
{certfile, "/path/to/certfile"},
{keyfile, "/path/to/keyfile"}]}
]
}
]}
].
Running : Ubuntu 16.04 (xenial)
Installing Erlang and then installing RabbitMQ results in Erlang-EPMD errors :
https://serverfault.com/questions/968042/epmd-reports-node-rabbit-not-running-at-all
But just skipping the first step of Installing Erlang and letting RabbitMQ install alone (auto installing dependencies), runs gracefully.
But thanks for the wonderful snippets!