You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/26 02:56:18 UTC

[GitHub] [apisix] tzssangglass opened a new pull request #4670: docs: Add some questions and answers to the FAQ

tzssangglass opened a new pull request #4670:
URL: https://github.com/apache/apisix/pull/4670


   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   Collate some common questions from the community and issue
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [x] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on a change in pull request #4670: docs: Add some questions and answers to the FAQ

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #4670:
URL: https://github.com/apache/apisix/pull/4670#discussion_r677059373



##########
File path: docs/en/latest/FAQ.md
##########
@@ -569,3 +569,5 @@ The difference between `plugin-metadata` and `plugin-configs`:
 
 - Plugin instance scope: `plugin-metadata` works on all instances of this plugin. `plugin-configs` works on the plugin instances configured under it.
 - Binding entities: `plugin-metadata` take effect on the entities bound to all instances of this plugin. `plugin-configs` take effect on the routes bound to this `plugin-configs`.
+
+Note: plugin instances are plugins that are currently enabled

Review comment:
       > but indeed we just have one object for each plugin.
   
   Here I do not understand. For example, the `limit-req` plugin on different routes, is it the same object? Also you are saying that each plugin has only one object, only the `conf` is different.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on a change in pull request #4670: docs: Add some questions and answers to the FAQ

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #4670:
URL: https://github.com/apache/apisix/pull/4670#discussion_r677067858



##########
File path: docs/en/latest/FAQ.md
##########
@@ -569,3 +569,5 @@ The difference between `plugin-metadata` and `plugin-configs`:
 
 - Plugin instance scope: `plugin-metadata` works on all instances of this plugin. `plugin-configs` works on the plugin instances configured under it.
 - Binding entities: `plugin-metadata` take effect on the entities bound to all instances of this plugin. `plugin-configs` take effect on the routes bound to this `plugin-configs`.
+
+Note: plugin instances are plugins that are currently enabled

Review comment:
       what about `plugin instance` -> `plugin conf`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers commented on a change in pull request #4670: docs: Add some questions and answers to the FAQ

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #4670:
URL: https://github.com/apache/apisix/pull/4670#discussion_r677313020



##########
File path: docs/en/latest/FAQ.md
##########
@@ -569,3 +569,5 @@ The difference between `plugin-metadata` and `plugin-configs`:
 
 - Plugin instance scope: `plugin-metadata` works on all instances of this plugin. `plugin-configs` works on the plugin instances configured under it.
 - Binding entities: `plugin-metadata` take effect on the entities bound to all instances of this plugin. `plugin-configs` take effect on the routes bound to this `plugin-configs`.
+
+Note: plugin instances are plugins that are currently enabled

Review comment:
       OK.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on pull request #4670: docs: Add some questions and answers to the FAQ

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on pull request #4670:
URL: https://github.com/apache/apisix/pull/4670#issuecomment-886333385


   @spacewander @tokers I used the new PR to improve the FAQ, and the relevant reivew comments in the previous PR have been modified.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers merged pull request #4670: docs: Add some questions and answers to the FAQ

Posted by GitBox <gi...@apache.org>.
tokers merged pull request #4670:
URL: https://github.com/apache/apisix/pull/4670


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on a change in pull request #4670: docs: Add some questions and answers to the FAQ

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #4670:
URL: https://github.com/apache/apisix/pull/4670#discussion_r677141314



##########
File path: docs/en/latest/FAQ.md
##########
@@ -569,3 +569,5 @@ The difference between `plugin-metadata` and `plugin-configs`:
 
 - Plugin instance scope: `plugin-metadata` works on all instances of this plugin. `plugin-configs` works on the plugin instances configured under it.
 - Binding entities: `plugin-metadata` take effect on the entities bound to all instances of this plugin. `plugin-configs` take effect on the routes bound to this `plugin-configs`.
+
+Note: plugin instances are plugins that are currently enabled

Review comment:
       update




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on a change in pull request #4670: docs: Add some questions and answers to the FAQ

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #4670:
URL: https://github.com/apache/apisix/pull/4670#discussion_r676528055



##########
File path: docs/zh/latest/FAQ.md
##########
@@ -549,4 +549,22 @@ apisix:
 ```
 
 **注意:**
-尝试使用 cosocket 连接任何TLS服务时,都需要配置 `apisix.ssl.ssl_trusted_certificate`
+
+尝试使用 cosocket 连接任何 TLS 服务时,如果 APISIX 不信任对端 TLS 服务证书,都需要配置 `apisix.ssl.ssl_trusted_certificate`。
+
+举例:在 APISIX 中使用 Nacos 作为服务发现时,Nacos 开启了 TLS 协议, 即 Nacos 配置的 `host` 是 `https://` 开头,需要配置 `apisix.ssl.ssl_trusted_certificate`,并且使用和 Nacos 相同的 CA 证书。
+
+## 如何解决 `module 'resty.worker.events' not found` 错误
+
+在 `/root` 目录下安装 APISIX 会导致这个问题。因为 worker 进程的用户是 nobody,无权访问 `/root` 目录下的文件。需要移动 APISIX 安装目录,推荐安装在 `/usr/local` 目录下。
+
+## `plugin-metadata` 和 `plugin-configs` 有什么区别
+
+`plugin-metadata` 是插件的元数据,所有插件实例共享。在编写插件时,如果有部分插件属性,属于所有插件实例共享,修改对所有插件实例生效,那么放在 `plugin-metadata` 合适。

