diff --git a/ansible/roles/nova-cell/tasks/rabbitmq.yml b/ansible/roles/nova-cell/tasks/rabbitmq.yml index 6545c54675..e5eb4a15bd 100644 --- a/ansible/roles/nova-cell/tasks/rabbitmq.yml +++ b/ansible/roles/nova-cell/tasks/rabbitmq.yml @@ -24,4 +24,6 @@ - nova_cell_rpc_group_name != nova_cell_notify_group_name or nova_cell_rpc_rabbitmq_users != nova_cell_notify_rabbitmq_users - when: nova_cell_rpc_transport == 'rabbit' + when: + - nova_cell_rpc_transport == 'rabbit' + - enable_rabbitmq | bool diff --git a/doc/source/reference/message-queues/external-rabbitmq-guide.rst b/doc/source/reference/message-queues/external-rabbitmq-guide.rst new file mode 100644 index 0000000000..10277f6413 --- /dev/null +++ b/doc/source/reference/message-queues/external-rabbitmq-guide.rst @@ -0,0 +1,53 @@ +.. _external-rabbitmq-guide: + +================= +External RabbitMQ +================= + +Sometimes, for various reasons (Redundancy, organisational policies, etc.), +it might be necessary to use an external RabbitMQ cluster. +This use case can be achieved with the following steps: + +Requirements +~~~~~~~~~~~~ + +* An existing RabbitMQ cluster, reachable from all of your + nodes. + +Enabling External RabbitMQ support +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In order to enable external RabbitMQ support, +you will first need to disable RabbitMQ deployment, +by ensuring the following line exists within ``/etc/kolla/globals.yml`` : + +.. code-block:: yaml + + enable_rabbitmq: "no" + + +Overwriting transport_url within ``globals.yml`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you use an external RabbitMQ cluster, you must overwrite +``*_transport_url`` within ``/etc/kolla/globals.yml`` + +.. code-block:: yaml + + rpc_transport_url: + notify_transport_url: + nova_cell_rpc_transport_url: + nova_cell_notify_transport_url: + +For example: + +.. code-block:: yaml + + rpc_transport_url: rabbit://openstack:6Y6Eh3blPXB1Qn4190JKxRoyVhTaFsY2k2V0DuIc@10.0.0.1:5672,openstack:6Y6Eh3blPXB1Qn4190JKxRoyVhTaFsY2k2V0DuIc@10.0.0.2:5672,openstack:6Y6Eh3blPXB1Qn4190JKxRoyVhTaFsY2k2V0DuIc@10.0.0.3:5672// + notify_transport_url: "{{ rpc_transport_url }}" + nova_cell_rpc_transport_url: rabbit://openstack:6Y6Eh3blPXB1Qn4190JKxRoyVhTaFsY2k2V0DuIc@10.0.0.1:5672// + nova_cell_notify_transport_url: "{{ nova_cell_rpc_transport_url }}" + +.. note:: + + Ensure the rabbitmq user used in ``*_transport_url`` exists. diff --git a/doc/source/reference/message-queues/index.rst b/doc/source/reference/message-queues/index.rst index fe756405df..bd0fc6f8c0 100644 --- a/doc/source/reference/message-queues/index.rst +++ b/doc/source/reference/message-queues/index.rst @@ -8,3 +8,4 @@ This section describes configuration of message queue services. :maxdepth: 1 rabbitmq + external-rabbitmq-guide