Browse Source

Update Readme

zhanghongtong 5 years ago
parent
commit
bf2bb07c81

+ 20 - 13
deploy/chart/kuiper/README.md

@@ -67,15 +67,7 @@ Kuiper can be deployed at k3s/k8s cluster through Helm chart. Below takes k3s as
   | `nodeSelector`                 | Node selector                                        | {}                       |
   | `tolerations`                  | Tolerations                                          | []                       |
   | `affinity`                     | Affinity                                             | {}                       |
-  | `mqtt.servers`                 | MQTT broker address                                  | `[tcp://127.0.0.1:1883]` |
-  | `mqtt.qos`                     | QoS of message subscription                          | 1                        |
-  | `mqtt.sharedSubscription`      | Use shared subscription or not                       | true                     |
-  | `mqtt.username`                | MQTT connection user name                            |                          |
-  | `mqtt.password`                | MQTT connection password                             |                          |
-  | `mqtt.certificationSecretName` | Secret resource name created for certification file. |                          |
-  | `mqtt.privateKeySecretName`    | Secret resource name created fro private key file    |                          |
-  | `mqtt.certificationPath`       | Certification path for MQTT connection               |                          |
-  | `mqtt.privateKeyPath`          | Private key path for MQTT connection                 |                          |
+  | `kuiperConfig`                 | Configuration file in the Kuiper `etc` directory     |                          |
 
 ## Deploy Kuiper through Helm
 
@@ -169,10 +161,25 @@ Kuiper can be deployed at k3s/k8s cluster through Helm chart. Below takes k3s as
 
 + Open and edit `values.yaml` file
 
-  + Set `mqtt.certificationSecretName` certification Secret resource: `mqtt.certificationSecretName: client-cert`
-  + Set `mqtt.privateKeySecretName` private key Secret resource:`mqtt.privateKeySecretName: client-key`
-  + Set certification file path: `mqtt.certificationPath: /var/kuiper/certificate.pem`
-  + Set private key file path: `mqtt.privateKeyPath: /var/kuiper/private.pem.key`
+  ```shell
+  $ vim value.yaml
+  kuiperConfig:
+  ...
+    "mqtt_source.yaml":
+      #Global MQTT configurations
+      default:
+        qos: 1
+        sharedSubscription: true
+        servers: [tcp://127.0.0.1:1883]
+        concurrency: 1
+        #username: user1
+        #password: password
+        certificationSecretName: client-cert  # Set certification Secret resource name
+        certificationPath: /var/kuiper/certificate.pem # Set certification file path
+        privateKeySecretName: client-key  # Set private key Secret resource name
+        privateKeyPath: /var/kuiper/xyz-private.pem.key # Set private key file path
+  ...
+  ```
 
 + Deploy Kuiper through Helm 
 

+ 20 - 13
deploy/chart/kuiper/README_zh.md

@@ -67,15 +67,7 @@ Kuiper 可以通过 Helm chart 部署在 k3s / k8s 集群上。下面以 k3s 为
   | `nodeSelector`                 | 节点选择                            | {}                       |
   | `tolerations`                  | 污点容忍                            | []                       |
   | `affinity`                     | 节点亲和性                          | {}                       |
-  | `mqtt.servers`                 | mqtt服务器的代理地址                | `[tcp://127.0.0.1:1883]` |
-  | `mqtt.qos`                     | 消息转发的服务质量                  | 1                        |
-  | `mqtt.sharedSubscription`      | 是否使用共享订阅                    | true                     |
-  | `mqtt.username`                | 连接用户名                          |                          |
-  | `mqtt.password`                | 连接密码                            |                          |
-  | `mqtt.certificationSecretName` | 通过证书文件创建的 Secre 资源的名字 |                          |
-  | `mqtt.privateKeySecretName`    | 通过私钥文件创建的 Secre 资源的名字 |                          |
-  | `mqtt.certificationPath`       | 证书路径。必须是绝对路径。          |                          |
-  | `mqtt.privateKeyPath`          | 私钥路径。必须绝对路径。            |                          |
+  | `kuiperConfig`                 | Kuiper `etc` 目录下的配置文件           |                        |
 
 ## 通过 Helm 部署 Kuiper
 
@@ -169,10 +161,25 @@ Kuiper 可以通过 Helm chart 部署在 k3s / k8s 集群上。下面以 k3s 为
 
 + 编辑 `values.yaml` 文件
 
