docker compose rabbitmq #0

Supports: trusty

Add to new model

Description

Compose is a tool for defining and running complex applications with Docker.
With Compose, you define a multi-container application in a single file,
then spin your application up in a single command which does everything
that needs to be done to get it running.
This charm deploys RabbitMQ as a Docker container via Compose.


Docker Compose Subordinate + RabbitMQ

This charm enables you to deploy a docker-compose based formation, out of any
arbitrary GIT repository.

This version is preconfigured to run a RabbitMQ container, and expose what needs to be exposed.

Usage

Ensure you have a docker-cluster running complete with the registrator charm:

juju deploy docker
juju deploy cs:~zoology/trusty/registrator registrator
juju deploy cs:~zoology/trusty/consul consul
juju deploy nginx-proxy
juju add-relation registrator docker
juju add-relation registrator:consul-api consul:api
juju add-relation nginx-proxy:template consul:api

Now you can deploy a RabbitMQ server encapsulated as a docker container:

juju deploy cs:~samuel-cozannet/trusty/docker-compose-rabbitmq rabbitmq
juju add-relation rabbitmq docker
juju expose rabbitmq

Scale out usage

Scaling out in the case of Docker means using a Docker Cluster, which can be achieved with Swarm.

juju deploy -n3 --constraints "mem=4G cpu-cores=4 root-disk=32G" cs:~lazypower/trusty/swarm
juju deploy -n3 etcd
juju add-relation swarm etcd

Now you can deploy a RabbitMQ server encapsulated as a docker container:

juju deploy cs:~samuel-cozannet/trusty/docker-compose-rabbitmq rabbitmq
juju add-relation rabbitmq swarm
juju expose rabbitmq

Known Limitations and Issues

Connecting to containerized apps

In the current design it's not possible to relate two containers together, or an app deployed via Juju to a containerized app.

To connect to a container you have to use the Juju command

juju status --format tabular

And look at IP addresses and ports.

Configuration

[todo]

Contact Information

Charles Butler (LazyPower) charles.butler@canonical.com
Samuel Cozannet (SaMnCo) samuel.cozannet@canonical.com


Configuration

arguments
(string) Optional arguments to pass to docker-compose. Defaults to `start`
path
(string) path in repository to docker-compose or fig.yaml, defaults to the ROOT of the path
rabbitmq/templates
repository
(string) repository to clone that holds the docker-compose.yaml or fig.yaml
https://github.com/SaMnCo/docker-apps.git