Skip to content

Commit

Permalink
Merge pull request #108 from emqx/cluster-helm
Browse files Browse the repository at this point in the history
[ECP 2.4.0] update: helm installation for cluster management
  • Loading branch information
QQDQ authored Nov 4, 2024
2 parents 0ca9285 + 0feb556 commit 641abb9
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 27 deletions.
Binary file modified ecp/en_US/cluster/_assets/cluster-existing-reg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 26 additions & 13 deletions ecp/en_US/cluster/add_manage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add EMQX Clusters

ECP supports adding existing EMQX clusters. ECP supports management for EMQX v4 Enterprise Edition (4.4.6 and above) and EMQX v5 Enterprise Edition (5.6.0 and above).
ECP supports adding existing EMQX clusters by a cluster management agent. ECP supports management for EMQX v4 Enterprise Edition (4.4.6 and above) and EMQX v5 Enterprise Edition (5.6.0 and above).

## Add an Existing Cluster

Expand All @@ -12,35 +12,44 @@ ECP supports adding existing EMQX clusters. ECP supports management for EMQX v4

4. Click **Confirm** to finish the adding process. The newly-created clusters will be listed in the **Cluster List** panel with the status **Created**.

5. Click **Register Node** and follow the instructions on the cluster registration guide page to register the cluster node.

<img src="./_assets/cluster-existing-init.png" alt="cluster-running" style="zoom:50%;" />

6. Select the CPU architecture in the **CPU Architecture** field, amd64, arm, and arm64 are supported. Follow the steps on this page to finish adding the existing cluster.
5. Click **Register Node** and a cluster registration guide page will show.

<img src="./_assets/cluster-existing-reg.png" style="zoom: 50%;" align="middle">

<img src="./_assets/cluster-existing-reg.png" style="zoom: 50%;" align="middle">
6. Select **Register Type** and **CPU Architecture** to choose how the cluster management agent be installed. Currently, the agent can be installed by binary or in Kubernetes. For binary installation, amd64, arm, and arm64 are supported.

7. Log in to the virtual machine hosting the EMQX cluster, execute the commands provided on the registration guide page in sequential order.
7. Log in to the virtual machine hosting the EMQX cluster, execute the commands provided on the registration guide page to download the agent.

```bash
# Download EMQX Agent
sudo curl -L -f --output /usr/local/bin/emqxee-agent https://[emqxee-agent]
sudo curl -L -f -k --output /usr/local/bin/emqxee-agent https://[emqxee-agent]

# Update EMQX Agent permission
sudo chmod +x /usr/local/bin/emqxee-agent

# Start EMQX Agent
sudo /usr/local/bin/emqxee-agent start

```

8. Follow the instructions to fill in the fields in **Node Configuration** part. The content will be automatically filled into the registration command:

- For binary installation, the agent and the EMQX cluster will be on the same virtual machine, therefore, localhost can be used in `dashboardUrl` and `apiUrl`.
- For Kubernetes installation, please be sure that the agent can visit the EMQX cluster by `dashboardUrl` and `apiUrl`.

9. Copy and execute the command in **Register** part on the virtual machine to run the agent to finish registration.

```bash
# Register on ECP
sudo /usr/local/bin/emqxee-agent register --url https://[emqxee-agent] --registration-token bf2779e5176446cd8e18fde81d826497
sudo /usr/local/bin/emqxee-agent register --url https://[ecp] --registration-token [token] --emqx-dashboard-username [emqx-username] --emqx-dashboard-password [emqx-password] --emqx-dashboard-url [emqx-dashboard-url] --emqx-api-url [emqx-api-url]
```

8. Upon returning to the **Workspace - Data Integration - Data Access** page, you will find that the newly added existing cluster is now in the **Running** status.![](./_assets/cluster-existing.png)
10. Upon returning to the **Workspace - Data Integration - Data Access** page, you will find that the newly added existing cluster is now in the **Running** status.![](./_assets/cluster-existing.png)

9. If an EMQX v4 cluster is added for management, an **Enter Dashboard** button will display. Click it to view the EMQX v4 dashboard. If the **Enter Dashboard** button is not visible, please make sure `cluster.agent` section is correctly configured in ECP configuration file and the MQTT broker configured in it can be accessed by the agent.
11. If an EMQX v4 cluster is added for management, an **Enter Dashboard** button will display. Click it to view the EMQX v4 dashboard. If the **Enter Dashboard** button is not visible, please make sure `cluster.agent` section is correctly configured in ECP configuration file and the MQTT broker configured in it can be accessed by the agent.

10. If an EMQX v5 cluster is added for management, an **Enter Dashboard** button will display if the **Cluster Address** has been configured. Click it to directly view the EMQX v5 dashboard in a new window.
12. If an EMQX v5 cluster is added for management, an **Enter Dashboard** button will display if the **Cluster Address** has been configured. Click it to directly view the EMQX v5 dashboard in a new window.



Expand All @@ -59,4 +68,8 @@ Managed EMQX cluster can be in the following states:

For clusters in the state of Error, you can click the Error status icon to view possible cause.

<!--also the English for the status should be confirmed-->
<!--also the English for the status should be confirmed-->

## Limitation

