Browse Source

Allow custom repositories for RabbitMQ container

With this change one will be able to set custom RabbitMQ repository and
its key, as well as specify custom autocluster location (latter seems ugly,
but unfortunately no repository for autocluster yet).

Change-Id: Ib3d6536d8c9fe8b8d7c5d13d4481772b66cc9db0
Aleksandr Mogylchenko 2 years ago
parent
commit
c4cdedef84

+ 7
- 4
docker/rabbitmq/Dockerfile.j2 View File

@@ -14,12 +14,15 @@ RUN apt-get install -t jessie-backports -y --no-install-recommends \
14 14
   && apt-get clean
15 15
 
16 16
 # We need at least 3.6.6, as it'll contain https://github.com/rabbitmq/rabbitmq-server/pull/892
17
-RUN curl -Lo /tmp/rabbitmq-server.deb https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_6_6/rabbitmq-server_3.6.6-1_all.deb \
18
-  && dpkg -i /tmp/rabbitmq-server.deb \
19
-  && rm -rf /tmp/rabbitmq-server.deb /var/lib/rabbitmq/*
17
+COPY {{ render('sources.list.debian.j2') }} /etc/apt/sources.list.d/rabbitmq.list
18
+RUN apt-key adv --recv-keys --keyserver {{ url.rabbitmq.debian.keyserver }} \
19
+  {{ url.rabbitmq.debian.keyid }} \
20
+  && apt-get update \
21
+  && apt-get install -y rabbitmq-server={{ rabbitmq_version }} \
22
+  && rm -rf /var/lib/rabbitmq/*
20 23
 
21 24
 # `cp` is needed until https://github.com/rabbitmq/rabbitmq-server/pull/1016 is merged
22
-RUN curl -Lo /tmp/rabbitmq-autocluster.deb https://github.com/Mirantis/rabbitmq-autocluster/releases/download/0.6.1.950/rabbitmq-autocluster_0.6.1.950-1_all.deb \
25
+RUN curl -Lo /tmp/rabbitmq-autocluster.deb {{ url.autocluster.provider }}/rabbitmq-autocluster_{{ autocluster_version }}_all.deb \
23 26
   && dpkg -i /tmp/rabbitmq-autocluster.deb \
24 27
   && cp -v /usr/lib/rabbitmq/plugins/*.ez /usr/lib/rabbitmq/lib/rabbitmq_server-*/plugins/
25 28
 

+ 2
- 0
docker/rabbitmq/sources.list.debian.j2 View File

@@ -0,0 +1,2 @@
1
+# Rabbitmq repo
2
+deb {{ url.rabbitmq.debian.repo }} testing main

+ 13
- 0
service/files/defaults.yaml View File

@@ -10,3 +10,16 @@ configs:
10 10
     # How many seconds we give a node before making liveness checks
11 11
     # completely strict
12 12
     node_startup_timeout: 180
13
+
14
+url:
15
+  rabbitmq:
16
+    debian:
17
+      repo: http://www.rabbitmq.com/debian/
18
+      keyserver: hkps.pool.sks-keyservers.net
19
+      keyid: 6B73A36E6026DFCA
20
+  autocluster:
21
+    provider: https://github.com/Mirantis/rabbitmq-autocluster/releases/download/0.6.1.950
22
+
23
+versions:
24
+  rabbitmq_version: "3.6.6-1"
25
+  autocluster_version: "0.6.1.950-1"

Loading…
Cancel
Save