-  + 设置 `mqtt.certificationSecretName` 为证书文件 Secret 资源: `mqtt.certificationSecretName: client-cert`
-  + 设置 `mqtt.privateKeySecretName` 为私钥文件 Secret 资源:`mqtt.privateKeySecretName: client-key`
-  + 设置证书文件部署路径:`mqtt.certificationPath: /var/kuiper/certificate.pem`
-  + 设置私钥文件部署路径:`mqtt.privateKeyPath: /var/kuiper/private.pem.key`
+  ```shell
+  $ vim value.yaml
+  kuiperConfig:
+  ...
+    "mqtt_source.yaml":
+      #Global MQTT configurations
+      default:
+        qos: 1
+        sharedSubscription: true
+        servers: [tcp://127.0.0.1:1883]
+        concurrency: 1
+        #username: user1
+        #password: password
+        certificationSecretName: client-cert  # 设置证书文件 Secret resource name
+        certificationPath: /var/kuiper/certificate.pem # 设置证书文件部署路径
+        privateKeySecretName: client-key  # 设置私钥文件的 Secret resource name
+        privateKeyPath: /var/kuiper/xyz-private.pem.key # 设置私钥文件部署路径
+  ...
+  ```
 
 + 使用 Helm 部署 Kuiper
 

+ 2 - 0
deploy/chart/kuiper/values.yaml

@@ -60,7 +60,9 @@ kuiperConfig:
       concurrency: 1
       #username: user1
       #password: password
+      #certificationSecretName: Secret resource name created for certification file
       #certificationPath: /var/kuiper/xyz-certificate.pem
+      #privateKeySecretName: Secret resource name created for certification file
       #privateKeyPath: /var/kuiper/xyz-private.pem.key
     #Override the global configurations
     demo_conf: #Conf_key

+ 26 - 13
deploy/docker/README.md

@@ -144,19 +144,32 @@ docker run -d --name kuiper -e MQTT_BROKER_ADDRESS=$MQTT_BROKER_ADDRESS emqx/kui
 
 ### Configuration
 
-Use the environment variable to configure `etc/sources/mqtt.yaml`  on the Kuiper container.
-
-| Options                    | Default            | Mapped                    |
-| ---------------------------| ------------------ | ------------------------- |
-| MQTT_BROKER_ADDRESS         | tcp://127.0.0.1:1883 | default.servers |
-| MQTT_BROKER_SHARED_SUBSCRIPTION | true   | default.sharedSubscription |
-| MQTT_BROKER_QOS | 1                 | default.qos    |
-| MQTT_BROKER_USERNAME |   | default.username |
-| MQTT_BROKER_PASSWORD |                | default.password |
-| MQTT_BROKER_CER_PATH |                | default.certificationPath |
-| MQTT_BROKER_KEY_PATH |     | default.privateKeyPath |
-
-If you want to configure more options, you can mount the configuration file into Kuiper container.
+Use the environment variable to configure `etc/mqtt_sources.yaml`  on the Kuiper container.
+
+| Options                         | Default               | Mapped                      |
+| ------------------------------- | --------------------- | --------------------------- |
+| MQTT_BROKER_ADDRESS             | tcp://127.0.0.1:1883  | default.servers             |
+| MQTT_BROKER_SHARED_SUBSCRIPTION | true                  | default.sharedSubscription  |
+| MQTT_BROKER_QOS                 | 1                     | default.qos                 |
+| MQTT_BROKER_USERNAME            |                       | default.username            |
+| MQTT_BROKER_PASSWORD            |                       | default.password            |
+| MQTT_BROKER_CER_PATH            |                       | default.certificationPath   |
+| MQTT_BROKER_KEY_PATH            |                       | default.privateKeyPath      |
+
+Use the environment variable to configure `etc/sources/edgex.yaml`  on the Kuiper container.
+
+| Options                    | Default                  | Mapped                    |
+| ---------------------------| -------------------------| ------------------------- |
+| EDGEX_PROTOCOL             | tcp                      | default.protocol          |
+| EDGEX_SERVER               | localhost                | default.server            |
+| EDGEX_PORT                 | 5570                     | default.port              |
+| EDGEX_TOPIC                | events                   | default.topic             |
+| EDGEX_SERVICE_SERVER       | http://localhost:10080   | default.serviceServer     |
+
+If you want to configure more options, you can mount the configuration file into Kuiper container, like this:
+```
+$ docker run --name kuiper -v /path/to/mqtt_sources.yaml:/kuiper/etc/mqtt_sources.yaml -v /path/to/edgex.yaml:/kuiper/etc/sources/edgex.yaml emqx/kuiper:$tag
+```
 
 # More