Skip to content

Commit

Permalink
Issue 342: Change the location of zu.jar in zookeeper Image (#343)
Browse files Browse the repository at this point in the history
* Changing the path of zu.jar

Signed-off-by: anishakj <[email protected]>

* Added the missing file

Signed-off-by: anishakj <[email protected]>
  • Loading branch information
anishakj authored Jun 8, 2021
1 parent b087a7f commit 75d5e78
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN ./gradlew --console=verbose --info shadowJar
FROM ${DOCKER_REGISTRY:+$DOCKER_REGISTRY/}zookeeper:3.6.1
COPY bin /usr/local/bin
RUN chmod +x /usr/local/bin/*
COPY --from=0 /zu/build/libs/zu.jar /root/
COPY --from=0 /zu/build/libs/zu.jar /opt/libs/

RUN apt-get -q update && \
apt-get install -y dnsutils curl procps
4 changes: 2 additions & 2 deletions docker/bin/zookeeperReady.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ if [[ "$OK" == "imok" ]]; then
ROLE=participant
ZKURL=$(zkConnectionString)
ZKCONFIG=$(zkConfig)
java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar remove $ZKURL $MYID
java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /opt/libs/zu.jar remove $ZKURL $MYID
sleep 1
java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar add $ZKURL $MYID $ZKCONFIG
java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /opt/libs/zu.jar add $ZKURL $MYID $ZKCONFIG
exit 0
else
echo "Something has gone wrong. Unable to determine zookeeper role."
Expand Down
2 changes: 1 addition & 1 deletion docker/bin/zookeeperStart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ if [[ "$REGISTER_NODE" == true ]]; then
ZKCONFIG=$(zkConfig)
set -e
echo Registering node and writing local configuration to disk.
java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar add $ZKURL $MYID $ZKCONFIG $DYNCONFIG
java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /opt/libs/zu.jar add $ZKURL $MYID $ZKCONFIG $DYNCONFIG
set +e
fi

Expand Down
4 changes: 2 additions & 2 deletions docker/bin/zookeeperTeardown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ set -e
MYID=`cat $MYID_FILE`

ZNODE_PATH="/zookeeper-operator/$CLUSTER_NAME"
CLUSTERSIZE=`java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar sync $ZKURL $ZNODE_PATH`
CLUSTERSIZE=`java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /opt/libs/zu.jar sync $ZKURL $ZNODE_PATH`
echo "CLUSTER_SIZE=$CLUSTERSIZE, MyId=$MYID"
if [[ -n "$CLUSTERSIZE" && "$CLUSTERSIZE" -lt "$MYID" ]]; then
# If ClusterSize < MyId, this server is being permanantly removed.
java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /root/zu.jar remove $ZKURL $MYID
java -Dlog4j.configuration=file:"$LOG4J_CONF" -jar /opt/libs/zu.jar remove $ZKURL $MYID
echo $?
fi

Expand Down

0 comments on commit 75d5e78

Please sign in to comment.