Juju Charm - RabbitMQ
Go to file
Alex Kavanagh 64a8e48a77 Fix the response of convert_from_base64()
The function takes a string, but could return a bytes in Python3.
This ensures that it returns a str if the b64decode() function is used.

Also, strip out the six module from rabbitmq_context.py as it's not
needed now the charm is py3 only.

Change-Id: Idd2bcf79152f8db90d674ea28fb99504536ab6cf
2020-02-18 18:14:30 +00:00
actions Added list-unconsumed-queues action 2019-02-27 09:36:13 +01:00
charmhelpers Charmhelper sync for 20.02 2020-02-04 16:39:58 +00:00
files Standardize auxiliary file location across os-charms 2019-09-12 15:50:58 -05:00
hooks Fix the response of convert_from_base64() 2020-02-18 18:14:30 +00:00
lib Update tox.ini files from release-tools gold copy 2016-09-19 09:33:20 +01:00
templates Change charm to py3 2018-10-24 14:50:35 +01:00
tests Enable functional tests for bionic-train 2019-10-24 13:39:29 -04:00
unit_tests Standardize auxiliary file location across os-charms 2019-09-12 15:50:58 -05:00
.gitignore Fix incorrect syntax in scripts/check_rabbitmq.py 2018-11-20 08:38:51 +00:00
.gitreview OpenDev Migration Patch 2019-04-19 19:44:42 +00:00
.stestr.conf Fix lint in unit tests re: py3-first and py2 compat 2018-11-01 21:57:56 -05:00
.zuul.yaml Switch to Ussuri jobs 2019-12-26 18:29:33 +08:00
actions.yaml Added list-unconsumed-queues action 2019-02-27 09:36:13 +01:00
charm-helpers-hooks.yaml Sync charm/ceph helpers, tox, and requirements 2019-09-30 22:42:00 -05:00
config.yaml Revert "Default to autoheal for cluster-partition-handling" 2019-12-18 22:21:32 +00:00
copyright Re-license charm as Apache-2.0 2016-07-01 18:06:36 +01:00
hardening.yaml Add hardening support 2016-03-24 11:38:33 +00:00
icon.svg Added icon.svg 2013-04-25 14:23:14 -04:00
LICENSE Re-license charm as Apache-2.0 2016-07-01 18:06:36 +01:00
Makefile Port Charm RabbitMQ func tests from Amulet to Zaza 2019-10-10 13:05:09 +11:00
metadata.yaml Update series metadata 2019-08-19 11:55:21 -04:00
README.md Trivial grammar changes: 2018-09-27 11:23:13 -04:00
requirements.txt Update requirements 2018-10-03 13:11:49 -05:00
revision Added stats cronjob and queue monitoring nagios plugin 2014-05-07 10:52:24 +01:00
setup.cfg Add Python 3 Train unit tests 2019-07-30 10:20:48 -04:00
test-requirements.txt Port Charm RabbitMQ func tests from Amulet to Zaza 2019-10-10 13:05:09 +11:00
tox.ini Port Charm RabbitMQ func tests from Amulet to Zaza 2019-10-10 13:05:09 +11:00

Overview

RabbitMQ is an implementation of AMQP, the emerging standard for high performance enterprise messaging.

The RabbitMQ server is a robust and scalable implementation of an AMQP broker.

This charm deploys RabbitMQ server and provides AMQP connectivity to clients.

Usage

To deploy this charm:

juju deploy rabbitmq-server

deploying multiple units will form a native RabbitMQ cluster:

juju deploy -n 3 rabbitmq-server
juju config rabbitmq-server min-cluster-size=3

To make use of AMQP services, simply relate other charms that support the rabbitmq interface:

juju add-relation rabbitmq-server nova-cloud-controller

Clustering

When more than one unit of the charm is deployed the charm will bring up a native RabbitMQ cluster. The process of clustering the units together takes some time. Due to the nature of asynchronous hook execution, it is possible client relationship hooks are executed before the cluster is complete. In some cases, this can lead to client charm errors.

To guarantee client relation hooks will not be executed until clustering is completed use the min-cluster-size configuration setting:

juju deploy -n 3 rabbitmq-server
juju config rabbitmq-server min-cluster-size=3

When min-cluster-size is not set the charm will still cluster, however, there are no guarantees client relation hooks will not execute before it is complete.

Single unit deployments behave as expected.

Configuration: SSL

Generate an unencrypted RSA private key for the servers and a certificate:

openssl genrsa -out rabbit-server-privkey.pem 2048

Get an X.509 certificate. This can be self-signed, for example:

openssl req -batch -new -x509 -key rabbit-server-privkey.pem -out rabbit-server-cert.pem -days 10000

Deploy the service:

juju deploy rabbitmq-server

Enable SSL, passing in the key and certificate as configuration settings:

juju set rabbitmq-server ssl_enabled=True ssl_key="`cat rabbit-server-privkey.pem`" ssl_cert="`cat rabbit-server-cert.pem`"

Configuration: source

To change the source that the charm uses for packages:

juju set rabbitmq-server source="cloud:precise-icehouse"

This will enable the Icehouse pocket of the Cloud Archive (which contains a new version of RabbitMQ) and upgrade the install to the new version.

The source option can be used in a few different ways:

source="ppa:james-page/testing" - use the testing PPA owned by james-page
source="http://myrepo/ubuntu main" - use the repository located at the provided URL

The charm also supports use of arbitrary archive key's for use with private repositories:

juju set rabbitmq-server key="C6CEA0C9"

Note that in clustered configurations, the upgrade can be a bit racey as the services restart and re-cluster; this is resolvable using (with Juju version < 2.0) :

juju resolved --retry rabbitmq-server/1

Or using the following command with Juju 2.0 and above:

juju resolved rabbitmq-server/1

Network Spaces support

This charm supports the use of Juju Network Spaces, allowing the charm to be bound to network space configurations managed directly by Juju. This is only supported with Juju 2.0 and above.

The amqp relation can be bound to a specific network space, allowing client connections to be routed over specific networks:

juju deploy rabbitmq-server --bind "amqp=internal-space"

alternatively this can also be provided as part of a juju native bundle configuration:

rabbitmq-server:
  charm: cs:xenial/rabbitmq-server
  num_units: 1
  bindings:
    amqp: internal-space

NOTE: Spaces must be configured in the underlying provider prior to attempting to use them.

NOTE: Existing deployments using the access-network configuration option will continue to function; this option is preferred over any network space binding provided if set.

Contact Information

Author: OpenStack Charmers openstack-charmers@lists.ubuntu.com Bugs: http://bugs.launchpad.net/charms/+source/rabbitmq-server/+filebug Location: http://jujucharms.com/rabbitmq-server