Skip to content

Commit

Permalink
Changes to support multi-version tests in antithesis (MystenLabs#18520)
Browse files Browse the repository at this point in the history
Allows the antithesis docker-compose network to be run with two
different sui-node images, with half of the validators running one image
and half running the other.
  • Loading branch information
mystenmark authored Jul 3, 2024
1 parent fa801c3 commit 226c768
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
13 changes: 11 additions & 2 deletions docker/sui-network/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG SUI_TOOLS_IMAGE_TAG

FROM mysten/sui-tools:$SUI_TOOLS_IMAGE_TAG as setup
FROM mysten/sui-tools:$SUI_TOOLS_IMAGE_TAG AS setup

RUN apt update
RUN apt install python3 python3-pip -y
Expand All @@ -11,11 +11,20 @@ COPY ./genesis /genesis

WORKDIR /

ARG SUI_NODE_A_TAG
ARG SUI_NODE_B_TAG
ENV SUI_NODE_A_TAG=$SUI_NODE_A_TAG
ENV SUI_NODE_B_TAG=$SUI_NODE_B_TAG

RUN ./new-genesis.sh
RUN echo "SUI_NODE_A_TAG=$SUI_NODE_A_TAG" >> /.env
RUN echo "SUI_NODE_B_TAG=$SUI_NODE_B_TAG" >> /.env

FROM scratch
FROM scratch

COPY ./docker-compose-antithesis.yaml /docker-compose.yaml
COPY /genesis/overlays/* /genesis/overlays/
COPY /genesis/static/* /genesis/static/
COPY --from=setup /genesis/files/* /genesis/files/
COPY --from=setup /.env /.env

10 changes: 5 additions & 5 deletions docker/sui-network/docker-compose-antithesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
networks:
sui-network:
ipv4_address: 10.0.0.11
image: sui-node:mainnet
image: sui-node:${SUI_NODE_A_TAG}
container_name: validator1
hostname: validator1
environment:
Expand All @@ -32,7 +32,7 @@ services:
networks:
sui-network:
ipv4_address: 10.0.0.12
image: sui-node:mainnet
image: sui-node:${SUI_NODE_A_TAG}
container_name: validator2
hostname: validator2
environment:
Expand All @@ -59,7 +59,7 @@ services:
networks:
sui-network:
ipv4_address: 10.0.0.13
image: sui-node:mainnet
image: sui-node:${SUI_NODE_B_TAG}
container_name: validator3
hostname: validator3
environment:
Expand All @@ -86,7 +86,7 @@ services:
networks:
sui-network:
ipv4_address: 10.0.0.14
image: sui-node:mainnet
image: sui-node:${SUI_NODE_B_TAG}
container_name: validator4
hostname: validator4
environment:
Expand All @@ -113,7 +113,7 @@ services:
networks:
sui-network:
ipv4_address: 10.0.0.15
image: sui-node:mainnet
image: sui-node:${SUI_NODE_B_TAG}
hostname: fullnode1
container_name: fullnode1
environment:
Expand Down

0 comments on commit 226c768

Please sign in to comment.