Add support for multiple managed RabbitMQ backends
Similar to how multiple MySQL and MongoDB servers can be configured, this feature enables configuration of multiple RabbitMQ backends. The RabbitMQServer model will generate a default RabbitMQ server configuration via DEFAULT variables if one doesn't exist. This makes bootstrapping the first RabbitMQ server automatic, just like the LoadBalancingServer and Databases model bootstrapping is.
JIRA tickets: OC-2272.
Testing instructions:
Preliminary testing instructions:
- Configure the new default RabbitMQ variables (see the
README.md
diff on this PR) in your environment to userabbitmq-dev.opencraft.hosting
forDEFAULT_RABBITMQ_API_URL
andDEFAULT_INSTANCE_RABBITMQ_URL
. - Checkout this branch and run migrations. There should be a message logged during the migration that says
Creating RabbitMQServer rabbitmq-dev.opencraft.hosting
. This indicates that an initial RabbitMQServer configuration was bootstrapped using theDEFAULT
settings:Running migrations: Applying instance.0091_support_multiple_rabbitmq_servers...21/Jul/2017 01:52:07 | INFO | process=2491 | instance.models.rabbitmq_ | Creating RabbitMQServer rabbitmq-dev.opencraft.hosting OK
- Verify that the RabbitMQ Server admin interface looks/behaves like the screenshots above, and that a default entry was made for
rabbitmq-dev
matching theDEFAULT
settings you configured in step 1 - Make a new Instance and spawn a new Appserver without specifically configuring anything related to RabbitMQ on the instance
- Verify that the correct RabbitMQ configuration was injected into the Ansible configuration at the start of the provision
Reviewers
-
@pomegranited