Setup of RabbitMQ message broker in an OpenShift container requires an administrator user (unity-admin
) and two client users each associated with their own virtual hosts (/dev
and /dev2
).
- OpenShift cluster access
- RabbitMQ installed on your OpenShift cluster
- RabbitMQ CLI tools (
rabbitmqctl
)
To create the virtual hosts /dev
and /dev2
, use the following commands:
rabbitmqctl add_vhost /dev
rabbitmqctl add_vhost /dev2
Create the administrator user unity-admin
:
rabbitmqctl add_user unity-admin 'your_admin_password'
rabbitmqctl set_permissions -p / unity-admin ".*" ".*" ".*"
rabbitmqctl set_user_tags unity-admin administrator
Create the client user unity-rabbitmq-user-dev
for the /dev
vhost:
rabbitmqctl add_user unity-rabbitmq-user-dev 'your_dev_password'
rabbitmqctl set_permissions -p /dev unity-rabbitmq-user-dev ".*" ".*" ".*"
Create the client user unity-rabbitmq-user-dev2
for the /dev2
vhost:
rabbitmqctl add_user unity-rabbitmq-user-dev2 'your_dev2_password'
rabbitmqctl set_permissions -p /dev2 unity-rabbitmq-user-dev2 ".*" ".*" ".*"
To persist RabbitMQ data a container volume mount is required with backup to offsite S3 storage.
volumeMounts:
- mountPath: /var/lib/rabbitmq