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/11/22 11:51:47 UTC

[GitHub] [apisix] lishaoshu1240 opened a new issue #5573: docs: dont found the usage of etcd in discovery.md

lishaoshu1240 opened a new issue #5573:
URL: https://github.com/apache/apisix/issues/5573


   ### Improved or typo fixed.
   
   hi,  i want to use etcd for discovery tools, but i dont found the  it in the discovery.md 
   
   ### Solution
   
   plesase add etcd relevant description. 


-- 
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] juzhiyuan commented on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-988523924


   Hi @bzp2010, could you please take a look? 😄


-- 
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] lishaoshu1240 commented on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
lishaoshu1240 commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-976469934


   > > the LINKS have the usage of Eureka/Consul/Nacos, but dont have the etcd usage.
   > 
   > yes, see: [#4442 (comment)](https://github.com/apache/apisix/issues/4442#issuecomment-863746666), you need to register `order` as upstream of APISIX, like:
   > 
   > ```
   > /apisix/upstreams/order
   > ……
   > ```
   
   i still met some trouble(cant found my upstream id), look at my  logs:
   
   ![image](https://user-images.githubusercontent.com/10431594/143025017-4b1f0cf5-9149-4f68-a7ec-6223ab6e0544.png)
   
   ![image](https://user-images.githubusercontent.com/10431594/143025044-61698f8a-e1e1-4c08-a585-57a9fb3678ff.png)
   
   


-- 
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] lishaoshu1240 commented on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
lishaoshu1240 commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-976102823


   > see: #4713
   
   @tzssangglass , thanks reply so quikly,  you misunderstand what i say.  
   
   var LINKS = "https://github.com/apache/apisix/blob/master/docs/en/latest/discovery.md#supported-discovery-registries"
   
   the LINKS have  the usage of Eureka/Consul/Nacos, but dont have the etcd usage.
   i want use etcd discovery to get my upstream addr in the apisix.  you can understand  what i want to do if you see this configure:
   
   {
     "methods": ["GET"],
     "uris": ["/api/order*","/api/calu*"],
     "plugins": {
   	"jwt-auth": {}
     },
     "upstream": {
        "service_name": "order",
       "type": "roundrobin",
       "discovery_type": "etcd"
     }
   }
   
   I have micro-services register the  addr to my topic “order”
   
   [root@localhost ~]# etcdctl get "order/" --prefix
   order/192.168.0.73:9999
   {"Name":"order","IP":"192.168.0.73:9999"}
   


-- 
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] lishaoshu1240 commented on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
lishaoshu1240 commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-977397357


   > use words rather than pictures.
   > 
   > 1. we don't have discovery_type is etcd
   > 2. take a look at:https://github.com/apache/apisix/blob/master/docs/en/latest/admin-api.md#upstream, you need to register `order` as an upstream, check the config of `order`.
   
   I register order as upstream of APISIX, here is my config:
   
   http://192.168.0.73:9080/apisix/admin/upstreams/order
   {
   	"service_name": "order",
       "type": "roundrobin",
       "discovery_type": "etcd"
     }
   
   ps:  the keywords "discovery_type",  how to fill if i want use etcd as discovery and registory
   
   where i can get the  examples of etcd as discovery.
   if i use Eureka as discovery, i can follow this link:https://github.com/apache/apisix/blob/master/docs/en/latest/discovery.md
   
   


-- 
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 issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-975560232


   see: https://github.com/apache/apisix/issues/4713


-- 
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] leslie-tsang commented on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
leslie-tsang commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-1002381789


   > Just have a discussion with @bzp2010, we don't support ETCD as Service Discovery yet 🤔 @leslie-tsang could you please have a confirmation? 😄
   
   AFAIK, APISIX don't support `etcd` as `Service Discovery` yet.  🤔


-- 
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] juzhiyuan commented on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-1002364849


   Just have a discussion with @bzp2010, we don't support ETCD as Service Discovery yet 🤔 @leslie-tsang could you please have a confirmation? 😄