Each cluster on ECP side should map to a single EMQX cluster. Please do not register multiple clusters on ECP side to the same EMQX cluster.
Binary file modified ecp/zh_CN/cluster/_assets/cluster-existing-reg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 25 additions & 14 deletions ecp/zh_CN/cluster/add_manage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 纳管集群

如果您已经部署了一套或几套 EMQX 集群,可以通过 ECP 的集群纳管功能管理已有集群。ECP 目前支持 EMQX v4 企业版(4.4.6 及以上)及 v5 企业版(5.6.0 及以上)的纳管。
如果您已经部署了一套或几套 EMQX 集群,可以使用 ECP 的集群纳管功能管理已有集群,该功能通过一个集群纳管代理来完成管理工作。ECP 目前支持 EMQX v4 企业版(4.4.6 及以上)及 v5 企业版(5.6.0 及以上)的纳管。

## ECP 纳管 EMQX 集群

Expand All @@ -14,36 +14,43 @@

![cluster-running](./_assets/cluster-existing-init.png)



5. 在集群卡片或集群列表中,点击**注册节点**,将弹出集群注册引导页。

6. 在注册引导页,选择 CPU 架构,当前支持 AMD64、ARM、ARM64 三种架构;按照注册引导页的提示完成注册。

<img src="./_assets/cluster-existing-reg.png" style="zoom:50%;" align="middle">

7. 登录到 EMQX 集群安装的虚机环境,按顺序执行注册引导页中的命令;
6. 在注册引导页,确定**注册方式****CPU 架构**,以选择合适的集群纳管代理进行下载安装。目前支持二进制包和 Kubernetes 两种安装方式 ,二进制安装方式下可以从 AMD64、ARM、ARM64 三种架构中进行选择。

7. 登录到 EMQX 集群安装的虚机环境,按照引导完成集群纳管代理的下载。

```bash
# 下载 EMQX Agent
sudo curl -L -f --output /usr/local/bin/emqxee-agent https://[emqxee-agent]
sudo curl -L -f -k --output /usr/local/bin/emqxee-agent https://[emqxee-agent]

# 修改 Agent 权限
sudo chmod +x /usr/local/bin/emqxee-agent

# 启动 Agent
sudo /usr/local/bin/emqxee-agent start

```

8. 根据提示,在**节点配置**部分填写注册必要的信息。填写的内容将自动填充到注册命令中:

- 如果使用二进制包安装方式,集群纳管代理与 EMQX 集群在同一台虚机上,`dashboardUrl``apiUrl` 可使用本地地址。
- 如果使用 Kubernetes 安装方式,请确保集群纳管代理可以通过填写的 `dashboardUrl``apiUrl` 访问到EMQX 集群。

9. 拷贝**注册**部分的命令,在 EMQX 集群安装的虚机环境上运行命令,完成注册。

```bash
# 注册到 ECP
sudo /usr/local/bin/emqxee-agent register --url https://[ecp] --registration-token bf2779e5176446cd8e18fde81d826497
sudo /usr/local/bin/emqxee-agent register --url https://[ecp] --registration-token [token] --emqx-dashboard-username [emqx-username] --emqx-dashboard-password [emqx-password] --emqx-dashboard-url [emqx-dashboard-url] --emqx-api-url [emqx-api-url]
```

8. 回到 ECP **数据接入**页,查看集群列表,可以看到被纳管的 EMQX 集群已被注册到 ECP 中,状态显示为**运行中**
![纳管集群](./_assets/cluster-existing.png)
10. 回到 ECP **数据接入**页,查看集群列表,可以看到被纳管的 EMQX 集群已被注册到 ECP 中,状态显示为**运行中**
![纳管集群](./_assets/cluster-existing.png)

9. 如果纳管的是 v4 版本集群,集群正常运行后,在操作列将出现 **进入Dashboard** 按钮,点击后可访问集群的 dashboard。如果没有出现该按钮,请检查 ECP 配置文件中的 `cluster.agent` 是否配置正确并可被 agent 访问。
11. 如果纳管的是 v4 版本集群,集群正常运行后,在操作列将出现 **进入Dashboard** 按钮,点击后可访问集群的 dashboard。如果没有出现该按钮,请检查 ECP 配置文件中的 `cluster.agent` 是否配置正确并可被 agent 访问。

10. 如果纳管的是 v5 版本集群,正确设置集群服务地址后,在操作列将出现 **进入Dashboard** 按钮,点击即可在新窗口中直接查看集群的 dashboard。
12. 如果纳管的是 v5 版本集群,正确设置集群服务地址后,在操作列将出现 **进入Dashboard** 按钮,点击即可在新窗口中直接查看集群的 dashboard。

## 集群状态

Expand All @@ -57,4 +64,8 @@
| 删除中 | 删除集群后的中间状态 |
| 异常 | 集群未正常运行,或者 agent 无法访问集群,或者 agent 无法与 ECP 正常通信 |

如果集群状态显示为**异常**,可以点击**异常**状态查看原因。
如果集群状态显示为**异常**,可以点击**异常**状态查看原因。

## 使用限制

ECP 端每个纳管集群应对应单个 EMQX 集群,请不要注册多个 ECP 端纳管集群到同一个 EMQX 集群。

0 comments on commit 641abb9

Please sign in to comment.