From b8110e559cf0f6dc1454558ea26ad49a4ce129c5 Mon Sep 17 00:00:00 2001 From: Doug Szumski Date: Fri, 2 Mar 2018 10:26:07 +0000 Subject: [PATCH] Update ZooKeeper from 3.4.9 to 3.4.10 3.4.10 is the current stable release of Zookeeper. sha1sum is from: http://www-eu.apache.org/dist/zookeeper/stable/ zookeeper-3.4.10.tar.gz.sha1 Change-Id: I745f3d5949be66f8463e1e1a3d02b25d2606d256 Partially-Implements: blueprint monasca-containers --- docker/base/Dockerfile.j2 | 3 +-- docker/base/zookeeper.repo | 10 ---------- docker/zookeeper/Dockerfile.j2 | 19 ++++++++++++++++--- 3 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 docker/base/zookeeper.repo diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index a003bbed42..4d6006c20b 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -68,8 +68,7 @@ COPY yum.conf /etc/yum.conf 'nfs_ganesha.repo', 'opendaylight.repo', 'sensu.repo', - 'td.repo', - 'zookeeper.repo' + 'td.repo' ] %} {% set base_yum_repo_keys = [ diff --git a/docker/base/zookeeper.repo b/docker/base/zookeeper.repo deleted file mode 100644 index 5d2b6a6a97..0000000000 --- a/docker/base/zookeeper.repo +++ /dev/null @@ -1,10 +0,0 @@ -[iwienand-zookeeper-el7] -name=Copr repo for zookeeper-el7 owned by iwienand -baseurl=https://copr-be.cloud.fedoraproject.org/results/iwienand/zookeeper-el7/epel-7-$basearch/ -type=rpm-md -skip_if_unavailable=True -gpgcheck=1 -gpgkey=https://copr-be.cloud.fedoraproject.org/results/iwienand/zookeeper-el7/pubkey.gpg -repo_gpgcheck=0 -enabled=1 -enabled_metadata=1 diff --git a/docker/zookeeper/Dockerfile.j2 b/docker/zookeeper/Dockerfile.j2 index ec9a817efe..5ff8cc1943 100644 --- a/docker/zookeeper/Dockerfile.j2 +++ b/docker/zookeeper/Dockerfile.j2 @@ -5,20 +5,33 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{{ macros.configure_user(name='zookeeper') }} +{{ macros.configure_user(name='zookeeper', homedir='/opt/zookeeper') }} {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} {% set zookeeper_packages = [ - 'zookeeper', + 'java-1.8.0-openjdk', ] %} {% elif base_distro in ['debian', 'ubuntu'] %} {% set zookeeper_packages = [ - 'zookeeper', + 'default-jre', ] %} {% endif %} {{ macros.install_packages(zookeeper_packages | customizable("packages")) }} +{% block zookeeper_version %} +ENV zookeeper_version=3.4.10 +ENV zookeeper_url=http://apache.mirror.anlx.net/zookeeper/stable/zookeeper-${zookeeper_version}.tar.gz +ENV zookeeper_pkg_sha1sum=eb2145498c5f7a0d23650d3e0102318363206fba +{% endblock %} + +{% block zookeeper_binary_install %} +RUN curl -sSL -o /tmp/zookeeper.tar.gz ${zookeeper_url} \ + && echo "${zookeeper_pkg_sha1sum} /tmp/zookeeper.tar.gz" | sha1sum -c \ + && tar --strip 1 -xvf /tmp/zookeeper.tar.gz -C /opt/zookeeper \ + && rm -f /tmp/zookeeper.tar.gz +{% endblock %} + COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start