-- 
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] lishaoshu1240 commented on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
lishaoshu1240 commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-976487929


   > > the LINKS have the usage of Eureka/Consul/Nacos, but dont have the etcd usage.
   > 
   > yes, see: [#4442 (comment)](https://github.com/apache/apisix/issues/4442#issuecomment-863746666), you need to register `order` as upstream of APISIX, like:
   > 
   > ```
   > /apisix/upstreams/order
   > ……
   > ```
   
   It's also faild if I use this method,  please help me check logs:
   
   ![image](https://user-images.githubusercontent.com/10431594/143027297-20a27a4f-f3df-43da-8016-bf8ec10b318c.png)
   ![image](https://user-images.githubusercontent.com/10431594/143027321-82fd3a6d-b639-4f61-9a83-3f45c2deacc6.png)
   ![image](https://user-images.githubusercontent.com/10431594/143027341-1a4d337c-92fb-452d-8e56-0a26024e240b.png)
   ![image](https://user-images.githubusercontent.com/10431594/143027359-6ece9a80-0d8b-48e2-9e07-7a5f960b1d85.png)
   


-- 
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 issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-977754561


   read: https://github.com/apache/apisix/blob/master/docs/zh/latest/admin-api.md#body-%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0-3 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] lishaoshu1240 edited a comment on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
lishaoshu1240 edited a comment on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-977582600


   > > the keywords "discovery_type", how to fill if i want use etcd as discovery and registory
   > 
   > no need to set `discovery_type ` if you register order as upstream of APISIX.
   
   can you help me write the configure?
   
   if i do not set the discovery_type, it faild :
   
   
   ![image](https://user-images.githubusercontent.com/10431594/143189137-79cec408-8db8-4ecc-a1f8-5ebdc2cc6c97.png)
   


-- 
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 closed issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #5573:
URL: https://github.com/apache/apisix/issues/5573


   


-- 
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] lishaoshu1240 removed a comment on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
lishaoshu1240 removed a comment on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-976469934


   > > the LINKS have the usage of Eureka/Consul/Nacos, but dont have the etcd usage.
   > 
   > yes, see: [#4442 (comment)](https://github.com/apache/apisix/issues/4442#issuecomment-863746666), you need to register `order` as upstream of APISIX, like:
   > 
   > ```
   > /apisix/upstreams/order
   > ……
   > ```
   
   i still met some trouble(cant found my upstream id), look at my  logs:
   
   ![image](https://user-images.githubusercontent.com/10431594/143025017-4b1f0cf5-9149-4f68-a7ec-6223ab6e0544.png)
   
   ![image](https://user-images.githubusercontent.com/10431594/143025044-61698f8a-e1e1-4c08-a585-57a9fb3678ff.png)
   
   


-- 
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] leslie-tsang edited a comment on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
leslie-tsang edited a comment on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-1002381789


   > Just have a discussion with @bzp2010, we don't support ETCD as Service Discovery yet 🤔 @leslie-tsang could you please have a confirmation? 😄
   
   ~~AFAIK, APISIX don't support `etcd` as `Service Discovery` yet.  🤔~~
   After reading [#4713](https://github.com/apache/apisix/issues/4713) and [#4442 comment](https://github.com/apache/apisix/issues/4442#issuecomment-863746666).
   There is a way to use `etcd` as `Service Discovery`, which need to update `etcd`'s upstream config.
   More detail in #4713


-- 
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 issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-977499394


   > the keywords "discovery_type", how to fill if i want use etcd as discovery and registory
   
   no need to set `discovery_type ` if you register order as upstream of APISIX. 


-- 
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] lishaoshu1240 commented on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
lishaoshu1240 commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-977582600


   > > the keywords "discovery_type", how to fill if i want use etcd as discovery and registory
   > 
   > no need to set `discovery_type ` if you register order as upstream of APISIX.
   
   can you help me write the configure?
   
   if i do not set the discovery_type, it faild :
   ![image](https://user-images.githubusercontent.com/10431594/143189137-79cec408-8db8-4ecc-a1f8-5ebdc2cc6c97.png)
   


-- 
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 issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-1002420024


   We support etcd as the source of discovery in a different way.


-- 
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 issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-976547059


   use words rather than pictures.
   
   1. we don't have discovery_type is etcd
   2. take a look at:https://github.com/apache/apisix/blob/master/docs/en/latest/admin-api.md#upstream, you need to register `order` as an upstream, check the config of `order`.


-- 
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] lishaoshu1240 edited a comment on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
lishaoshu1240 edited a comment on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-976487929


   > > the LINKS have the usage of Eureka/Consul/Nacos, but dont have the etcd usage.
   > 
   > yes, see: [#4442 (comment)](https://github.com/apache/apisix/issues/4442#issuecomment-863746666), you need to register `order` as upstream of APISIX, like:
   > 
   > ```
   > /apisix/upstreams/order
   > ……
   > ```
   
   It's also faild if I use this method,  please help me check logs:
   
   ![image](https://user-images.githubusercontent.com/10431594/143027297-20a27a4f-f3df-43da-8016-bf8ec10b318c.png)
   ![image](https://user-images.githubusercontent.com/10431594/143027321-82fd3a6d-b639-4f61-9a83-3f45c2deacc6.png)
   ![image](https://user-images.githubusercontent.com/10431594/143027341-1a4d337c-92fb-452d-8e56-0a26024e240b.png)
   
   [root@localhost yapi-docker]# etcdctl get order --prefix
   order
   {"Name":"order","IP":"192.168.0.73:9082"}
   [root@localhost yapi-docker]#
   [root@localhost yapi-docker]# curl http://192.168.0.73:9082/
   hello web2[root@localhost yapi-docker]#


-- 
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 edited a comment on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
tzssangglass edited a comment on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-976112746


   > the LINKS have the usage of Eureka/Consul/Nacos, but dont have the etcd usage.
   
   yes, see: https://github.com/apache/apisix/issues/4442#issuecomment-863746666, you need to register `order` as upstream of APISIX, like:
   
   ```
   /apisix/upstreams/order
   ……
   ```
   


-- 
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 issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-976112746


   > the LINKS have the usage of Eureka/Consul/Nacos, but dont have the etcd usage.
   
   yes, see: see: https://github.com/apache/apisix/issues/4442#issuecomment-863746666, you need to register `order` as upstream of APISIX, like:
   
   ```
   /apisix/upstreams/order
   ……
   ```
   


-- 
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] lishaoshu1240 commented on issue #5573: docs: dont found the usage of etcd in discovery.md

Posted by GitBox <gi...@apache.org>.
lishaoshu1240 commented on issue #5573:
URL: https://github.com/apache/apisix/issues/5573#issuecomment-977806660


   > read: https://github.com/apache/apisix/blob/master/docs/zh/latest/admin-api.md#body-%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0-3 first
   
   hi,兄弟,这个文档我看了好多遍了,我完全理解admin-api.md 中upstream的意思。但是现在我光看这个文档还是不能明白内置的etcd 怎么用的。
   
   我的order微服务已经注册到apisix 配套的的etcd里面了,现在就是想通过openresty 去服务发现这个order微服务。
   所以我现在通过下面步骤来实现:
   step1、通过http://192.168.0.73:9080/apisix/admin/upstreams/order 新增一个upstream。
   {
   "service_name": "order",
   "type": "roundrobin",
   "discovery_type": "etcd"
   }
   **现在问题点就在这,我不知道这个新增的upstream怎么写,你上文说不需要discovery_type,如果不需要的话,那么这个body参数怎么写?(只留下service_name 和type,去提交的话,会报错)。**
   
   step2、通过http://192.168.0.73:9080/apisix/admin/routes/1 来添加上面的upstream。这一步没问题。
   {
     "methods": ["GET"],
     "uris": ["/api/order*","/api/calu*"],
     "plugins": {
   	"jwt-auth": {}
     },
     "upstream_id":"order"
   }
   
   
   通过上面两个步骤后,我的理解就是当有order微服务接口过来的时候,apsix能够正常转发到我的order后端地址。但是现在明显卡在第一步。


-- 
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