Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit 340e654

Browse files
authored
Update zk version to 3.4.14 in dist and install zk in ubuntu 16/18 di… (#3411)
* Update zk version to 3.4.14 in dist and install zk in ubuntu 16/18 dist docker image * fix path * Add back docker ARG
1 parent dcd1b92 commit 340e654

8 files changed

+159
-91
lines changed

docker/base/Dockerfile.base.debian9

+3-29
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,10 @@ RUN apt-get -y update && apt-get -y install \
2727
rm -rf /var/lib/apt/lists/*
2828

2929
# install zookeeper
30-
ARG ZK_DIST=zookeeper-3.4.10
30+
ARG ZK_DIST=zookeeper-3.4.14
31+
ADD base/scripts /opt/heron-docker/scripts
3132

32-
RUN curl -O "https://archive.apache.org/dist/zookeeper/$ZK_DIST/$ZK_DIST.tar.gz" \
33-
&& tar -xzf $ZK_DIST.tar.gz -C /opt \
34-
&& rm -r $ZK_DIST.tar.gz \
35-
&& mv /opt/$ZK_DIST /opt/zookeeper \
36-
&& rm -rf /opt/zookeeper/CHANGES.txt \
37-
/opt/zookeeper/README.txt \
38-
/opt/zookeeper/NOTICE.txt \
39-
/opt/zookeeper/CHANGES.txt \
40-
/opt/zookeeper/README_packaging.txt \
41-
/opt/zookeeper/build.xml \
42-
/opt/zookeeper/config \
43-
/opt/zookeeper/contrib \
44-
/opt/zookeeper/dist-maven \
45-
/opt/zookeeper/docs \
46-
/opt/zookeeper/ivy.xml \
47-
/opt/zookeeper/ivysettings.xml \
48-
/opt/zookeeper/recipes \
49-
/opt/zookeeper/src \
50-
/opt/zookeeper/$ZK_DIST.jar.asc \
51-
/opt/zookeeper/$ZK_DIST.jar.md5 \
52-
/opt/zookeeper/$ZK_DIST.jar.sha1
33+
RUN sh /opt/heron-docker/scripts/install-zookeeper.sh $ZK_DIST
5334

5435
ADD base/conf/zookeeper.conf /opt/zookeeper/conf/zookeeper.conf
5536
ADD base/conf/sandbox.conf /etc/supervisor/conf.d/
56-
57-
RUN mkdir -p /opt/zookeeper/scripts
58-
ADD base/scripts /opt/zookeeper/scripts
59-
RUN chmod +x /opt/zookeeper/scripts/generate-zookeeper-config.sh && \
60-
chmod +x /opt/zookeeper/scripts/zookeeper-ruok.sh && \
61-
chmod +x /opt/zookeeper/scripts/start-zookeeper.sh && \
62-
chmod +x /opt/zookeeper/scripts/wait-for-zookeeper.sh
+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env bash
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
19+
if [ "$#" -ne 1 ]; then
20+
echo "Usage: $0 zookeeper-<version-number>"
21+
echo "Example:"
22+
echo "$ $0 zookeeper-3.4.14"
23+
exit 1
24+
fi
25+
26+
ZK_DIST=$1
27+
28+
curl -O "https://archive.apache.org/dist/zookeeper/$ZK_DIST/$ZK_DIST.tar.gz"
29+
tar -xzf ./$ZK_DIST.tar.gz -C /opt
30+
rm ./$ZK_DIST.tar.gz
31+
32+
mv /opt/$ZK_DIST /opt/zookeeper
33+
rm -rf /opt/zookeeper/CHANGES.txt \
34+
/opt/zookeeper/README.txt \
35+
/opt/zookeeper/NOTICE.txt \
36+
/opt/zookeeper/CHANGES.txt \
37+
/opt/zookeeper/README_packaging.txt \
38+
/opt/zookeeper/build.xml \
39+
/opt/zookeeper/config \
40+
/opt/zookeeper/contrib \
41+
/opt/zookeeper/dist-maven \
42+
/opt/zookeeper/docs \
43+
/opt/zookeeper/ivy.xml \
44+
/opt/zookeeper/ivysettings.xml \
45+
/opt/zookeeper/recipes \
46+
/opt/zookeeper/src \
47+
/opt/zookeeper/$ZK_DIST.jar.asc \
48+
/opt/zookeeper/$ZK_DIST.jar.md5 \
49+
/opt/zookeeper/$ZK_DIST.jar.sha1
50+
51+
# copy zk scripts
52+
mkdir -p /opt/zookeeper/scripts
53+
cp /opt/heron-docker/scripts/generate-zookeeper-config.sh /opt/zookeeper/scripts/
54+
chmod +x /opt/heron-docker/scripts/generate-zookeeper-config.sh
55+
cp /opt/heron-docker/scripts/zookeeper-ruok.sh /opt/zookeeper/scripts/
56+
chmod +x /opt/heron-docker/scripts/zookeeper-ruok.sh
57+
cp /opt/heron-docker/scripts/start-zookeeper.sh /opt/zookeeper/scripts/
58+
chmod +x /opt/heron-docker/scripts/
59+
cp /opt/heron-docker/scripts/wait-for-zookeeper.sh /opt/zookeeper/scripts/
60+
chmod +x /opt/heron-docker/scripts/wait-for-zookeeper.sh

docker/dist/Dockerfile.dist.centos7

+9
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,12 @@ RUN ln -s /usr/local/heron/dist/heron-core /heron \
5050

5151
ENV HERON_HOME /heron/heron-core/
5252
RUN export HERON_HOME
53+
54+
# install zookeeper
55+
ARG ZK_DIST=zookeeper-3.4.14
56+
ADD dist/scripts /opt/heron-docker/scripts
57+
58+
RUN sh /opt/heron-docker/scripts/install-zookeeper.sh $ZK_DIST
59+
60+
ADD dist/conf/zookeeper.conf /opt/zookeeper/conf/zookeeper.conf
61+
ADD dist/conf/sandbox.conf /etc/supervisor/conf.d/

docker/dist/Dockerfile.dist.debian9

+4-29
Original file line numberDiff line numberDiff line change
@@ -49,38 +49,13 @@ RUN ln -s /usr/local/heron/dist/heron-core /heron \
4949
&& ln -s /usr/local/heron/release.yaml /heron
5050

5151
ENV HERON_HOME /heron/heron-core/
52+
RUN export HERON_HOME
5253

5354
# install zookeeper
54-
ARG ZK_DIST=zookeeper-3.4.10
55+
ARG ZK_DIST=zookeeper-3.4.14
56+
ADD dist/scripts /opt/heron-docker/scripts
5557

56-
RUN curl -O "https://archive.apache.org/dist/zookeeper/$ZK_DIST/$ZK_DIST.tar.gz" \
57-
&& tar -xzf /heron/$ZK_DIST.tar.gz -C /opt \
58-
&& rm -r /heron/$ZK_DIST.tar.gz \
59-
&& mv /opt/$ZK_DIST /opt/zookeeper \
60-
&& rm -rf /opt/zookeeper/CHANGES.txt \
61-
/opt/zookeeper/README.txt \
62-
/opt/zookeeper/NOTICE.txt \
63-
/opt/zookeeper/CHANGES.txt \
64-
/opt/zookeeper/README_packaging.txt \
65-
/opt/zookeeper/build.xml \
66-
/opt/zookeeper/config \
67-
/opt/zookeeper/contrib \
68-
/opt/zookeeper/dist-maven \
69-
/opt/zookeeper/docs \
70-
/opt/zookeeper/ivy.xml \
71-
/opt/zookeeper/ivysettings.xml \
72-
/opt/zookeeper/recipes \
73-
/opt/zookeeper/src \
74-
/opt/zookeeper/$ZK_DIST.jar.asc \
75-
/opt/zookeeper/$ZK_DIST.jar.md5 \
76-
/opt/zookeeper/$ZK_DIST.jar.sha1
58+
RUN sh /opt/heron-docker/scripts/install-zookeeper.sh $ZK_DIST
7759

7860
ADD dist/conf/zookeeper.conf /opt/zookeeper/conf/zookeeper.conf
7961
ADD dist/conf/sandbox.conf /etc/supervisor/conf.d/
80-
81-
RUN mkdir -p /opt/zookeeper/scripts
82-
ADD dist/scripts /opt/zookeeper/scripts
83-
RUN chmod +x /opt/zookeeper/scripts/generate-zookeeper-config.sh \
84-
&& chmod +x /opt/zookeeper/scripts/zookeeper-ruok.sh \
85-
&& chmod +x /opt/zookeeper/scripts/start-zookeeper.sh \
86-
&& chmod +x /opt/zookeeper/scripts/wait-for-zookeeper.sh

docker/dist/Dockerfile.dist.ubuntu14.04

+4-32
Original file line numberDiff line numberDiff line change
@@ -48,41 +48,13 @@ RUN ln -s /usr/local/heron/dist/heron-core /heron \
4848
&& ln -s /usr/local/heron/release.yaml /heron
4949

5050
ENV HERON_HOME /heron/heron-core/
51+
RUN export HERON_HOME
5152

5253
# install zookeeper
53-
ARG ZK_DIST=zookeeper-3.4.10
54+
ARG ZK_DIST=zookeeper-3.4.14
55+
ADD dist/scripts /opt/heron-docker/scripts
5456

55-
RUN curl -O "https://archive.apache.org/dist/zookeeper/$ZK_DIST/$ZK_DIST.tar.gz" \
56-
&& tar -xzf /heron/$ZK_DIST.tar.gz -C /opt \
57-
&& rm -r /heron/$ZK_DIST.tar.gz \
58-
&& mv /opt/$ZK_DIST /opt/zookeeper \
59-
&& rm -rf /heron/heron-install.sh \
60-
&& rm -rf /opt/zookeeper/CHANGES.txt \
61-
/opt/zookeeper/README.txt \
62-
/opt/zookeeper/NOTICE.txt \
63-
/opt/zookeeper/CHANGES.txt \
64-
/opt/zookeeper/README_packaging.txt \
65-
/opt/zookeeper/build.xml \
66-
/opt/zookeeper/config \
67-
/opt/zookeeper/contrib \
68-
/opt/zookeeper/dist-maven \
69-
/opt/zookeeper/docs \
70-
/opt/zookeeper/ivy.xml \
71-
/opt/zookeeper/ivysettings.xml \
72-
/opt/zookeeper/recipes \
73-
/opt/zookeeper/src \
74-
/opt/zookeeper/$ZK_DIST.jar.asc \
75-
/opt/zookeeper/$ZK_DIST.jar.md5 \
76-
/opt/zookeeper/$ZK_DIST.jar.sha1
57+
RUN sh /opt/heron-docker/scripts/install-zookeeper.sh $ZK_DIST
7758

7859
ADD dist/conf/zookeeper.conf /opt/zookeeper/conf/zookeeper.conf
7960
ADD dist/conf/sandbox.conf /etc/supervisor/conf.d/
80-
81-
RUN mkdir -p /opt/zookeeper/scripts
82-
ADD dist/scripts /opt/zookeeper/scripts
83-
RUN chmod +x /opt/zookeeper/scripts/generate-zookeeper-config.sh \
84-
&& chmod +x /opt/zookeeper/scripts/zookeeper-ruok.sh \
85-
&& chmod +x /opt/zookeeper/scripts/start-zookeeper.sh \
86-
&& chmod +x /opt/zookeeper/scripts/wait-for-zookeeper.sh
87-
88-
CMD ["supervisord", "-n"]

docker/dist/Dockerfile.dist.ubuntu16.04

+10-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,16 @@ RUN ln -s /usr/local/heron/dist/heron-core /heron \
4646
&& ln -s /usr/local/heron/lib /heron/heron-tools \
4747
&& ln -s /usr/local/heron/release.yaml /heron/heron-tools \
4848
&& ln -s /usr/local/heron/examples /heron \
49-
&& ln -s /usr/local/heron/release.yaml /heron \
49+
&& ln -s /usr/local/heron/release.yaml /heron
5050

5151
ENV HERON_HOME /heron/heron-core/
5252
RUN export HERON_HOME
53+
54+
# install zookeeper
55+
ARG ZK_DIST=zookeeper-3.4.14
56+
ADD dist/scripts /opt/heron-docker/scripts
57+
58+
RUN sh /opt/heron-docker/scripts/install-zookeeper.sh $ZK_DIST
59+
60+
ADD dist/conf/zookeeper.conf /opt/zookeeper/conf/zookeeper.conf
61+
ADD dist/conf/sandbox.conf /etc/supervisor/conf.d/

docker/dist/Dockerfile.dist.ubuntu18.04

+9
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,12 @@ RUN ln -s /usr/local/heron/dist/heron-core /heron \
4444

4545
ENV HERON_HOME /heron/heron-core/
4646
RUN export HERON_HOME
47+
48+
# install zookeeper
49+
ARG ZK_DIST=zookeeper-3.4.14
50+
ADD dist/scripts /opt/heron-docker/scripts
51+
52+
RUN sh /opt/heron-docker/scripts/install-zookeeper.sh $ZK_DIST
53+
54+
ADD dist/conf/zookeeper.conf /opt/zookeeper/conf/zookeeper.conf
55+
ADD dist/conf/sandbox.conf /etc/supervisor/conf.d/
+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env bash
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
19+
if [ "$#" -ne 1 ]; then
20+
echo "Usage: $0 zookeeper-<version-number>"
21+
echo "Example:"
22+
echo "$ $0 zookeeper-3.4.14"
23+
exit 1
24+
fi
25+
26+
ZK_DIST=$1
27+
28+
curl -O "https://archive.apache.org/dist/zookeeper/$ZK_DIST/$ZK_DIST.tar.gz"
29+
tar -xzf ./$ZK_DIST.tar.gz -C /opt
30+
rm ./$ZK_DIST.tar.gz
31+
32+
mv /opt/$ZK_DIST /opt/zookeeper
33+
rm -rf /opt/zookeeper/CHANGES.txt \
34+
/opt/zookeeper/README.txt \
35+
/opt/zookeeper/NOTICE.txt \
36+
/opt/zookeeper/CHANGES.txt \
37+
/opt/zookeeper/README_packaging.txt \
38+
/opt/zookeeper/build.xml \
39+
/opt/zookeeper/config \
40+
/opt/zookeeper/contrib \
41+
/opt/zookeeper/dist-maven \
42+
/opt/zookeeper/docs \
43+
/opt/zookeeper/ivy.xml \
44+
/opt/zookeeper/ivysettings.xml \
45+
/opt/zookeeper/recipes \
46+
/opt/zookeeper/src \
47+
/opt/zookeeper/$ZK_DIST.jar.asc \
48+
/opt/zookeeper/$ZK_DIST.jar.md5 \
49+
/opt/zookeeper/$ZK_DIST.jar.sha1
50+
51+
# copy zk scripts
52+
mkdir -p /opt/zookeeper/scripts
53+
cp /opt/heron-docker/scripts/generate-zookeeper-config.sh /opt/zookeeper/scripts/
54+
chmod +x /opt/heron-docker/scripts/generate-zookeeper-config.sh
55+
cp /opt/heron-docker/scripts/zookeeper-ruok.sh /opt/zookeeper/scripts/
56+
chmod +x /opt/heron-docker/scripts/zookeeper-ruok.sh
57+
cp /opt/heron-docker/scripts/start-zookeeper.sh /opt/zookeeper/scripts/
58+
chmod +x /opt/heron-docker/scripts/
59+
cp /opt/heron-docker/scripts/wait-for-zookeeper.sh /opt/zookeeper/scripts/
60+
chmod +x /opt/heron-docker/scripts/wait-for-zookeeper.sh

0 commit comments

Comments
 (0)