Review comment:
       update




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers commented on a change in pull request #4670: docs: Add some questions and answers to the FAQ

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #4670:
URL: https://github.com/apache/apisix/pull/4670#discussion_r676510372



##########
File path: docs/zh/latest/FAQ.md
##########
@@ -549,4 +549,22 @@ apisix:
 ```
 
 **注意:**
-尝试使用 cosocket 连接任何TLS服务时,都需要配置 `apisix.ssl.ssl_trusted_certificate`
+
+尝试使用 cosocket 连接任何 TLS 服务时,如果 APISIX 不信任对端 TLS 服务证书,都需要配置 `apisix.ssl.ssl_trusted_certificate`。
+
+举例:在 APISIX 中使用 Nacos 作为服务发现时,Nacos 开启了 TLS 协议, 即 Nacos 配置的 `host` 是 `https://` 开头,需要配置 `apisix.ssl.ssl_trusted_certificate`,并且使用和 Nacos 相同的 CA 证书。
+
+## 如何解决 `module 'resty.worker.events' not found` 错误
+
+在 `/root` 目录下安装 APISIX 会导致这个问题。因为 worker 进程的用户是 nobody,无权访问 `/root` 目录下的文件。需要移动 APISIX 安装目录,推荐安装在 `/usr/local` 目录下。
+
+## `plugin-metadata` 和 `plugin-configs` 有什么区别
+
+`plugin-metadata` 是插件的元数据,所有插件实例共享。在编写插件时,如果有部分插件属性,属于所有插件实例共享,修改对所有插件实例生效,那么放在 `plugin-metadata` 合适。

Review comment:
       What is a "插件实例"




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers commented on a change in pull request #4670: docs: Add some questions and answers to the FAQ

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #4670:
URL: https://github.com/apache/apisix/pull/4670#discussion_r677054811



##########
File path: docs/en/latest/FAQ.md
##########
@@ -569,3 +569,5 @@ The difference between `plugin-metadata` and `plugin-configs`:
 
 - Plugin instance scope: `plugin-metadata` works on all instances of this plugin. `plugin-configs` works on the plugin instances configured under it.
 - Binding entities: `plugin-metadata` take effect on the entities bound to all instances of this plugin. `plugin-configs` take effect on the routes bound to this `plugin-configs`.
+
+Note: plugin instances are plugins that are currently enabled

Review comment:
       I'm afraid the term `plugin instance` is not correct in this context, as the instance gives an illusion that there is more than one copy in Apache APISIX, but indeed we just have one object for each plugin.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #4670: docs: Add some questions and answers to the FAQ

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4670:
URL: https://github.com/apache/apisix/pull/4670#discussion_r676272186



##########
File path: docs/en/latest/FAQ.md
##########
@@ -552,3 +552,20 @@ apisix:
 **Note:**
 
 - Whenever trying to connect TLS services with cosocket, you should set `apisix.ssl.ssl_trusted_certificate`
+
+As an example, if using Nacos as a service discovery in APISIX, Nacos has TLS protocol enabled, i.e. Nacos configuration `host` starts with `https://`, so you need to configure `apisix.ssl.ssl_trusted_certificate` and use the same CA certificate as Nacos.
+
+## How to fix `module 'resty.worker.events' not found` error
+
+Installing APISIX under the `/root` directory causes this problem. Because the worker process is run by the user `nobody`, it does not have enough permissions to access the files in the `/root` directory. You need to change the APISIX installation directory, and it is recommended to install it in the `/usr/local` directory.
+
+## What is the difference between `plugin_metadata` and `plugin-configs`
+
+`plugin_metadata` is the metadata of the plugin, which is shared by all plugin instances. When writing a plugin, if there are some plugin properties that are shared by all plugin instances and the changes take effect for all plugin instances, then it is appropriate to put them in `plugin_metadata`.
+
+`plugin-configigs` is a collection of multiple plugin instances. If you want to reuse a common set of plugin configurations, you can extract them into a Plugin Config and bind them to the corresponding routes.

Review comment:
       ```suggestion
   `plugin-configs` is a collection of multiple plugin instances. If you want to reuse a common set of plugin configurations, you can extract them into a Plugin Config and bind them to the corresponding routes.
   ```

##########
File path: docs/en/latest/FAQ.md
##########
@@ -552,3 +552,20 @@ apisix:
 **Note:**
 
 - Whenever trying to connect TLS services with cosocket, you should set `apisix.ssl.ssl_trusted_certificate`

Review comment:
       Better to clarify that we only need to set trusted certificate when the certificate is untrusted.

##########
File path: docs/en/latest/FAQ.md
##########
@@ -552,3 +552,20 @@ apisix:
 **Note:**
 
 - Whenever trying to connect TLS services with cosocket, you should set `apisix.ssl.ssl_trusted_certificate`
+
+As an example, if using Nacos as a service discovery in APISIX, Nacos has TLS protocol enabled, i.e. Nacos configuration `host` starts with `https://`, so you need to configure `apisix.ssl.ssl_trusted_certificate` and use the same CA certificate as Nacos.
+
+## How to fix `module 'resty.worker.events' not found` error
+
+Installing APISIX under the `/root` directory causes this problem. Because the worker process is run by the user `nobody`, it does not have enough permissions to access the files in the `/root` directory. You need to change the APISIX installation directory, and it is recommended to install it in the `/usr/local` directory.
+
+## What is the difference between `plugin_metadata` and `plugin-configs`

Review comment:
       We should have a consistent type for `-` & `_`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org