Move to the latest rabbitmq

This allows us to use the new simpler style conf format, as well as drop
the dependency on the deprecated clusterer plugin.

Depends-On: I921459f3e40b9e0d4af9497384e49aabf0abe79b
Change-Id: I75e00312b36e1678b90a42cf58d24652323eff27
This commit is contained in:
Paul Bourke 2018-07-20 16:34:26 +01:00
parent 3d4e284e13
commit 31c958db52
4 changed files with 21 additions and 8 deletions

View File

@ -62,7 +62,8 @@ COPY yum.conf /etc/yum.conf
'influxdb.repo',
'nfs_ganesha.repo',
'opendaylight.repo',
'td.repo'
'td.repo',
'rabbitmq_rabbitmq-server.repo'
] %}
{% set base_yum_repo_keys = [
@ -327,6 +328,7 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
'A20F259AEB9C94BB'
] %}
{% set remote_apt_keys = [
'https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey'
] %}
{% elif base_distro == 'debian' %}
{% set base_apt_keys = [
@ -340,7 +342,8 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
{% set remote_apt_keys = [
'http://obs.linaro.org/ERP:/18.06/Debian_9/Release.key',
'https://bintray.com/user/downloadSubjectPublicKey?username=bintray',
'https://download.docker.com/linux/debian/gpg'
'https://download.docker.com/linux/debian/gpg',
'https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey'
] %}
{% set base_apt_packages = base_apt_packages +
['sudo',]
@ -355,7 +358,7 @@ COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
{% endif -%}
{% endfor %}
{% for key in remote_apt_keys | customizable('remote_apt_keys') %}
{%- if loop.first %} RUN {% else %} && {% endif %}curl {{ key }} | apt-key add -
{%- if loop.first %} RUN {% else %} && {% endif %}curl -L {{ key }} | apt-key add -
{%- if not loop.last %} \
{% endif -%}
{% endfor %}

View File

@ -0,0 +1,10 @@
[rabbitmq_rabbitmq-server]
name=rabbitmq_rabbitmq-server
baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

View File

@ -32,3 +32,6 @@ deb https://sensu.global.ssl.fastly.net/apt bionic main
# Opendaylight repo
deb http://ppa.launchpad.net/odl-team/carbon/ubuntu xenial main
# rabbitmq repo
deb https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ xenial main

View File

@ -27,7 +27,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
] %}
{% else %}
{% set rabbitmq_packages = rabbitmq_packages + [
'https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server_3.6.5-1_all.deb',
'rabbitmq-server',
] %}
{% endif %}
@ -51,11 +51,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% block rabbitmq_install_plugins %}
RUN rm -rf /var/lib/rabbitmq/* \
&& ln -s /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.* /usr/lib/rabbitmq/lib/rabbitmq_server-3.6 \
&& curl -o /usr/lib/rabbitmq/lib/rabbitmq_server-3.6/plugins/rabbitmq_clusterer-3.6.x-667f92b0.ez https://www.rabbitmq.com/community-plugins/v3.6.x/rabbitmq_clusterer-3.6.x-667f92b0.ez \
&& /usr/lib/rabbitmq/bin/rabbitmq-plugins enable --offline \
rabbitmq_management \
rabbitmq_clusterer
rabbitmq_management
{% endblock %}