Skip to content

Commit

Permalink
Make zookeeper version adjustable (ZK_VERSION env)
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Saponara <as@php.net>
  • Loading branch information
adsr committed Mar 26, 2019
1 parent ec48bbd commit c15d629
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
11 changes: 5 additions & 6 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,14 @@ function install_zookeeper() {
zk="zookeeper-$version"
wget "http://apache.org/dist/zookeeper/$zk/$zk.tar.gz"
tar -xzf "$zk.tar.gz"
ant -f "$zk/build.xml" package
ant -f "$zk/src/contrib/fatjar/build.xml" jar
mkdir -p lib
cp "$zk/contrib/fatjar/$zk-fatjar.jar" lib
# TODO(sougou): when version changes, see if we can drop the 'zip -d' hack to get the fatjars working.
# If yes, also delete "zip" from the Dockerfile files and the manual build instructions again.
# 3.4.13 workaround: Delete META-INF files which should not be in there.
zip -d "lib/$zk-fatjar.jar" 'META-INF/*.SF' 'META-INF/*.RSA' 'META-INF/*SF'
cp "$zk/build/contrib/fatjar/zookeeper-dev-fatjar.jar" "lib/$zk-fatjar.jar"
zip -d "lib/$zk-fatjar.jar" 'META-INF/*.SF' 'META-INF/*.RSA' 'META-INF/*SF' || true # needed for >=3.4.10 <3.5
rm -rf "$zk" "$zk.tar.gz"
}
zk_ver=3.4.13
zk_ver=${ZK_VERSION:-3.4.13}
install_dep "Zookeeper" "$zk_ver" "$VTROOT/dist/vt-zookeeper-$zk_ver" install_zookeeper


Expand Down
1 change: 1 addition & 0 deletions docker/bootstrap/Dockerfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
xvfb \
zip \
libz-dev \
ant \
&& rm -rf /var/lib/apt/lists/*

# Install Maven 3.1+
Expand Down
2 changes: 1 addition & 1 deletion go/vt/zkctl/zksrv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ logdir="$1"
config="$2"
pidfile="$3"

zk_ver=3.4.13
zk_ver=${ZK_VERSION:-3.4.13}
classpath="$VTROOT/dist/vt-zookeeper-$zk_ver/lib/zookeeper-$zk_ver-fatjar.jar:/usr/local/lib/zookeeper-$zk_ver-fatjar.jar:/usr/share/java/zookeeper-$zk_ver.jar"

mkdir -p "$logdir"
Expand Down

0 comments on commit c15d629

Please sign in to comment.