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/03/09 14:08:28 UTC

[iotdb] branch rel/1.0 updated: update docker deployment docs:make consistent of configurations between 1.0 and 1.0.1 (#9174)

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

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


The following commit(s) were added to refs/heads/rel/1.0 by this push:
     new 3c4cdc8d4a update docker deployment docs:make consistent of configurations between 1.0 and 1.0.1 (#9174)
3c4cdc8d4a is described below

commit 3c4cdc8d4a2d76b45234b94847b2ac8edac2e68a
Author: changxue2022 <11...@users.noreply.github.com>
AuthorDate: Thu Mar 9 22:08:03 2023 +0800

    update docker deployment docs:make consistent of configurations between 1.0 and 1.0.1 (#9174)
---
 docs/UserGuide/QuickStart/WayToGetIoTDB.md    | 66 +++++++++++++++------------
 docs/zh/UserGuide/QuickStart/WayToGetIoTDB.md | 58 +++++++++++++----------
 2 files changed, 70 insertions(+), 54 deletions(-)

diff --git a/docs/UserGuide/QuickStart/WayToGetIoTDB.md b/docs/UserGuide/QuickStart/WayToGetIoTDB.md
index 9ec68b8048..7c61b2c971 100644
--- a/docs/UserGuide/QuickStart/WayToGetIoTDB.md
+++ b/docs/UserGuide/QuickStart/WayToGetIoTDB.md
@@ -73,7 +73,7 @@ If you would like to build the IoTDB server, you can run the following command u
 > mvn clean package -pl server -am -DskipTests
 ```
 
-After build, the IoTDB server will be at the folder "server/target/iotdb-server-{project.version}".
+After build, the IoTDB server will be at the folder "server/target/iotdb-server-{project.version}". 
 
 If you would like to build a module, you can execute command `mvn clean package -pl {module.name} -am -DskipTests` under the root path of IoTDB.
 If you need the jar with dependencies, you can add parameter `-P get-jar-with-dependencies` after the command. E.g., If you need the jar of jdbc with dependencies, you can execute this command:
@@ -84,13 +84,13 @@ If you need the jar with dependencies, you can add parameter `-P get-jar-with-de
 
 Then you can find it under the path `{module.name}/target`.
 
-### Installation by Docker
+### Installation by Docker 
 Apache IoTDB' Docker image is released on [https://hub.docker.com/r/apache/iotdb](https://hub.docker.com/r/apache/iotdb)
 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.0.1-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.0.1-standalone              
 # execute SQL
 docker exec -ti iotdb-service /iotdb/sbin/start-cli.sh -h iotdb-service
 ```
@@ -115,24 +121,29 @@ $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.0.1-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
+        - ./data:/iotdb/data
+        - ./logs:/iotdb/logs
     networks:
       iotdb:
         ipv4_address: 172.18.0.6
@@ -151,14 +162,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
-    container_name: iotdb-confignode
-    ports:
-      - "22277:22277"
-      - "22278:22278"
+    image: apache/iotdb:1.0.1-confignode
+    container_name: iotdb-confignode1.0.1-
     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,21 +181,19 @@ services:
     network_mode: "host"
 
   iotdb-datanode:
-    image: apache/iotdb:1.0.0-datanode
+    image: apache/iotdb:1.0.1-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_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
     volumes:
@@ -195,7 +203,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 1ced1d7c30..2ee4a88634 100644
--- a/docs/zh/UserGuide/QuickStart/WayToGetIoTDB.md
+++ b/docs/zh/UserGuide/QuickStart/WayToGetIoTDB.md
@@ -75,7 +75,7 @@ Shell > unzip iotdb-<version>.zip
 +- tools/      <-- system tools
 ```
 
-如果您想要编译项目中的某个模块,您可以在源码文件夹中使用`mvn clean package -pl {module.name} -am -DskipTests`命令进行编译。如果您需要的是带依赖的 jar 包,您可以在编译命令后面加上`-P get-jar-with-dependencies`参数。比如您想编译带依赖的 jdbc jar 包,您就可以使用以下命令进行编译:
+如果您想要编译项目中的某个模块,您可以在源码文件夹中使用`mvn clean package -pl {module.name} -am -DskipTests`命令进行编译。如果您需要的是带依赖的 jar 包,您可以在编译命令后面加上`-P get-jar-with-dependencies`参数。比如您想编译带依赖的 jdbc jar 包,您就可以使用以下命令进行编译:  
 
 ```shell
 > mvn clean package -pl jdbc -am -DskipTests -P get-jar-with-dependencies
@@ -92,7 +92,7 @@ Apache IoTDB 的配置项以环境变量形式添加到容器内。
 #### 简单尝试
 ```shell
 # 获取镜像
-docker pull apache/iotdb:1.0.0-standalone
+docker pull apache/iotdb:1.0.1-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.0.1-standalone              
 # 尝试使用命令行执行SQL
 docker exec -ti iotdb-service /iotdb/sbin/start-cli.sh -h iotdb-service
 ```
@@ -121,20 +127,25 @@ $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.0.1-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
+        - ./data:/iotdb/data
+        - ./logs:/iotdb/logs
     networks:
       iotdb:
         ipv4_address: 172.18.0.6
@@ -152,15 +163,14 @@ networks:
 version: "3"
 services:
   iotdb-confignode:
-    image: apache/iotdb:1.0.0-confignode
+    image: apache/iotdb:1.0.1-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,21 +182,19 @@ services:
     network_mode: "host"
 
   iotdb-datanode:
-    image: apache/iotdb:1.0.0-datanode
+    image: apache/iotdb:1.0.1-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_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
     volumes: