You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "KalepuHarish (via GitHub)" <gi...@apache.org> on 2024/02/22 19:04:50 UTC
[I] APISIX 3.8 and Consul Integration [apisix]
KalepuHarish opened a new issue, #10958:
URL: https://github.com/apache/apisix/issues/10958
### Description
Hi am using Consul as service discovery and spring cloud gateway and it register as service in consul now i want migrate to apisix and i am using it apisix-docker 3.8 but i am unable to make connection between consul and apisix.
can someone please help and if any source or steps please help me
### Environment
- APISIX version (run `apisix version`):
- Operating system (run `uname -a`):
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "KalepuHarish (via GitHub)" <gi...@apache.org>.
KalepuHarish commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960839756
but what if i am doing like below:
1. Running APISIX on AWS EC2 instance with same config using docker only
2. Running Consul on Another EC2 Instance in this case also i am unable to make connection between them.
below is the doc using to install consul: https://developer.hashicorp.com/consul/install
--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "theweakgod (via GitHub)" <gi...@apache.org>.
theweakgod commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960857986
docker inspect apisix container, and use NETWORKS GATEWAY as ur consul host.
--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "theweakgod (via GitHub)" <gi...@apache.org>.
theweakgod commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960794023
> discovery:
> consul:
> servers:
> - "http://127.0.0.1:8500"
Use Networks Gateway.
--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #10958: help request: APISIX 3.8 and Consul Integration
URL: https://github.com/apache/apisix/issues/10958
--
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
Re: [I] APISIX 3.8 and Consul Integration [apisix]
Posted by "theweakgod (via GitHub)" <gi...@apache.org>.
theweakgod commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960631400
Hello, perhaps what you need is this: [consul.md](https://github.com/apache/apisix/blob/master/docs/en/latest/discovery/consul.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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960798512
> discovery:
> consul:
> servers:
> - "http://127.0.0.1:8500/"
Replace `127.0.0.1` with your host's private ip address:

--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "KalepuHarish (via GitHub)" <gi...@apache.org>.
KalepuHarish commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960856314
<img width="1243" alt="Screenshot 2024-02-23 at 1 05 10 PM" src="https://github.com/apache/apisix/assets/111246741/b0c1b66a-0e6b-46e9-9a7c-5e5e9d777142">
as you suggested followed same but if you attached screenshot still its not able to connect to consul
--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1965437336
> as you suggested followed same but if you attached screenshot still its not able to connect to consul
@KalepuHarish I cannot reproduce your issue unfortunately.
Any update? Still struggling with the same?
--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "KalepuHarish (via GitHub)" <gi...@apache.org>.
KalepuHarish commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960795852
@kayx23 But i am not running consul using docker. but could you give little detailed answer with example please that will help a lot please.
--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960854031
1. similar to what I mentioned above, replace 127.0.0.1 with your EC2 host's private ip address.
2. you would have to research a bit more on your own to configure out how to adjust the networking and security group setups.
--
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
Re: [I] APISIX 3.8 and Consul Integration [apisix]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960645419
> i am using it apisix-docker 3.8 but i am unable to make connection between consul and apisix
Please see: https://docs.api7.ai/apisix/how-to-guide/service-discovery/consul-integration
--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-2684498678
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.
--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "KalepuHarish (via GitHub)" <gi...@apache.org>.
KalepuHarish commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960788346
Hi @kayx23,
Thank you for response and to your point below is the way i am staring APISIX and Consul.
**1. i am using apisix-docker and using docker compose i am starting apisix below is the compose file config.yaml file**
**docker-compose.yaml file:**
version: "3"
services:
apisix-dashboard:
image: apache/apisix-dashboard:3.0.1-alpine
restart: always
volumes:
- ./dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
ports:
- "9000:9000"
networks:
apisix:
apisix:
image: apache/apisix:${APISIX_IMAGE_TAG:-3.8.0-debian}
restart: always
volumes:
- ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
depends_on:
- etcd
##network_mode: host
ports:
- "9180:9180/tcp"
- "9080:9080/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
- "9092:9092/tcp"
networks:
apisix:
etcd:
image: bitnami/etcd:3.5.11
restart: always
volumes:
- etcd_data:/bitnami/etcd
environment:
ETCD_ENABLE_V2: "true"
ALLOW_NONE_AUTHENTICATION: "yes"
ETCD_ADVERTISE_CLIENT_URLS: "http://etcd:2379"
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
ports:
- "2379:2379/tcp"
networks:
apisix:
web1:
image: nginx:1.19.0-alpine
restart: always
volumes:
- ./upstream/web1.conf:/etc/nginx/nginx.conf
ports:
- "9081:80/tcp"
environment:
- NGINX_PORT=80
networks:
apisix:
web2:
image: nginx:1.19.0-alpine
restart: always
volumes:
- ./upstream/web2.conf:/etc/nginx/nginx.conf
ports:
- "9082:80/tcp"
environment:
- NGINX_PORT=80
networks:
apisix:
prometheus:
image: prom/prometheus:v2.25.0
restart: always
volumes:
- ./prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
networks:
apisix:
grafana:
image: grafana/grafana:7.3.7
restart: always
ports:
- "3000:3000"
volumes:
- "./grafana_conf/provisioning:/etc/grafana/provisioning"
- "./grafana_conf/dashboards:/var/lib/grafana/dashboards"
- "./grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini"
networks:
apisix:
networks:
apisix:
driver: bridge
volumes:
etcd_data:
driver: local
**config.yaml file**
discovery:
consul:
servers:
- "http://127.0.0.1:8500"
apisix:
node_listen: 9080 # APISIX listening port
enable_ipv6: false
enable_control: true
control:
ip: "0.0.0.0"
port: 9092
deployment:
admin:
allow_admin: # https://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 0.0.0.0/0 # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.
admin_key:
- name: "admin"
key: edd1c9f034335f136f87ad84b625c8f1
role: admin # admin: manage all configuration data
- name: "viewer"
key: 4054f7cf07e344346cd3f287985e76a2
role: viewer
etcd:
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
- "http://etcd:2379" # multiple etcd address
prefix: "/apisix" # apisix configurations prefix
timeout: 30 # 30 seconds
plugin_attr:
prometheus:
export_addr:
ip: "0.0.0.0"
port: 9091
**2. Running consul using brew install in my macbook and its running on 8500 port with UI. using below commands**
brew tap hashicorp/tap
brew install hashicorp/tap/consul
And also i tried another way i.e
1. Running APISIX on AWS EC2 instance with same config using docker only
2. Running Consul on Another EC2 Instance in this case also i am unable to make connection between them.
below is the doc using to install consul: https://developer.hashicorp.com/consul/install
Thanks,
Harish
--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "KalepuHarish (via GitHub)" <gi...@apache.org>.
KalepuHarish commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-1960801692
@kayx23 thank you so much will try and let you know
--
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
Re: [I] help request: APISIX 3.8 and Consul Integration [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10958:
URL: https://github.com/apache/apisix/issues/10958#issuecomment-2650334908
This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.
--
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