`kombu` is a higher-level messaging library than `amqp`. For our
purposes, we can treat it mostly as a wrapper for `amqp` with some
slightly more convenient interfaces, but it has one key feature that's
of interest to us: it supports multiple RabbitMQ broker URLs with
round-robin failover between them. This makes it possible to configure
lp-mailman to use RabbitMQ with high availability: if we have a RabbitMQ
cluster, then we can configure lp-mailman with broker URLs for all the
nodes in the cluster, and if one fails then `kombu` will automatically
fail over to the next.
To make it practical to configure this, I had to add a
`rabbitmq.broker_urls` configuration option, which supersedes the
existing broken-out configuration options (`rabbitmq.host`,
`rabbitmq.userid`, `rabbitmq.password`, and `rabbitmq.virtual_host`).
For backward compatibility, the old options continue to work as long as
`rabbitmq.broker_urls` is unset.
This also includes upgrading to oops-amqp 0.2.0, since that includes a
change to accept connection factories that return `kombu` connections.
This is a reduced version of https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/432065
in Launchpad, picked up when I realized that it was going to be needed
by the lp-mailman charm. Testing is difficult since we stripped out
much of the supporting code when extracting lp-mailman from Launchpad,
but at least similar code is already tested as part of Launchpad.
The tarball we were building omitted the actual Mailman code, and so
failed to build on deployed systems; it was also constructed in such a
way that we ended up trying to pull the dependencies repository again
unnecessarily. This change produces tarballs that we can actually
deploy.
The upcoming charmed redeployment will use bionic. (charmcraft doesn't
support xenial, and focal doesn't support enough of Python 2 for
lp-mailman, so bionic is the usable sweet spot for now.)
This adds "build-tarball" and "publish-tarball" make targets, which will
help us to write a Jenkins job that builds a deployment artifact and
publishes it to Swift for use by future deployment machinery.