External RabbitMQ installation and configuration#
Install the Epel release.
yum -y install epel-release
Use the following command to install RabbitMQ:
yum -y install rabbitmq-server
RabbitMQ is used for messaging between the Python services and the CORE services. RabbitMQ is required for the other services installation.
Add a service to autoload and launch service
systemctl start rabbitmq-server
systemctl enable rabbitmq-server
systemctl status rabbitmq-server
Create a user "luna" with a password "luna"
rabbitmqctl add_user luna luna
Assign extended rights to the user (set_permissions [-p <vhostpath>] <user> <conf> <write> <read>
)
rabbitmqctl set_permissions -p / luna ".*" ".*" ".*"
Set the user as administrator (set_user_tags
rabbitmqctl set_user_tags luna administrator
Activate control module for changing message broker configuration
rabbitmq-plugins enable rabbitmq_management
systemctl restart rabbitmq-server
Get access to the utility rabbitmqadmin
find /var/lib/rabbitmq/ -name 'rabbitmqadmin' -exec chmod 0777 {} \;
Add a path to the rabbitmqadmin
file to the environment variable so that the system could find and execute the rabbitmqadmin
command
PATH="$PATH:/var/lib/rabbitmq/mnesia/rabbit@`hostname -s`-plugins-expand/rabbitmq_management-`rpm -qa | grep rabbitmq | cut -d - -f 3`/priv/www/cli/"
Create exchanges for service communication and add queues for workers requests
rabbitmqadmin -u luna -p luna declare exchange name=luna.match type=direct
rabbitmqadmin -u luna -p luna declare queue name=matcher durable=false auto_delete=true
Turn off the configuration module and restart the service
rabbitmq-plugins disable rabbitmq_management
systemctl restart rabbitmq-server
The message queue configuration is not described in this document.