Improvements in RabbitMQ stack (#280)

* Added RabbitMQ with clustering

* Moved to `rdaneel` base repo on Docker hub

* Wrong tag for `rdaneel/rabbitmq-conf`

* merging @andyshinn and @inabhi9 work

* merging @andyshinn and @inabhi9 work

* erlang cookie moved under environment instead of entrypoint

* added defaul cookie

* Aligned to dockerfile description

* bullets
This commit is contained in:
ddmng 2016-09-16 02:00:56 +02:00 committed by Bill Maxwell
parent f00316fa15
commit ea47b6acf8
4 changed files with 86 additions and 2 deletions

View File

@ -0,0 +1,12 @@
RabbitMQ 3.6 with easy Rancher clustering
===
Provides RabbitMQ image that can scale to a cluster.
The following environment variables are passed to confd in order to set up RabbitMQ's configuration file:
* Partition handling: RabbitMQ's cluster handling setting: default set to autoheal
* Erlang cookie: cookie to allow nodes communication: default set to defaultcookiepleasechange
* Net ticktime: adjusts the frequency of both tick messages and detection of failures: default set to 60
* Confd args: additional confd args along with default --backend rancher --prefix /2015-07-25: default set to --interval 5
*Note*: You can pass an alternate `confd` configuration via the `ALTERNATE_CONF` environment variable.

View File

@ -0,0 +1,33 @@
rabbitmq:
image: rdaneel/rabbitmq-conf:0.2.0
labels:
io.rancher.container.hostname_override: container_name
io.rancher.sidekicks: rabbitmq-base,rabbitmq-datavolume
volumes_from:
- rabbitmq-datavolume
environment:
- RABBITMQ_NET_TICKTIME=${net_ticktime}
- RABBITMQ_CLUSTER_PARTITION_HANDLING=${cluster_partition_handling}
- CONFD_ARGS=${confd_args}
rabbitmq-datavolume:
labels:
io.rancher.container.hostname_override: container_name
io.rancher.container.start_once: true
volumes:
- /etc/rabbitmq
- /opt/rancher/bin
entrypoint: /bin/true
image: rabbitmq:3.6-management
rabbitmq-base:
labels:
io.rancher.container.hostname_override: container_name
image: rabbitmq:3.6-management
restart: always
volumes_from:
- rabbitmq-datavolume
net: "container:rabbitmq"
entrypoint:
- /opt/rancher/bin/run.sh
environment:
- RABBITMQ_ERLANG_COOKIE=${erlang_cookie}

View File

@ -0,0 +1,39 @@
.catalog:
name: "Rabbit MQ"
version: "0.2.0"
decription: A reliable, distributed messaging broker
questions:
- variable: "erlang_cookie"
description: "Erlang cookie required for auth"
label: "Erlang cookie:"
required: true
default: defaultcookiepleasechange
type: "string"
- variable: "cluster_partition_handling"
label: "Partition Handling:"
description: "Cluster partition handling mode"
required: true
type: "enum"
default: autoheal
options:
- autoheal
- ignore
- pause_minority
- variable: "net_ticktime"
description: "Rabbitmq net ticktime setting"
label: "Net ticktime:"
required: false
type: "int"
default: 60
- variable: "confd_args"
description: "Confd additional args"
label: "Confd args"
required: false
type: "string"
default: --interval 5
rabbitmq:
metadata:
rabbitmq:
config:
node.name: "$${HOSTNAME}"

View File

@ -1,5 +1,5 @@
name: RabbitMQ 3.6.1
name: RabbitMQ 3.6
description: |
Robust messaging for applications
version: 0.1.0
version: 0.2.0
category: Message queues