diff --git a/Makefile b/Makefile index 49b6cfb9a8..3080bd038d 100644 --- a/Makefile +++ b/Makefile @@ -218,7 +218,7 @@ stop-stress-test: start-upgrade-test: @echo "--> Starting upgrade test" $(DOCKER) build --build-arg old_version=v12.2.1 -t zetanode -f ./Dockerfile-upgrade . - $(DOCKER) build -t orchestrator -f contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild . + $(DOCKER) build -t orchestrator -f contrib/localnet/orchestrator/Dockerfile.fastbuild . cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-upgrade.yml up -d stop-upgrade-test: diff --git a/contrib/localnet/README.md b/contrib/localnet/README.md index ef2543b47a..4557077693 100644 --- a/contrib/localnet/README.md +++ b/contrib/localnet/README.md @@ -95,8 +95,6 @@ $ docker compose -f docker-compose-monitoring.yml down --remove-orphans - TSS Address (on ETH): 0xF421292cb0d3c97b90EEEADfcD660B893592c6A2 - - ## Add more e2e tests The e2e test (integration tests) are located in the orchestrator/smoketest directory. The orchestrator is a Go program. diff --git a/contrib/localnet/node.sh b/contrib/localnet/node.sh deleted file mode 100755 index 73dcacf9eb..0000000000 --- a/contrib/localnet/node.sh +++ /dev/null @@ -1,6 +0,0 @@ -if [ $# -ne 1 ] -then - echo "Usage: node.sh " - exit 1 -fi -ssh -i z.pem -oStrictHostKeyChecking=no -p "702$1" alpine@0.0.0.0 diff --git a/contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild b/contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild deleted file mode 100644 index 5cbccbc0a6..0000000000 --- a/contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild +++ /dev/null @@ -1,22 +0,0 @@ -FROM zetanode:latest as zeta -FROM ethereum/client-go:v1.10.26 as geth -FROM golang:1.20-alpine as orchestrator - -RUN apk --no-cache add jq curl bash make git build-base openssh - -COPY --from=zeta /usr/local/bin/zetacored /usr/local/bin/ -COPY --from=zeta /usr/local/bin/zetaclientd /usr/local/bin/ -COPY --from=geth /usr/local/bin/geth /usr/local/bin/ - -COPY --from=zeta /root/.ssh/localtest.pem.pub /root/.ssh/authorized_keys -COPY --from=zeta /root/.ssh/localtest.pem /root/.ssh/localtest.pem - -COPY contrib/localnet/orchestrator/start.sh /work/ -COPY contrib/localnet/orchestrator/start-upgrade.sh /work/ -COPY contrib/localnet/orchestrator/restart-zetaclientd.sh /work/ -RUN chmod +x /work/*.sh - -COPY --from=zeta /usr/local/bin/zetae2e /usr/local/bin/ -RUN chmod +x /usr/local/bin/zetae2e - -WORKDIR /work diff --git a/contrib/localnet/orchestrator/Dockerfile.fastbuild b/contrib/localnet/orchestrator/Dockerfile.fastbuild index 9357d5d90f..5cbccbc0a6 100644 --- a/contrib/localnet/orchestrator/Dockerfile.fastbuild +++ b/contrib/localnet/orchestrator/Dockerfile.fastbuild @@ -2,7 +2,7 @@ FROM zetanode:latest as zeta FROM ethereum/client-go:v1.10.26 as geth FROM golang:1.20-alpine as orchestrator -RUN apk --no-cache add jq curl bash make git build-base +RUN apk --no-cache add jq curl bash make git build-base openssh COPY --from=zeta /usr/local/bin/zetacored /usr/local/bin/ COPY --from=zeta /usr/local/bin/zetaclientd /usr/local/bin/ @@ -12,10 +12,11 @@ COPY --from=zeta /root/.ssh/localtest.pem.pub /root/.ssh/authorized_keys COPY --from=zeta /root/.ssh/localtest.pem /root/.ssh/localtest.pem COPY contrib/localnet/orchestrator/start.sh /work/ -RUN chmod +x /work/start.sh - +COPY contrib/localnet/orchestrator/start-upgrade.sh /work/ +COPY contrib/localnet/orchestrator/restart-zetaclientd.sh /work/ +RUN chmod +x /work/*.sh COPY --from=zeta /usr/local/bin/zetae2e /usr/local/bin/ RUN chmod +x /usr/local/bin/zetae2e -WORKDIR /work \ No newline at end of file +WORKDIR /work diff --git a/contrib/localnet/orchestrator/restart-zetaclientd.sh b/contrib/localnet/orchestrator/restart-zetaclientd.sh index 207eebf4aa..9b8f24e49f 100644 --- a/contrib/localnet/orchestrator/restart-zetaclientd.sh +++ b/contrib/localnet/orchestrator/restart-zetaclientd.sh @@ -1,5 +1,9 @@ #!/bin/bash +# This script is used to restart zetaclientd after an upgrade +# It waits for the upgrade height to be reached and then restarts the zetaclientd on all nodes in the network +# It interacts with the network using the zetaclientd binary + clibuilder() { echo ""