Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 29 Current »

This section describes how to configure multi-tenant AMQP for multiple datacenters.

For a distributed platform, Abiquo you will create a virtual host for the API and watchtower, and then separate virtual hosts for each datacenter.

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

RabbitMQ multitenant properties

Property name

Description

Context

abiquo.rabbitmq.multitenant

To enable multitenant, set to true. By default it is disabled (false)

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.

  1. In the abiquo.properties file, set abiquo.rabbitmq.multitenant to true

  2. 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)

Create an Abiquo API user with full access to the configured virtual host. Replace admin and admin with values for your environment.

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.

  1. On the Watchtower server, edit the watchtower properties files at these locations

    /etc/abiquo/watchtower/emmett.properties
    /etc/abiquo/watchtower/delorean.properties
  2. In each file, configure the following properties. For a datanode services cluster, enter the three IP addresses, separated by commas.

    abiquo.rabbitmq.username = {$RABBITMQ_USER}
    abiquo.rabbitmq.password = {$RABBITMQ_PASSWORD}
    abiquo.rabbitmq.addresses = {$DATANODE_IP_ADDRESS}:5672
    abiquo.rabbitmq.virtualHost = /
  3. Restart the abiquo-emmett and abiquo-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. Use the value of this property as the name of a new virtual host for the datacenter.

  1. Create a new virtual host named with the value of the abiquo.datacenter.id property value

    rabbitmqctl add_vhost dc2
  2. Add a new user for the new datacenter

     rabbitmqctl add_user dc2_user dc2_password
  3. Configure access to the new virtual host for the Abiquo API user

    rabbitmqctl set_permissions -p dc2 admin ".*" ".*" ".*"
  4. Configure access to the new virtual host for the datacenter user

     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.

> rabbitmqctl list_permissions -p /
Listing permissions in vhost "/" ...
admin.*.*.*
> 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 match the configured values.

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

To configure a monolithic installation:

  • Configure the API virtual host as the same as the monolithic datacenter (value of property abiquo.datacenter.id

  • Configure access to the datacenter virtual host for Abiquo API user

  • Note that you do not need a separate user for the datacenter

You can add any other datacenters (that are not monolithic) as described in the previous section.

  • No labels