From 2e07be310a96f5c23b575aabda16eac33959881a Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Fri, 16 Oct 2015 06:19:07 +0000 Subject: [PATCH] Download, install, and enable rabbitmq_cluster Change-Id: I84d7587fca64dc8a9f05e326a27511ded79e902d Partially-Implements: blueprint rabbitmq-clusterer --- docker/base/Dockerfile.j2 | 4 +++- docker/openstack-base/Dockerfile.j2 | 1 - docker/rabbitmq/Dockerfile.j2 | 12 ++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 8ae651b7e5..755060231e 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -154,7 +154,9 @@ RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD && apt-get update \ && apt-get upgrade -y \ && apt-get dist-upgrade -y \ - && apt-get install -y --no-install-recommends python \ + && apt-get install -y --no-install-recommends \ + python \ + curl \ && apt-get clean \ && sed -i "s|'purelib': '\$base/local/lib/python\$py_version_short/dist-packages',|'purelib': '\$base/lib/python\$py_version_short/dist-packages',|;s|'platlib': '\$platbase/local/lib/python\$py_version_short/dist-packages',|'platlib': '\$platbase/lib/python\$py_version_short/dist-packages',|;s|'headers': '\$base/local/include/python\$py_version_short/\$dist_name',|'headers': '\$base/include/python\$py_version_short/\$dist_name',|;s|'scripts': '\$base/local/bin',|'scripts': '\$base/bin',|;s|'data' : '\$base/local',|'data' : '\$base',|" /usr/lib/python2.7/distutils/command/install.py \ && rm -rf /usr/lib/python2.7/site-packages \ diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 62d09941f3..43a97e8755 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -58,7 +58,6 @@ RUN yum -y install \ {% elif base_distro in ['ubuntu', 'debian'] %} RUN apt-get install -y --no-install-recommends \ - curl \ ca-certificates \ build-essential \ python-dev \ diff --git a/docker/rabbitmq/Dockerfile.j2 b/docker/rabbitmq/Dockerfile.j2 index 5a14b0ebbd..f806f89779 100644 --- a/docker/rabbitmq/Dockerfile.j2 +++ b/docker/rabbitmq/Dockerfile.j2 @@ -7,20 +7,24 @@ RUN yum -y install \ hostname \ https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_5_5/rabbitmq-server-3.5.5-3.noarch.rpm \ && yum clean all \ - && rm -rf /var/lib/rabbitmq/* + && rm -rf /var/lib/rabbitmq/* \ + && curl -o /usr/lib/rabbitmq/lib/rabbitmq_server-3.5.5/plugins/rabbitmq_clusterer-3.5.x-189b3a81.ez http://www.rabbitmq.com/community-plugins/v3.5.x/rabbitmq_clusterer-3.5.x-189b3a81.ez {% elif base_distro in ['ubuntu', 'debian'] %} RUN apt-get install -y --no-install-recommends rabbitmq-server \ && apt-get clean \ - && rm -rf /var/lib/rabbitmq/* + && rm -rf /var/lib/rabbitmq/* \ + && curl -o /usr/lib/rabbitmq/lib/rabbitmq_server-3.5.4/plugins/rabbitmq_clusterer-3.5.x-189b3a81.ez http://www.rabbitmq.com/community-plugins/v3.5.x/rabbitmq_clusterer-3.5.x-189b3a81.ez {% endif %} -# NOTE(sdake): the /bin/true unblocks th rabbitmq-plugins tool. Not sure how +# NOTE(sdake): the /bin/true unblocks the rabbitmq-plugins tool. Not sure how # or why. My suspicion is it sends a signal to the parent # process. -RUN /usr/lib/rabbitmq/bin/rabbitmq-plugins enable --offline rabbitmq_management \ +RUN /usr/lib/rabbitmq/bin/rabbitmq-plugins enable --offline \ + rabbitmq_management \ + rabbitmq_clusterer \ && /bin/true COPY extend_start.sh /usr/local/bin/kolla_extend_start