The aim of this guide is to explain how to configureĀ multi-tenant AMQP for multiple datacenters.
...
Note |
---|
To use multitenant AMQP, use a separate set of remote services for each cloud location (datacenter or public cloud region). Do not share any remote services |
Table of Contents |
---|
...
RabbitMQ multitenant properties
Property name | Description | Context |
abiquo.rabbitmq.multitenant | To enable multitenant, set to | API |
abiquo.rabbitmq.virtualHost | Logical separation where the configured Abiquo service manages AMQP entities. The default virtual host is | API + RS |
abiquo.rabbitmq.username | Username to connect to broker + virtualHost | API + RS |
abiquo.rabbitmq.password | Password to connect to broker + virtualHost | API + RS |
abiquo.datacenter.id | Unique datacenter ID. For a complete description see Abiquo configuration properties#datacenter | RS |
...
API configuration
To configure the API.
In the
abiquo.properties
file, setabiquo.rabbitmq.multitenant
totrue
Create a virtual host for the API. The default virtual host is
/
and you can use this if you do not have a monolithic environment. (See below for monolithic configuration)
...
Code Block |
---|
rabbitmqctl add_user admin admin rabbitmqctl set_permissions -p / admin ".*" ".*" ".*" |
...
Watchtower configuration
The Watchtower server must use the same virtual host as the API, and it can also use the same user.
...
SeeĀ Abiquo configuration properties and search for .rabbitmq.
.
...
How to add a new data center
Each datacenter in Abiquo has a unique ID configured with the abiquo.datacenter.id
property. Use the value of this property as the name of a new virtual host for the datacenter.
Create a new virtual host named with the value of the
abiquo.datacenter.id
property valueCode Block rabbitmqctl add_vhost dc2
Add a new user for the new datacenter
Code Block rabbitmqctl add_user dc2_user dc2_password
Configure access to the new virtual host for the Abiquo API user
Code Block rabbitmqctl set_permissions -p dc2 admin ".*" ".*" ".*"
Configure access to the new virtual host for the datacenter user
Code Block rabbitmqctl set_permissions -p dc2 dc2_user ".*" ".*" ".*"
...
Check permissions in the new datacenter
To list permissions on the virtual hosts use the following commands. Log in as the api
user to access the API virtual host.
...
Code Block |
---|
> rabbitmqctl list_permissions -p dc2 Listing permissions in vhost "dc2" ... dc2_user.*.*.* admin.*.*.* |
Check properties in the new datacenter
On the Remote services servers (including separate V2V servers), edit the abiquo.properties
file and check that the properties on remote services match the configured values:.
Code Block |
---|
abiquo.datacenter.id = dc2 abiquo.rabbitmq.virtualHost = dc2 abiquo.rabbitmq.username = dc2_user abiquo.rabbitmq.password= dc2_password |
...