From 777151b76772ccc0be99ad9165691777301f52d9 Mon Sep 17 00:00:00 2001 From: "Shixiang.W" Date: Tue, 2 Apr 2024 10:32:42 +0800 Subject: [PATCH] docs: install configuration guide --- .../install/install_ecp_on_kubernetes.md | 42 +++++++++++++++++++ ecp/en_US/install/install_ecp_on_linux.md | 21 ++++++++-- .../install/install_ecp_on_kubernetes.md | 42 +++++++++++++++++++ ecp/zh_CN/install/install_ecp_on_linux.md | 21 ++++++++-- 4 files changed, 118 insertions(+), 8 deletions(-) diff --git a/ecp/en_US/install/install_ecp_on_kubernetes.md b/ecp/en_US/install/install_ecp_on_kubernetes.md index 4e5ebec..662a638 100644 --- a/ecp/en_US/install/install_ecp_on_kubernetes.md +++ b/ecp/en_US/install/install_ecp_on_kubernetes.md @@ -23,6 +23,48 @@ helm pull emqx/kube-ecp-stack --untar ## Install or Upgrade ECP with Helm Chart +- If necessary, this can be done by modifying `values.yaml` + - For example, specify the use of a specific `StorageClass`, the default is `standard`: + + ```shell + global: + image: + registry: "" + repository: "" + pullPolicy: IfNotPresent + ## + ## Optionally specify an array of imagePullSecrets. + ## + # pullSecrets: &global-image-pullSecrets + # - name: "ecp-registry" + pullSecrets: &global-image-pullSecrets [] + storage: + className: &global-storage-className "standard" + accessModes: &global-storage-accessModes + - ReadWriteOnce + ``` + + - For example, the current environment has the `ElasticSearch` service, which can modify the connection information by doing the following: + + ```shell + telegraf: + replicas: 1 + image: + repository: "docker.io/library/telegraf" + tag: "1.27" + imagePullSecrets: *global-image-pullSecrets + service: + type: NodePort + port: 10514 + targetPort: 10514 + nodePort: 31514 + outputs: + elasticsearch: + url: "https://elasticsearch:9200" + username: "elastic" + password: "elastic" + ``` + - If you can access the Internet, run the command below: ```shell cd kube-ecp-stack diff --git a/ecp/en_US/install/install_ecp_on_linux.md b/ecp/en_US/install/install_ecp_on_linux.md index b5dd3e0..fc53a7c 100644 --- a/ecp/en_US/install/install_ecp_on_linux.md +++ b/ecp/en_US/install/install_ecp_on_linux.md @@ -46,10 +46,23 @@ Press Enter to skip all, which means that the default ECP version is used, the i ![configure](./_assets/configure.png) ### Start ECP Service -Execute the following command to start the ECP service. -```shell -./emqx_ecp_ctl start -``` +- If necessary, modify the configuration file `emqx_ecp.conf`. + - If the `ElasticSearch` service already exists, the following configuration may be modified: + ```shell + # telegraf config + TELEGRAF_EXTERNAL_PORT=10514 + EL_URL="https://elasticsearch:9200" + EL_USERNAME="elastic" + EL_PASSWORD="elastic" + ``` +:::tip Note +If ElasticSearch connection information is incorrectly configured, the logging function is unavailable, but other functions are not affected. +::: + +- Execute the following command to start the ECP service. + ```shell + ./emqx_ecp_ctl start + ``` :::tip Note When starting the ECP service for the first time, you need to pull the software image from the public image repository, which may take some time. You can also [contact us](https://www.emqx.com/en/contact?product=emqx-ecp) to get the offline installation package. ::: diff --git a/ecp/zh_CN/install/install_ecp_on_kubernetes.md b/ecp/zh_CN/install/install_ecp_on_kubernetes.md index be82e6c..5f02c95 100644 --- a/ecp/zh_CN/install/install_ecp_on_kubernetes.md +++ b/ecp/zh_CN/install/install_ecp_on_kubernetes.md @@ -25,6 +25,48 @@ helm pull emqx/kube-ecp-stack --untar ``` ## 通过 Helm chart 安装、升级EMQX ECP +- 如有必要, 可通过修改 `values.yaml` 来实现: + - 比如指定使用特定的 `StorageClass`, 默认为 `standard`: + + ```shell + global: + image: + registry: "" + repository: "" + pullPolicy: IfNotPresent + ## + ## Optionally specify an array of imagePullSecrets. + ## + # pullSecrets: &global-image-pullSecrets + # - name: "ecp-registry" + pullSecrets: &global-image-pullSecrets [] + storage: + className: &global-storage-className "standard" + accessModes: &global-storage-accessModes + - ReadWriteOnce + ``` + + - 比如当前环境有 `ElasticSearch` 服务, 可通过以下内容来修改连接信息: + + ```shell + telegraf: + replicas: 1 + image: + repository: "docker.io/library/telegraf" + tag: "1.27" + imagePullSecrets: *global-image-pullSecrets + service: + type: NodePort + port: 10514 + targetPort: 10514 + nodePort: 31514 + outputs: + elasticsearch: + url: "https://elasticsearch:9200" + username: "elastic" + password: "elastic" + ``` + - 如果可以访问 Internet,请运行以下命令: ```shell cd kube-ecp-stack diff --git a/ecp/zh_CN/install/install_ecp_on_linux.md b/ecp/zh_CN/install/install_ecp_on_linux.md index eb636c9..0fa2541 100644 --- a/ecp/zh_CN/install/install_ecp_on_linux.md +++ b/ecp/zh_CN/install/install_ecp_on_linux.md @@ -45,10 +45,23 @@ EMQX ECP 部署前,请确认您的环境满足以下要求: ![configure](./_assets/configure.png) ### 启动服务 -执行以下命令,启动 ECP 服务。 -```shell -./emqx_ecp_ctl start -``` +- 如有必要, 可以修改配置文件 `emqx_ecp.conf`。 + - 如已有 `ElasticSearch` 服务, 可能修改如下配置: + ```shell + # telegraf config + TELEGRAF_EXTERNAL_PORT=10514 + EL_URL="https://elasticsearch:9200" + EL_USERNAME="elastic" + EL_PASSWORD="elastic" + ``` +:::tip 注意 +若没有正确配置 ElasticSearch 连接信息, 日志功能将不可用, 但不影响其它功能。 +::: + +- 执行以下命令,启动 ECP 服务。 + ```shell + ./emqx_ecp_ctl start + ``` :::tip 注意 在初次启动 ECP 服务时,需要从 ECP 镜像拉取软件镜像,可能需要等待一段时间。您也可以[联系我们](https://www.emqx.com/zh/contact?product=emqx-ecp),获取离线安装包。 :::