VMware vCloud Director RabbitMQ Install and Setup

What is RabbitMQ and why do we need it for vCloud Director ? RabbitMQ and vCloud director utilize the Advanced Message Queuing Protocol (AMQP) which allows vCloud Director cells to exchange messages amongst each other.

When a vCloud Director Cell wishes to exchange messages (such as system notifications) with another vCloud Director cell, it places that message within an AMQP broker, in this case RabbitMQ. The recipient vCloud Director Cell then retrieves the message from the AMQP broker (RabbitMQ) and processes it.

Think of an AMQP broker as a central repository for message exchanges.

My RabbitMQ Server is a virtual machine with the following specs:

  • Hostname: vcloud6services.vmlab.local
  • O.S: CentOS 6.5 (64-bit)
  • CPU: 1 vCPU
  • RAM: 2GB
  • HDD: 20GB
  • IP: 192.168.1.168/24

At this point I have already ran through a basic server install of CentOS and applied all updates (# yum update)

RabbitMQ Install and Setup for vCloud Director

1. RabbitMQ requires the Erlang package to run. Erlang is a general purpose programming language. First up we are going to register the Erlang repository so we can download the software. To do this we use 2 commands:

  • wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
  • rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
  • Once we have registered the repository we can then install Erlang by typing # sudo yum install erlang

VMware vCloud Director RabbitMQ Setup
2. Now that Erlang is installed we can install RabbitMQ. We have to repeat a similar process where we need to register the repository. To do this we type:

  • wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el6.noarch.rpm (This is the latest version since March 2017)
  • rpm – -import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc

Now the repository has been registered, and we’ve also obtained the public key for signing, we can install the RabbitMQ package by typing

  • sudo yum install rabbitmq-server-3.6.6-1.el6.noarch.rpm

VMware vCloud Director RabbitMQ Setup
3. Once the installation is complete you should see that RabbitMQ has been Installed and marked Complete, similar to the screen shot below:

VMware vCloud Director RabbitMQ Setup
4. We’ll now set RabbitMQ to start automatically each time the server restarts. Once RabbitMQ completes the installation it does not start the server, I’ll start the service as well

  • # chkconfig rabbitmq-server on (Sets RabbitMQ to start automatically)
  • # service rabbitmq-server start (Starts RabbitMQ service)

VMware vCloud Director RabbitMQ Setup
5. Let’s check the status of the RabbitMQ server by typing # rabbitmqctl status. You should see output similar to the screen shot below

VMware vCloud Director RabbitMQ Setup
6. Next, I will add a user to RabbitMQ. This user is used to authenticate from vCloud Director to RabbitMQ:

  • # rabbitmqctl add_user vcloudamqp vcloudamqppassword (username: vcloudamqp, password: vcloudamqppassword)
  • # rabbitmqctl set_user_tags vcloudamqp administrator (tags the user as administrator)
  • # rabbitmqctl set_permissions -p / vcloudamqp “.*” “.*” “.*” (allow vlcoudamqp user full access to RabbitMQ directories)

VMware vCloud Director RabbitMQ Setup
Disclaimer:
All the tutorials included on this site are performed in a lab environment to simulate a real world production scenario. As everything is done to provide the most accurate steps to date, we take no responsibility if you implement any of these steps in a production environment.

1 Comment

  1. Hi,
    I am trying to connect vCloud director 9.5 to NSX-t2.3, getting the error

    [ 3115e6bb-7bf4-4a13-ba8e-fc5c895af0bb ] Failed to connect to the NSX Manager
    – /api/2.0/services/vcconfig, error code 98

    Please help me how to fix above error.

Leave a Reply

Your email address will not be published.


*


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.