You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/04/06 07:54:55 UTC

[iotdb] branch rel/1.1 updated: docker deploy for v1.1.0, update docs,docker-compose files and Dockerfile (#9530)

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch rel/1.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/1.1 by this push:
     new f6b72540e6 docker deploy for v1.1.0, update docs,docker-compose files and Dockerfile (#9530)
f6b72540e6 is described below

commit f6b72540e68ba1a9dd109e3418f6baa9a44b8084
Author: changxue2022 <11...@users.noreply.github.com>
AuthorDate: Thu Apr 6 15:54:48 2023 +0800

    docker deploy for v1.1.0, update docs,docker-compose files and Dockerfile (#9530)
---
 .../DockerCompose/docker-compose-cluster-1c2d.yml  | 22 +++++---
 .../DockerCompose/docker-compose-cluster-3c3d.yml  | 60 ----------------------
 .../DockerCompose/docker-compose-host-3c3d.yml     | 27 +++++-----
 .../DockerCompose/docker-compose-standalone.yml    | 13 +++--
 docker/src/main/Dockerfile-1.0.0-confignode        |  4 +-
 docker/src/main/Dockerfile-1.0.0-datanode          |  7 +--
 docs/UserGuide/QuickStart/WayToGetIoTDB.md         | 59 ++++++++++++---------
 docs/zh/UserGuide/QuickStart/WayToGetIoTDB.md      | 49 ++++++++++--------
 8 files changed, 107 insertions(+), 134 deletions(-)

diff --git a/docker/src/main/DockerCompose/docker-compose-cluster-1c2d.yml b/docker/src/main/DockerCompose/docker-compose-cluster-1c2d.yml
index 8653fcfd2e..b430929639 100644
--- a/docker/src/main/DockerCompose/docker-compose-cluster-1c2d.yml
+++ b/docker/src/main/DockerCompose/docker-compose-cluster-1c2d.yml
@@ -19,12 +19,14 @@
 version: "3"
 services:
   iodb-confignode:
-    image: apache/iotdb:1.0.0-confignode
+    image: apache/iotdb:1.1.0-confignode
     hostname: iotdb-confignode
     container_name: iotdb-confignode
     environment:
       - cn_internal_address=iotdb-confignode
-      - cn_target_config_node_list=iotdb-confignode:22277
+      - cn_internal_port=10710
+      - cn_consensus_port=10720
+      - cn_target_config_node_list=iotdb-confignode:10710
     volumes:
         - ./data/confignode:/iotdb/data
         - ./logs/confignode:/iotdb/logs
@@ -33,7 +35,7 @@ services:
         ipv4_address: 172.18.0.2
 
   iotdb-datanode1:
-    image: apache/iotdb:1.0.0-datanode
+    image: apache/iotdb:1.1.0-datanode
     hostname: iotdb-datanode-1
     container_name: iotdb-datanode-1
     ports:
@@ -41,7 +43,11 @@ services:
     environment:
       - dn_rpc_address=iotdb-datanode-1
       - dn_internal_address=iotdb-datanode-1
-      - dn_target_config_node_list=iotdb-confignode:22277
+      - dn_target_config_node_list=iotdb-confignode:10710
+      - dn_rpc_port=6667
+      - dn_mpp_data_exchange_port=10740
+      - dn_schema_region_consensus_port=10750
+      - dn_data_region_consensus_port=10760
     volumes:
       - ./data/datanode1:/iotdb/data/
       - ./logs/datanode1:/iotdb/logs/
@@ -50,13 +56,17 @@ services:
         ipv4_address: 172.18.0.3
 
   iotdb-datanode2:
-    image: apache/iotdb:1.0.0-datanode
+    image: apache/iotdb:1.1.0-datanode
     hostname: iotdb-datanode-2
     container_name: iotdb-datanode-2
     environment:
       - dn_rpc_address=iotdb-datanode-2
       - dn_internal_address=iotdb-datanode-2
-      - dn_target_config_node_list=iotdb-confignode:22277
+      - dn_target_config_node_list=iotdb-confignode:10710
+      - dn_rpc_port=6667
+      - dn_mpp_data_exchange_port=10740
+      - dn_schema_region_consensus_port=10750
+      - dn_data_region_consensus_port=10760
     volumes:
       - ./data/datanode2:/iotdb/data/
       - ./logs/datanode2:/iotdb/logs/
diff --git a/docker/src/main/DockerCompose/docker-compose-cluster-3c3d.yml b/docker/src/main/DockerCompose/docker-compose-cluster-3c3d.yml
deleted file mode 100644
index 07a61f38b1..0000000000
--- a/docker/src/main/DockerCompose/docker-compose-cluster-3c3d.yml
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-version: "3"
-services:
-  iotdb-confignode:
-    image: apache/iotdb:1.0.0-confignode
-    container_name: iotdb-confignode
-    ports:
-      - "22277:22277"
-      - "22278:22278"
-    environment:
-      - cn_internal_address=iotdb-confignode-1
-      - cn_target_config_node_list=iotdb-confignode-1:22277
-    volumes:
-      - /etc/hosts:/etc/hosts:ro
-      - ./data/confignode:/iotdb/data
-      - ./logs/confignode:/iotdb/logs
-    networks:
-      iotdb:
-        ipv4_address: 172.18.0.12
-
-  iotdb-datanode:
-    image: apache/iotdb:1.0.0-datanode
-    container_name: iotdb-datanode
-    ports:
-      - "6667:6667"
-      - "8777:8777"
-      - "9003:9003"
-      - "50010:50010"
-      - "40010:40010"
-    environment:
-      - dn_rpc_address=iotdb-datanode-1
-      - dn_internal_address=iotdb-datanode-1
-      - dn_target_config_node_list=iotdb-confignode-1:22277
-    volumes:
-      - /etc/hosts:/etc/hosts:ro
-      - ./data/datanode1:/iotdb/data/
-      - ./logs/datanode1:/iotdb/logs/
-    networks:
-      iotdb:
-        ipv4_address: 172.18.0.13
-networks:
-  iotdb:
-    external: true
diff --git a/docker/src/main/DockerCompose/docker-compose-host-3c3d.yml b/docker/src/main/DockerCompose/docker-compose-host-3c3d.yml
index 0de9bef89f..03ac8ec9fd 100644
--- a/docker/src/main/DockerCompose/docker-compose-host-3c3d.yml
+++ b/docker/src/main/DockerCompose/docker-compose-host-3c3d.yml
@@ -19,14 +19,13 @@
 version: "3"
 services:
   iotdb-confignode:
-    image: apache/iotdb:1.0.0-confignode
+    image: apache/iotdb:1.1.0-confignode
     container_name: iotdb-confignode
-    ports:
-      - "22277:22277"
-      - "22278:22278"
     environment:
       - cn_internal_address=iotdb-1
-      - cn_target_config_node_list=iotdb-1:22277
+      - cn_target_config_node_list=iotdb-1:10710
+      - cn_internal_port=10710
+      - cn_consensus_port=10720
       - schema_replication_factor=3
       - schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
       - config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
@@ -37,22 +36,20 @@ services:
     network_mode: "host"
 
   iotdb-datanode:
-    image: apache/iotdb:1.0.0-datanode
+    image: apache/iotdb:1.1.0-datanode
     container_name: iotdb-datanode
-    ports:
-      - "6667:6667"
-      - "8777:8777"
-      - "9003:9003"
-      - "50010:50010"
-      - "40010:40010"
     environment:
       - dn_rpc_address=iotdb-1
       - dn_internal_address=iotdb-1
-      - dn_target_config_node_list=iotdb-1:22277
+      - dn_target_config_node_list=iotdb-1:10710
+      - dn_rpc_port=6667
+      - dn_mpp_data_exchange_port=10740
+      - dn_schema_region_consensus_port=10750
+      - dn_data_region_consensus_port=10760
       - data_replication_factor=3
       - data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
     volumes:
       - /etc/hosts:/etc/hosts:ro
-      - ./data/datanode1:/iotdb/data/
-      - ./logs/datanode1:/iotdb/logs/
+      - ./data/datanode:/iotdb/data/
+      - ./logs/datanode:/iotdb/logs/
     network_mode: "host"
diff --git a/docker/src/main/DockerCompose/docker-compose-standalone.yml b/docker/src/main/DockerCompose/docker-compose-standalone.yml
index 4680bbe779..c7b8a58d57 100644
--- a/docker/src/main/DockerCompose/docker-compose-standalone.yml
+++ b/docker/src/main/DockerCompose/docker-compose-standalone.yml
@@ -19,16 +19,23 @@
 version: "3"
 services:
   iotdb-service:
-    image: apache/iotdb:1.0.0-standalone
+    image: apache/iotdb:1.1.0-standalone
     hostname: iotdb-service
     container_name: iotdb-service
     ports:
       - "6667:6667"
     environment:
       - cn_internal_address=iotdb-service
-      - cn_target_config_node_list=iotdb-service:22277
+      - cn_internal_port=10710
+      - cn_consensus_port=10720
+      - cn_target_config_node_list=iotdb-service:10710
       - dn_rpc_address=iotdb-service
-      - dn_target_config_node_list=iotdb-service:22277
+      - dn_internal_address=iotdb-service
+      - dn_rpc_port=6667
+      - dn_mpp_data_exchange_port=10740
+      - dn_schema_region_consensus_port=10750
+      - dn_data_region_consensus_port=10760
+      - dn_target_config_node_list=iotdb-service:10710
     volumes:
         - ./data:/iotdb/data
         - ./logs:/iotdb/logs
diff --git a/docker/src/main/Dockerfile-1.0.0-confignode b/docker/src/main/Dockerfile-1.0.0-confignode
index b324dcd287..44a30e9869 100644
--- a/docker/src/main/Dockerfile-1.0.0-confignode
+++ b/docker/src/main/Dockerfile-1.0.0-confignode
@@ -39,8 +39,8 @@ COPY DockerCompose/entrypoint.sh .
 RUN chmod +x *.sh && dos2unix *.sh \
   && dos2unix ${IOTDB_HOME}/conf/*.sh
 
-EXPOSE 22277
-EXPOSE 22278
+EXPOSE 10710
+EXPOSE 10720
 VOLUME ${IOTDB_HOME}/data
 VOLUME ${IOTDB_HOME}/logs
 
diff --git a/docker/src/main/Dockerfile-1.0.0-datanode b/docker/src/main/Dockerfile-1.0.0-datanode
index f94d591991..13152cd267 100644
--- a/docker/src/main/Dockerfile-1.0.0-datanode
+++ b/docker/src/main/Dockerfile-1.0.0-datanode
@@ -29,7 +29,8 @@ RUN apt update \
 COPY target/${target}.zip /
 RUN cd / && unzip ${target}.zip \
   && rm ${target}.zip \
-  && mv apache-iotdb-${version}-server-bin iotdb
+  && mv ${target} iotdb
+#  && mv apache-iotdb-${version}-server-bin iotdb
 
 ENV IOTDB_HOME=/iotdb VERSION=${version}
 WORKDIR ${IOTDB_HOME}/sbin
@@ -41,8 +42,8 @@ RUN chmod +x *.sh && dos2unix *.sh \
   && dos2unix ${IOTDB_HOME}/conf/*.sh
 
 EXPOSE 6667
-EXPOSE 8777
-EXPOSE 9003
+EXPOSE 10740
+EXPOSE 10730
 VOLUME $IOTDB_HOME/data
 VOLUME $IOTDB_HOME/logs
 
diff --git a/docs/UserGuide/QuickStart/WayToGetIoTDB.md b/docs/UserGuide/QuickStart/WayToGetIoTDB.md
index b714ce740a..bda484bcd2 100644
--- a/docs/UserGuide/QuickStart/WayToGetIoTDB.md
+++ b/docs/UserGuide/QuickStart/WayToGetIoTDB.md
@@ -35,9 +35,9 @@ To use IoTDB, you need to have:
 2. Maven >= 3.6 (Optional)
 3. Set the max open files num as 65535 to avoid "too many open files" problem.
 
-> Note: If you don't have maven installed, you should replace 'mvn' in the following commands with 'mvnw' or 'mvnw.cmd'.
-
-### Installation from binary files
+>Note: If you don't have maven installed, you should replace 'mvn' in the following commands with 'mvnw' or 'mvnw.cmd'.
+>
+>### Installation from binary files
 
 You can download the binary file from:
 [Download page](https://iotdb.apache.org/Download/)
@@ -90,7 +90,7 @@ Add environments of docker to update the configurations of Apache IoTDB.
 #### Have a try
 ```shell
 # get IoTDB official image
-docker pull apache/iotdb:1.0.0-standalone
+docker pull apache/iotdb:1.1.0-standalone
 # create docker bridge network
 docker network create --driver=bridge --subnet=172.18.0.0/16 --gateway=172.18.0.1 iotdb
 # create docker container
@@ -100,11 +100,17 @@ docker run -d --name iotdb-service \
               --ip 172.18.0.6 \
               -p 6667:6667 \
               -e cn_internal_address=iotdb-service \
-              -e cn_target_config_node_list=iotdb-service:22277 \
+              -e cn_target_config_node_list=iotdb-service:10710 \
+              -e cn_internal_port=10710 \
+              -e cn_consensus_port=10720 \
               -e dn_rpc_address=iotdb-service \
               -e dn_internal_address=iotdb-service \
-              -e dn_target_config_node_list=iotdb-service:22277 \
-              apache/iotdb:1.0.0-standalone              
+              -e dn_target_config_node_list=iotdb-service:10710 \
+              -e dn_mpp_data_exchange_port=10740 \
+              -e dn_schema_region_consensus_port=10750 \
+              -e dn_data_region_consensus_port=10760 \
+              -e dn_rpc_port=6667 \
+              apache/iotdb:1.1.0-standalone              
 # execute SQL
 docker exec -ti iotdb-service /iotdb/sbin/start-cli.sh -h iotdb-service
 ```
@@ -115,21 +121,27 @@ $IOTDB_HOME/sbin/start-cli.sh -h <IP Address/hostname> -p 6667
 ```
 Notice:The confignode service would fail when restarting this container if the IP Adress of the container has been changed.
 ```yaml
-# docker-compose-1c1d.yml
+# docker-compose-standalone.yml
 version: "3"
 services:
   iotdb-service:
-    image: apache/iotdb:1.0.0-standalone
+    image: apache/iotdb:1.1.0-standalone
     hostname: iotdb-service
     container_name: iotdb-service
     ports:
       - "6667:6667"
     environment:
       - cn_internal_address=iotdb-service
-      - cn_target_config_node_list=iotdb-service:22277
+      - cn_internal_port=10710
+      - cn_consensus_port=10720
+      - cn_target_config_node_list=iotdb-service:10710
       - dn_rpc_address=iotdb-service
       - dn_internal_address=iotdb-service
-      - dn_target_config_node_list=iotdb-service:22277
+      - dn_rpc_port=6667
+      - dn_mpp_data_exchange_port=10740
+      - dn_schema_region_consensus_port=10750
+      - dn_data_region_consensus_port=10760
+      - dn_target_config_node_list=iotdb-service:10710
     volumes:
         - ./data:/iotdb/data
         - ./logs:/iotdb/logs
@@ -151,14 +163,13 @@ Here is the docker-compose file of iotdb-2, as the sample:
 version: "3"
 services:
   iotdb-confignode:
-    image: apache/iotdb:1.0.0-confignode
+    image: apache/iotdb:1.1.0-confignode
     container_name: iotdb-confignode
-    ports:
-      - "22277:22277"
-      - "22278:22278"
     environment:
       - cn_internal_address=iotdb-2
-      - cn_target_config_node_list=iotdb-1:22277
+      - cn_target_config_node_list=iotdb-1:10710
+      - cn_internal_port=10710
+      - cn_consensus_port=10720
       - schema_replication_factor=3
       - schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
       - config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
@@ -171,19 +182,17 @@ services:
     network_mode: "host"
 
   iotdb-datanode:
-    image: apache/iotdb:1.0.0-datanode
+    image: apache/iotdb:1.1.0-datanode
     container_name: iotdb-datanode
-    ports:
-      - "6667:6667"
-      - "8777:8777"
-      - "9003:9003"
-      - "50010:50010"
-      - "40010:40010"
     environment:
       - dn_rpc_address=iotdb-2
       - dn_internal_address=iotdb-2
-      - dn_target_config_node_list=iotdb-1:22277
+      - dn_target_config_node_list=iotdb-1:10710
       - data_replication_factor=3
+      - dn_rpc_port=6667
+      - dn_mpp_data_exchange_port=10740
+      - dn_schema_region_consensus_port=10750
+      - dn_data_region_consensus_port=10760
       - data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
        - schema_replication_factor=3
       - schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
@@ -195,7 +204,7 @@ services:
     network_mode: "host"
 ```
 Notice:
-1. The `dn_target_config_node_list` of three nodes must the same and it is the first starting node of `iotdb-1` with the cn_internal_port of 22277。
+1. The `dn_target_config_node_list` of three nodes must the same and it is the first starting node of `iotdb-1` with the cn_internal_port of 10710。
 2. In this docker-compose file,`iotdb-2` should be replace with the real IP or hostname of each node to generate docker compose files in the other nodes.
 3. The services would talk with each other, so they need map the /etc/hosts file or add the `extra_hosts` to the docker compose file.
 4. We must start the IoTDB services of `iotdb-1` first at the first time of starting.
diff --git a/docs/zh/UserGuide/QuickStart/WayToGetIoTDB.md b/docs/zh/UserGuide/QuickStart/WayToGetIoTDB.md
index 26519e44ff..52bf70c735 100644
--- a/docs/zh/UserGuide/QuickStart/WayToGetIoTDB.md
+++ b/docs/zh/UserGuide/QuickStart/WayToGetIoTDB.md
@@ -92,7 +92,7 @@ Apache IoTDB 的配置项以环境变量形式添加到容器内。
 #### 简单尝试
 ```shell
 # 获取镜像
-docker pull apache/iotdb:1.0.0-standalone
+docker pull apache/iotdb:1.1.0-standalone
 # 创建 docker bridge 网络
 docker network create --driver=bridge --subnet=172.18.0.0/16 --gateway=172.18.0.1 iotdb
 # 创建 docker 容器
@@ -103,11 +103,17 @@ docker run -d --name iotdb-service \
               --ip 172.18.0.6 \
               -p 6667:6667 \
               -e cn_internal_address=iotdb-service \
-              -e cn_target_config_node_list=iotdb-service:22277 \
+              -e cn_target_config_node_list=iotdb-service:10710 \
+              -e cn_internal_port=10710 \
+              -e cn_consensus_port=10720 \
               -e dn_rpc_address=iotdb-service \
               -e dn_internal_address=iotdb-service \
-              -e dn_target_config_node_list=iotdb-service:22277 \
-              apache/iotdb:1.0.0-standalone              
+              -e dn_target_config_node_list=iotdb-service:10710 \
+              -e dn_mpp_data_exchange_port=10740 \
+              -e dn_schema_region_consensus_port=10750 \
+              -e dn_data_region_consensus_port=10760 \
+              -e dn_rpc_port=6667 \
+              apache/iotdb:1.1.0-standalone              
 # 尝试使用命令行执行SQL
 docker exec -ti iotdb-service /iotdb/sbin/start-cli.sh -h iotdb-service
 ```
@@ -121,17 +127,23 @@ $IOTDB_HOME/sbin/start-cli.sh -h <主机IP/hostname> -p 6667
 version: "3"
 services:
   iotdb-service:
-    image: apache/iotdb:1.0.0-standalone
+    image: apache/iotdb:1.1.0-standalone
     hostname: iotdb-service
     container_name: iotdb-service
     ports:
       - "6667:6667"
     environment:
       - cn_internal_address=iotdb-service
-      - cn_target_config_node_list=iotdb-service:22277
+      - cn_internal_port=10710
+      - cn_consensus_port=10720
+      - cn_target_config_node_list=iotdb-service:10710
       - dn_rpc_address=iotdb-service
       - dn_internal_address=iotdb-service
-      - dn_target_config_node_list=iotdb-service:22277
+      - dn_rpc_port=6667
+      - dn_mpp_data_exchange_port=10740
+      - dn_schema_region_consensus_port=10750
+      - dn_data_region_consensus_port=10760
+      - dn_target_config_node_list=iotdb-service:10710
     volumes:
         - ./data:/iotdb/data
         - ./logs:/iotdb/logs
@@ -152,15 +164,14 @@ networks:
 version: "3"
 services:
   iotdb-confignode:
-    image: apache/iotdb:1.0.0-confignode
+    image: apache/iotdb:1.1.0-confignode
     container_name: iotdb-confignode
-    ports:
-      - "22277:22277"
-      - "22278:22278"
     environment:
       - cn_internal_address=iotdb-2
-      - cn_target_config_node_list=iotdb-1:22277
+      - cn_target_config_node_list=iotdb-1:10710
       - schema_replication_factor=3
+      - cn_internal_port=10710
+      - cn_consensus_port=10720
       - schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
       - config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
       - data_replication_factor=3
@@ -172,19 +183,17 @@ services:
     network_mode: "host"
 
   iotdb-datanode:
-    image: apache/iotdb:1.0.0-datanode
+    image: apache/iotdb:1.1.0-datanode
     container_name: iotdb-datanode
-    ports:
-      - "6667:6667"
-      - "8777:8777"
-      - "9003:9003"
-      - "50010:50010"
-      - "40010:40010"
     environment:
       - dn_rpc_address=iotdb-2
       - dn_internal_address=iotdb-2
-      - dn_target_config_node_list=iotdb-1:22277
+      - dn_target_config_node_list=iotdb-1:10710
       - data_replication_factor=3
+      - dn_rpc_port=6667
+      - dn_mpp_data_exchange_port=10740
+      - dn_schema_region_consensus_port=10750
+      - dn_data_region_consensus_port=10760
       - data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
        - schema_replication_factor=3
       - schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus