diff --git a/docs/en/deployment/deploy_manually.md b/docs/en/deployment/deploy_manually.md index 695f34737e14a..abc14235a3ed5 100644 --- a/docs/en/deployment/deploy_manually.md +++ b/docs/en/deployment/deploy_manually.md @@ -172,65 +172,9 @@ The following procedures are performed on the BE instances. default_replication_num = 1 ``` -## Step 3: (Optional) Start the CN service +## Step 3: Set up the cluster -A Compute Node (CN) is a stateless computing service that does not maintain data itself. You can optionally add CN nodes to your cluster to provide extra computing resources for queries. You can deploy CN nodes with the BE deployment files. Compute Nodes are supported since v2.4. - -1. Navigate to the directory that stores the [StarRocks BE deployment files](../deployment/prepare_deployment_files.md) you prepared earlier, and modify the CN configuration file **be/conf/cn.conf**. - - a. If any of the CN ports mentioned in the [Environment Configuration Checklist](../deployment/environment_configurations.md) are occupied, you must assign valid alternatives in the CN configuration file. - - ```YAML - be_port = vvvv # Default: 9060 - be_http_port = xxxx # Default: 8040 - heartbeat_service_port = yyyy # Default: 9050 - brpc_port = zzzz # Default: 8060 - ``` - - b. If you want to enable IP address access for your cluster, you must add the configuration item `priority_networks` in the configuration file and assign a dedicated IP address (in the CIDR format) to the CN node. You can ignore this configuration item if you want to enable FQDN access for your cluster. - - ```YAML - priority_networks = x.x.x.x/x - ``` - - > **NOTE** - > - > - You can run `ifconfig` in your terminal to view the IP address(es) owned by the instance. - > - From v3.3.0, StarRocks supports deployment based on IPv6. - - c. If you have multiple JDKs installed on the instance, and you want to use a specific JDK that is different from the one specified in the environment variable `JAVA_HOME`, you must specify the path where the chosen JDK is installed by adding the configuration item `JAVA_HOME` in the configuration file. - - ```YAML - # Replace with the path where the chosen JDK is installed. - JAVA_HOME = - ``` - - For information about advanced configuration items, see [Parameter Configuration - BE configuration items](../administration/management/BE_configuration.md) because most of CN's parameters are inherited from BE. - -2. Start the CN node. - - ```Bash - ./be/bin/start_cn.sh --daemon - ``` - - > **CAUTION** - > - > - Before starting the CN node with FQDN access enabled, make sure you have assigned hostnames for all instances in **/etc/hosts**. See [Environment Configuration Checklist - Hostnames](../deployment/environment_configurations.md#hostnames) for more information. - > - You do not need to specify the parameter `--host_type` when you start CN nodes. - -3. Check the CN logs to verify if the CN node is started successfully. - - ```Bash - cat be/log/cn.INFO | grep heartbeat - ``` - - A record of log like "I0313 15:03:45.820030 412450 thrift_server.cpp:375] heartbeat has started listening port on 9050" suggests that the CN node is started properly. - -4. You can start new CN nodes by repeating the above procedures on other instances. - -## Step 4: Set up the cluster - -After all FE, BE nodes, and CN nodes are started properly, you can set up the StarRocks cluster. +After all FE and BE nodes are started properly, you can set up the StarRocks cluster. The following procedures are performed on a MySQL client. You must have MySQL client 5.5.0 or later installed. @@ -331,51 +275,7 @@ The following procedures are performed on a MySQL client. You must have MySQL cl If the field `Alive` is `true`, this BE node is properly started and added to the cluster. -5. (Optional) Add a CN node to the cluster. - - ```SQL - -- Replace with the IP address (priority_networks) - -- or FQDN of the CN node, and replace - -- with the heartbeat_service_port (Default: 9050) you specified in cn.conf. - ALTER SYSTEM ADD COMPUTE NODE ":"; - ``` - - > **NOTE** - > - > You can add multiple CN nodes with one SQL. Each `:` pair represents one CN node. - -6. (Optional) Check the status of the CN nodes by executing the following SQL. - - ```SQL - SHOW PROC '/compute_nodes'\G - ``` - - Example: - - ```Plain - MySQL [(none)]> SHOW PROC '/compute_nodes'\G - *************************** 1. row *************************** - ComputeNodeId: 10003 - IP: x.x.x.x - HeartbeatPort: 9050 - BePort: 9060 - HttpPort: 8040 - BrpcPort: 8060 - LastStartTime: 2023-03-13 15:11:13 - LastHeartbeat: 2023-03-13 15:11:13 - Alive: true - SystemDecommissioned: false - ClusterDecommissioned: false - ErrMsg: - Version: 2.5.2-c3772fb - 1 row in set (0.00 sec) - ``` - - If the field `Alive` is `true`, this CN node is properly started and added to the cluster. - - After CNs are properly started and you want to use CNs during queries, set the system variables `SET prefer_compute_node = true;` and `SET use_compute_nodes = -1;`. For more information, see [System variables](../sql-reference/System_variable.md#descriptions-of-variables). - -## Step 5: (Optional) Deploy a high-availability FE cluster +## Step 4: (Optional) Deploy a high-availability FE cluster A high-availability FE cluster requires at least THREE Follower FE nodes in the StarRocks cluster. After the Leader FE node is started successfully, you can then start two new FE nodes to deploy a high-availability FE cluster. @@ -524,15 +424,9 @@ You can stop the StarRocks cluster by running the following commands on the corr ./be/bin/stop_be.sh --daemon ``` -- Stop a CN node. - - ```Bash - ./be/bin/stop_cn.sh --daemon - ``` - ## Troubleshooting -Try the following steps to identify the errors that occur when you start the FE, BE, or CN nodes: +Try the following steps to identify the errors that occur when you start the FE or BE nodes: - If an FE node is not started properly, you can identify the problem by checking its log in **fe/log/fe.warn.log**. @@ -550,14 +444,6 @@ Try the following steps to identify the errors that occur when you start the FE, Having identified and resolved the problem, you must first terminate the existing BE process, delete the existing **storage** directory, create a new data storage directory, and then restart the BE node with the correct configuration. -- If a CN node is not started properly, you can identify the problem by checking its log in **be/log/cn.WARNING**. - - ```Bash - cat be/log/cn.WARNING - ``` - - Having identified and resolved the problem, you must first terminate the existing CN process, and then restart the CN node with the correct configuration. - ## What to do next Having deployed your StarRocks cluster, you can move on to [Post-deployment Setup](../deployment/post_deployment_setup.md) for instructions on initial management measures. diff --git a/docs/zh/deployment/deploy_manually.md b/docs/zh/deployment/deploy_manually.md index ca9930ce98404..3c2596e8a5986 100644 --- a/docs/zh/deployment/deploy_manually.md +++ b/docs/zh/deployment/deploy_manually.md @@ -176,67 +176,9 @@ displayed_sidebar: docs default_replication_num = 1 ``` -## 第三步:(可选)启动 CN 服务 +## 第三步:搭建集群 -Compute Node(CN)是一种无状态的计算服务,本身不存储数据。您可以通过添加 CN 节点为查询提供额外的计算资源。您可以使用 BE 部署文件部署 CN 节点。CN 节点自 v2.4 版本起支持。 - -1. 进入先前准备好的 [StarRocks BE 部署文件](../deployment/prepare_deployment_files.md)所在路径,修改 CN 配置文件 **be/conf/cn.conf**。 - - a. 如果任何在 [环境配置清单](../deployment/environment_configurations.md) 中提到的 CN 端口被占用,您必须在 CN 配置文件中为其分配其他可用端口。. - - ```YAML - be_port = vvvv # 默认值:9060 - be_http_port = xxxx # 默认值:8040 - heartbeat_service_port = yyyy # 默认值:9050 - brpc_port = zzzz # 默认值:8060 - ``` - - b. 如需为集群启用 IP 地址访问,您必须在配置文件中添加配置项 `priority_networks`,为 CN 节点分配一个专有的 IP 地址(CIDR格式)。如需为集群启用 FQDN 访问,则可以忽略该配置项。. - - ```YAML - priority_networks = x.x.x.x/x - ``` - - > **说明** - > - > - 您可以在终端中运行 `ifconfig` 以查看当前实例拥有的 IP 地址。 - > - 从 v3.3.0 开始,StarRocks 支持基于 IPv6 的部署。 - - c. 如果您的实例安装了多个 JDK,并且您要使用 JDK 与环境变量 `JAVA_HOME` 中指定的不同,则必须在配置文件中添加配置项 `JAVA_HOME` 来指定所选该 JDK 的安装路径。 - - ```YAML - # 将 替换为所选 JDK 的安装路径。 - JAVA_HOME = - ``` - - d. 由于大部分 CN 参数都继承自 BE 节点,您可以参考 [参数配置 - BE 配置项](../administration/management/BE_configuration.md) 了解更多 CN 高级配置项。 - -2. 启动 CN 节点。 - - ```Bash - ./be/bin/start_cn.sh --daemon - ``` - - > **注意** - > - > - 如需启用 FQDN 访问,在启动 CN 节点之前,请确保您已经在 **/etc/hosts** 中为所有实例分配了主机名。有关详细信息,请参考 [环境配置清单 - 主机名](../deployment/environment_configurations.md#主机名)。 - > - 启动 CN 节点时无需指定参数 `--host_type`。 - -3. 查看 CN 日志,检查 CN 节点是否启动成功。 - - ```Bash - cat be/log/cn.INFO | grep heartbeat - ``` - - 如果日志打印以下内容,则说明该 CN 节点启动成功: - - "I0313 15:03:45.820030 412450 thrift_server.cpp:375] heartbeat has started listening port on 9050" - -4. 在其他实例上重复以上步骤,即可启动新的 CN 节点。 - -## 第四步:搭建集群 - -当所有 FE、BE、CN 节点启动成功后,即可搭建 StarRocks 集群。 +当所有 FE 和 BE 节点启动成功后,即可搭建 StarRocks 集群。 以下过程在 MySQL 客户端实例上执行。您必须安装 MySQL 客户端(5.5.0 或更高版本)。 @@ -335,51 +277,7 @@ Compute Node(CN)是一种无状态的计算服务,本身不存储数据。 如果字段 `Alive` 为 `true`,说明该 BE 节点正常启动并加入集群。 -5. (可选)添加 CN 节点至集群。 - - ```SQL - -- 将 替换为 CN 节点的 IP 地址(priority_networks)或 FQDN, - -- 并将 (默认:9050)替换为您在 cn.conf 中指定的 heartbeat_service_port。 - ALTER SYSTEM ADD COMPUTE NODE ":", ":", ":"; - ``` - - > **说明** - > - > 您可以通过一条 SQL 添加多个 CN 节点。每对 `:` 代表一个 CN 节点。 - -6. (可选)执行以下 SQL 查看 CN 节点状态。 - - ```SQL - SHOW PROC '/compute_nodes'\G - ``` - - 示例: - - ```Plain - MySQL [(none)]> SHOW PROC '/compute_nodes'\G - *************************** 1. row *************************** - ComputeNodeId: 10003 - IP: x.x.x.x - HeartbeatPort: 9050 - BePort: 9060 - HttpPort: 8040 - BrpcPort: 8060 - LastStartTime: 2023-03-13 15:11:13 - LastHeartbeat: 2023-03-13 15:11:13 - Alive: true - SystemDecommissioned: false - ClusterDecommissioned: false - ErrMsg: - Version: 2.5.2-c3772fb - 1 row in set (0.00 sec) - ``` - - 如果字段 `Alive` 为 `true`,说明该 CN 节点正常启动并加入集群。 - - 如果执行查询时需要使用 CN 节点扩展算力,则需要设置系统变量 `SET -prefer_compute_node = true;` 和 `SET use_compute_nodes = -1;`。系统变量的更多信息,请参见[系统变量](../sql-reference/System_variable.md#支持的变量)。 - -## 第五步:(可选)部署高可用 FE 集群 +## 第四步:(可选)部署高可用 FE 集群 高可用的 FE 集群需要在 StarRocks 集群中部署至少三个 Follower FE 节点。如需部署高可用的 FE 集群,您需要额外再启动两个新的 FE 节点。 @@ -527,15 +425,9 @@ prefer_compute_node = true;` 和 `SET use_compute_nodes = -1;`。系统变量的 ./be/bin/stop_be.sh --daemon ``` -- 停止 CN 节点。 - - ```Bash - ./be/bin/stop_cn.sh --daemon - ``` - ## 故障排除 -如果启动 FE、BE 或 CN 节点失败,尝试以下步骤来发现问题: +如果启动 FE 或 BE 节点失败,尝试以下步骤来发现问题: - 如果 FE 节点没有正常启动,您可以通过查看 **fe/log/fe.warn.log** 中的日志来确定问题所在。 @@ -553,14 +445,6 @@ prefer_compute_node = true;` 和 `SET use_compute_nodes = -1;`。系统变量的 确定并解决问题后,您首先需要终止当前 BE 进程,删除现有的 **storage** 路径,新建数据存储路径,然后以正确的配置重启该 BE 节点。 -- 如果 CN 节点没有正常启动,您可以通过查看 **be/log/cn.WARNING** 中的日志来确定问题所在。 - - ```Bash - cat be/log/cn.WARNING - ``` - - 确定并解决问题后,您首先需要终止当前 CN 进程,然后以正确的配置重启该 CN 节点。 - ## 下一步 成功部署 StarRocks 集群后,您可以参考 [部署后设置](../deployment/post_deployment_setup.md) 以获取有关初始管理措施的说明。