The aim of this guide is to explain how to configure multi-tenant AMQP for multiple datacenters.
...
API configuration
To configure the API:
...
.
In the
abiquo.properties
file, setabiquo.rabbitmq.multitenant
totrue
Create an API 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)
Create an Abiquo API user with full access to the configured virtual host. Replace admin
and admin
with values for your environment.
Code Block |
---|
rabbitmqctl add_user admin admin rabbitmqctl set_permissions -p / admin ".*" ".*" ".*" |
...
Watchtower configuration
The virtual host to use must be the same one configured and used by the API and the user can also be the same.
Watchtower uses the properties defined in the abiquo.properties
file, so be sure to configure the properties:
abiquo.rabbitmq.virtualHost
abiquo.rabbitmq.username
abiquo.rabbitmq.password
See Abiquo configuration properties#rabbitmqWatchtower server must use the same virtual host as the API, and it can also use the same user.
On the Watchtower server, edit the watchtower properties files at these locations
Code Block /etc/abiquo/watchtower/emmett.properties /etc/abiquo/watchtower/delorean.properties
In each file, configure the following properties. For a datanode services cluster, enter the three IP addresses, separated by commas.
Code Block abiquo.rabbitmq.username = {$RABBITMQ_USER} abiquo.rabbitmq.password = {$RABBITMQ_PASSWORD} abiquo.rabbitmq.addresses = {$DATANODE_IP_ADDRESS}:5672 abiquo.rabbitmq.virtualHost = /
Restart the
abiquo-emmett
andabiquo-delorean
services
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 and . Use the value of this property will be used 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 that 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 |
...
How to run a monolithic Abiquo with multi-tenant enabled
...