You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2021/05/20 07:30:07 UTC

[iotdb] branch update_cluster_docs updated: update cluster docs

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

tanxinyu pushed a commit to branch update_cluster_docs
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/update_cluster_docs by this push:
     new 9b44b67  update cluster docs
9b44b67 is described below

commit 9b44b6759b09c5217634017e0d257c1bef29ece8
Author: LebronAl <TX...@gmail.com>
AuthorDate: Thu May 20 15:29:33 2021 +0800

    update cluster docs
---
 docs/UserGuide/Cluster/Cluster-Setup-Example.md    | 20 +++++++++++++++++---
 docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md | 20 ++++++++++++++++----
 2 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/docs/UserGuide/Cluster/Cluster-Setup-Example.md b/docs/UserGuide/Cluster/Cluster-Setup-Example.md
index db2d76a..58b0854 100644
--- a/docs/UserGuide/Cluster/Cluster-Setup-Example.md
+++ b/docs/UserGuide/Cluster/Cluster-Setup-Example.md
@@ -26,13 +26,24 @@ PLEASE BE DELIBERATE IF YOU RUN IT IN PRODUCT ENVIRONMENT.__
 Note: Please install MinGW or WSL or git bash if you are using Windows.
 
 ## Example of pseudo-distributed scaffolding for 1 node and 1 replica
+### Compile from source code:
 ```
 mvn clean package -DskipTests
 chmod -R 777 ./cluster/target/
 nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh >/dev/null 2>&1 &
 ```
+### Use the official website release version:
+```
+curl -O https://mirrors.bfsu.edu.cn/apache/iotdb/0.12.0/apache-iotdb-0.12.0-cluster-bin.zip
+unzip apache-iotdb-0.12.0-cluster-bin.zip
+cd apache-iotdb-0.12.0-cluster-bin
+sed -i -e 's/^seed_nodes=127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007$/seed_nodes=127.0.0.1:9003/g' conf/iotdb-cluster.properties
+sed -i -e 's/^default_replica_num=3$/default_replica_num=1/g' conf/iotdb-cluster.properties
+nohup ./sbin/start-node.sh >/dev/null 2>&1 &
+```
 
 ## Example of pseudo-distributed scaffolding for 3 nodes and 1 replica
+### Compile from source code:
 ```
 mvn clean package -DskipTests
 chmod -R 777 ./cluster/target/
@@ -40,6 +51,8 @@ nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluste
 nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluster/target/test-classes/node2conf/ >/dev/null 2>&1 &
 nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluster/target/test-classes/node3conf/ >/dev/null 2>&1 &
 ```
+### Use the official website release version:
+You can refer to the following example, but starting multiple instances on a single machine requires handling port and data directory conflicts.
 
 ## Example of distributed scaffolding for 3 nodes and 3 replicas
 
@@ -48,9 +61,10 @@ Note: If there is no public network IP or private network IP, both can be set to
 
 The operation steps are as follows:
 
-1. Make sure ports 6567, 6667, 9003, 9004, 40010, 40011 and 31999 are open on all three nodes.
-2. Use 'mvn clean package -pl cluster -am -DskipTests' to compile the distributed module.
-3. Send the generated package (iotdb-cluster-0.13.0-SNAPSHOT) to all servers.
+
+1. Use 'mvn clean package -pl cluster -am -DskipTests' to compile the distributed module or directly go into the [website](https://iotdb.apache.org/Download/) to download the latest version.
+2. Make sure ports 6567, 6667, 9003, 9004, 40010, 40011 and 31999 are open on all three nodes.
+3. Send the package to all servers.
 4. Configure all nodes' seed_nodes in conf/iotdb-cluster.properties as "A_private_ip:9003,B_private_ip:9003,C_private_ip:9003"
 5. Configure the internal_ip in conf/iotdb-cluster.properties to be the private_ip of each node.
 6. Configure the default_replica_num in conf/iotdb-cluster.properties to be 3.
diff --git a/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md b/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
index f163d27..680a6d6 100644
--- a/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
+++ b/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
@@ -25,13 +25,24 @@ __集群模式目前是测试版!请谨慎在生产环境中使用。__
 如果您在使用Windows系统,请安装MinGW,WSL或者git bash。
 
 ## 1节点1副本伪分布式搭建示例
+### 源码编译:
 ```
 mvn clean package -DskipTests
 chmod -R 777 ./cluster/target/
 nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh >/dev/null 2>&1 &
 ```
+### 使用官网发布版本:
+```
+curl -O https://mirrors.bfsu.edu.cn/apache/iotdb/0.12.0/apache-iotdb-0.12.0-cluster-bin.zip
+unzip apache-iotdb-0.12.0-cluster-bin.zip
+cd apache-iotdb-0.12.0-cluster-bin
+sed -i -e 's/^seed_nodes=127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007$/seed_nodes=127.0.0.1:9003/g' conf/iotdb-cluster.properties
+sed -i -e 's/^default_replica_num=3$/default_replica_num=1/g' conf/iotdb-cluster.properties
+nohup ./sbin/start-node.sh >/dev/null 2>&1 &
+```
 
 ## 3节点1副本伪分布式搭建示例
+### 源码编译:
 ```
 mvn clean package -DskipTests
 chmod -R 777 ./cluster/target/
@@ -39,6 +50,8 @@ nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluste
 nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluster/target/test-classes/node2conf/ >/dev/null 2>&1 &
 nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluster/target/test-classes/node3conf/ >/dev/null 2>&1 &
 ```
+### 使用官网发布版本:
+可以参考以下示例,不过在一台机器上启动多个实例时需要处理好端口和数据目录的冲突。
 
 ## 3节点3副本分布式搭建示例
 
@@ -46,10 +59,9 @@ nohup ./cluster/target/iotdb-cluster-0.13.0-SNAPSHOT/sbin/start-node.sh ./cluste
 注:如果没有公网 ip 或者私网 ip 则两者设置成一致即可, 只需要保证客户端能够访问到服务端即可。
 
 以下为操作步骤:
-
-1. 保证三个节点的 6567, 6667, 9003, 9004, 40010, 40011 和 31999 端口是开放的。
-2. 使用 `mvn clean package -pl cluster -am -DskipTests` 编译分布式模块。
-3. 将打出来的包(iotdb-cluster-0.13.0-SNAPSHOT)上传到所有的服务器上。
+1. 使用 `mvn clean package -pl cluster -am -DskipTests` 编译分布式模块或直接到 [官网](https://iotdb.apache.org/Download/) 下载最新版本。
+2. 保证三个节点的 6567, 6667, 9003, 9004, 40010, 40011 和 31999 端口是开放的。
+3. 将包上传到所有的服务器上。
 4. 配置所有节点 conf/iotdb-cluster.properties 配置文件中的 seed_nodes 为 "A_private_ip:9003,B_private_ip:9003,C_private_ip:9003"
 5. 配置所有节点 conf/iotdb-cluster.properties 配置文件中的 internal_ip 为各自节点的 private_ip。
 6. 配置所有节点 conf/iotdb-cluster.properties 配置文件中的 default_replica_num 为 3。