diff --git a/tests/pytest/cluster/clusterEnvSetup/Dockerfile b/tests/pytest/cluster/clusterEnvSetup/Dockerfile index 45021420612cf4f65b67f7dc6dc532d2c7c7db1a..c80dae72e1cd72744c6262a6f06bbb42999dfaad 100644 --- a/tests/pytest/cluster/clusterEnvSetup/Dockerfile +++ b/tests/pytest/cluster/clusterEnvSetup/Dockerfile @@ -1,12 +1,14 @@ FROM ubuntu:latest AS builder ARG PACKAGE=TDengine-server-1.6.5.10-Linux-x64.tar.gz +ARG TARBITRATORPKG=TDengine-tarbitrator-1.6.5.10-Linux-x64.tar.gz ARG EXTRACTDIR=TDengine-enterprise-server ARG CONTENT=taos.tar.gz WORKDIR /root COPY ${PACKAGE} . +COPY ${TARBITRATORPKG} . RUN tar -zxf ${PACKAGE} RUN tar -zxf ${TARBITRATORPKG} @@ -20,15 +22,6 @@ WORKDIR /root RUN apt-get update RUN apt-get install -y vim tmux net-tools RUN echo 'alias ll="ls -l --color=auto"' >> /root/.bashrc -RUN echo 'node1 172.27.0.7' >> /etc/hosts -RUN echo 'node2 172.27.0.8' >> /etc/hosts -RUN echo 'node3 172.27.0.9' >> /etc/hosts -RUN echo 'node4 172.27.0.10' >> /etc/hosts -RUN echo 'node5 172.27.0.11' >> /etc/hosts -RUN ulimit -c unlimited -RUN mkdir /coredump -RUN echo 'kernel.core_pattern=/coredump/core_%e_%p' >> /etc/sysctl.conf -RUN sysctl -p COPY --from=builder /root/bin/taosd /usr/bin COPY --from=builder /root/bin/tarbitrator /usr/bin @@ -44,4 +37,4 @@ EXPOSE 6030-6042/tcp 6060/tcp 6030-6039/udp # VOLUME [ "/var/lib/taos", "/var/log/taos", "/etc/taos" ] -CMD [ "bash" ] +CMD [ "bash" ] \ No newline at end of file diff --git a/tests/pytest/cluster/clusterEnvSetup/docker-compose.yml b/tests/pytest/cluster/clusterEnvSetup/docker-compose.yml index 21240e52d6a305158c17ec514744f24765a2f806..d322f57690de523b6685a49a4b052e5121ca705e 100644 --- a/tests/pytest/cluster/clusterEnvSetup/docker-compose.yml +++ b/tests/pytest/cluster/clusterEnvSetup/docker-compose.yml @@ -20,6 +20,11 @@ services: sh -c "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && exec my-main-application" + extra_hosts: + - "tdnode2:172.27.0.8" + - "tdnode3:172.27.0.9" + - "tdnode4:172.27.0.10" + - "tdnode5:172.27.0.11" volumes: # bind data directory - type: bind @@ -40,11 +45,14 @@ services: - type: bind source: /data target: /root - hostname: tdnode1 + hostname: tdnode1 + networks: taos_update_net: ipv4_address: 172.27.0.7 - command: taosd && tarbitrator + command: > + sh -c "tarbitrator + && taosd" td2.0-node2: build: @@ -64,6 +72,11 @@ services: sh -c "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && exec my-main-application" + extra_hosts: + - "tdnode1:172.27.0.7" + - "tdnode3:172.27.0.9" + - "tdnode4:172.27.0.10" + - "tdnode5:172.27.0.11" volumes: # bind data directory - type: bind @@ -109,6 +122,11 @@ services: sh -c "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && exec my-main-application" + extra_hosts: + - "tdnode1:172.27.0.7" + - "tdnode2:172.27.0.8" + - "tdnode4:172.27.0.10" + - "tdnode5:172.27.0.11" volumes: # bind data directory - type: bind