Skip to content

Add support for multiple managed RabbitMQ backends

Brandon DeRosier requested to merge bdero/multiple-rabbitmq-OC-2272 into master

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.

Screenshots:

Testing instructions:

Preliminary testing instructions:

  1. Configure the new default RabbitMQ variables (see the README.md diff on this PR) in your environment to use rabbitmq-dev.opencraft.hosting for DEFAULT_RABBITMQ_API_URL and DEFAULT_INSTANCE_RABBITMQ_URL.
  2. 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 the DEFAULT 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
  3. Verify that the RabbitMQ Server admin interface looks/behaves like the screenshots above, and that a default entry was made for rabbitmq-dev matching the DEFAULT settings you configured in step 1
  4. Make a new Instance and spawn a new Appserver without specifically configuring anything related to RabbitMQ on the instance
  5. Verify that the correct RabbitMQ configuration was injected into the Ansible configuration at the start of the provision

Reviewers

  • @pomegranited

Merge request reports