Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 342: Change the location of zu.jar in zookeeper Image #343

Merged
merged 2 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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