Skip to content

Latest commit

 

History

History
88 lines (60 loc) · 4.22 KB

File metadata and controls

88 lines (60 loc) · 4.22 KB

Event Monitoring with RabbitMQ

Note
this step is optional. It is appropriate in environments where vCloudDirector events will be pushed through RabbitMQ.

An Overview

The VMware vCloudDirector (vCD) can distribute events and notifications to other AMQP server allowing the distribution of messages to other clients, in our case RedHat CloudForms or ManageIQ. Please find below the schema of this setting. Please note that the steps in this manual must be repeated for each vCD organization that you want to support Notifications for.

docs vcd rabbitmq01 overview
Figure 1. Schematic representation of the desired ManageIQ/CloudForms configuration.

Prerequisites

We assume that vCD is already deployed with corresponding RabbitMQ installation and that you have superuser access to both of them. Furthermore, we assume that vCD already sends messages with notifications to the RabbitMQ – hence exchange named systemExchange already exists inside RabbitMQ.

We also assume that RabbitMQ has Web GUI installed, although all the configuration below can be done via RabbitMQ CLI.

Obtain UUID of the organization

Notification messages that are dropped at RabbitMQ are routed by vCD organization UUID (ORG_UUID). In this section we provide instruction how to get UUID for a specific organization using vCD Web Interface.

  • Log in as superuser of vCloudDirector (not in the organisation, in the provider access)

  • Click on "Manage organizations"

docs vcd rabbitmq02 manageVCD
Figure 2. Click on “Manage organizations” to open organizations view.
  • Click on a specific organisation

docs vcd rabbitmq03 chooseOrg
Figure 3. Select an organization from the list and click it to open up its details.
  • Read ORG_UUID from the URL

docs vcd rabbitmq04 orgID
Figure 4. ORG_UUID can be seen on the organization details view, since it’s part of the URL.

Prepare queue for organisation

Create

Navigate to Queues tab and add a new queue there, to the same Virtual host as systemExchange. Name it queue-<ORG_UUID> and leave all other parameters on default.

docs vcd rabbitmq05 setQueue
Figure 5. Adding a new queue in RabbitMQ Web GUI. Queue name is important since user permissions are given based on queue names.
Important
Please set parameters exactly as shown in the screenshot above, otherwise ManageIQ will not be able to consume messages (e.g. if you set auto delete to true instead of false).

Subscribe

Navigate to Exchanges tab and open up vCloud Directors systemExchange details (prefixed with vcd as set in AMQP broker configuration). In the Bindings subsection add binding for your queue with following routing key: #.<ORG_UUID>.

docs vcd rabbitmq06 bindQueue
Figure 6. Binding exchange to the queue.

Your queue will now receive all messages regarding specified organization. As a last step we need to add user.

Prepare user for organisation

Create

Navigate to Admin tab and add a new user without any tags. Omitting all tags restricts user to connect only to the specific queue. Please note that she will not be able to access the RabbitMQ Web UI as well.

docs vcd rabbitmq07 orgUser
Figure 7. Adding a new RabbitMQ user without any tags.

Configure

Open up user details and set Configure, Write and Read permission in Permissions subsection. For all three of them simply use queue name and set the permission.

docs vcd rabbitmq08 permissions
Figure 8. Tuning permissions for RabbitMQ user. Configure and Write permissions are required only due to a bug in MiQ library that connects to the queue.
Important
Make sure that you click “Set permission” button after you’ve input queue names or else user will not be able to consume any messages.

Summary

Following instructions above the RabbitMQ is configured so that it is safe to provide vCD organization administrator with RabbitMQ endpoint URL and credentials of the created user. She will only be able to connect to the queue that is prepared for her and therefore only consume messages related to her organization.