vCloud Availability for vCloud Director: Part 6: Install and Configure RabbitMQ Cluster

In the last post of this series, we deployed a Cassandra node and configured ssl security for Cassandra. In this post, we will be installing RabbitMQ for vCD.

If you are not following along this series, then I recommend reading earlier posts of this series from the links below:

1: vCloud Availability Introduction

2: vCloud Availability Architecture & Components

3: VCAV Deployment

4: Install Cloud Proxy for vCD

5: Deploy Cassandra Cluster

What is RabbitMQ (RMQ)?

RabbitMQ is an open source message-queuing software that helps facilitate message exchange between two or more applications. The exchange of messages is done via a queue, defined by the administrator. An application can publish a message to the queue, which can be retrieved or consumed by a different application.

A message can include any kind of information, for example, it could have information about a process/task that should start on another application may be on another server, or it could be just a simple text message.

The queue-manager software stores the messages until a receiving application connects and takes a message off the queue. The receiving application then suitably processes the message.

Why do we need RMQ for vCloud Director?

When you have a multi-cell vCD deployment in your environment, the vCD cells talk to each other and exchange information. This exchange of information is facilitated via RabbitMQ.

RabbitMQ and vCloud Director utilize the Advanced Message Queuing Protocol (AMQP) to talk to each other.

When a vCloud Director Cell wishes to exchange messages (such as system notifications or any other update) with another vCloud Director cell, it places that message within an AMQP broker (Such as RMQ) in one of the queues defined by the Administrator.

The recipient vCloud Director Cell then retrieves the message from the queue and processes it, and if needed, it can publish a message back to the queue for the source cell from where the message was originated.

In my lab, I deployed a new CentOS 6 VM and verified that its Networking, DNS, and NTP are working fine. Next is to install RabbitMQ.

1: Download and install Erlang RPM.

2: Download and Import RabbitMQ public key

3: Download and install RabbitMQ rpm.

4: Configure RabbitMQ by following the steps below:

a: Create testca, server, and client directories in /etc/rabbitmq

b: Create a rabbitmq.config file in the /etc/rabbitmq directory with the below contents

d: Enable and start the RabbitMQ server service.

e: Enable RabbitMQ UI on http://server-name:15672/

f: Create new admin user for RMQ administration

RabbitMQ SSL Configuration

1: Install Java on the RMQ node

2: Create a public and a private key

Note: In the command below, the SAN attribute contains DNS names and IP addresses of all of the RabbitMQ hosts and the load balancer. For a single RMQ node, there will be only one entry. 

If you have multiple RMQ nodes that are load-balanced via VIP, then modify the above command as shown below

3: Import the RabbitMQ key pair to the PKCS12 trust store

4: Convert the key pair file to PEM format

5: Extract the encrypted private key

6: Decrypt the private key

7: Extract the certificate

8: Install the self-signed certificates by copying them to the newly created directories.

9: Change the ownership of the newly created directories

10: Restart RMQ service

Configure a RabbitMQ Cluster

In my lab, I am not setting up a RabbitMQ cluster. But if you want to do so, then the instructions are documented here

RMQ-vCD Integration

Connect to the VCAV appliance via SSH and run the following commands to integrate vCD with RMQ.

Log in to vCD to validate the RMQ configuration under System > Administration > Extensibility

Click on Test AMQP Connection to verify vCD can talk to RMQ.

If you login to RMQ, you will see a few queues created and the vCD cell as a consumer.

And that’s it for this post. In the next post of this series, we will deploy the vSphere Replication appliances.

I hope you enjoyed reading this post. Feel free to share this on social media if it’s worth sharing. 

Leave a Reply