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 2022/12/20 02:00:56 UTC
[GitHub] [apisix] cardiyu opened a new issue, #8537: docs: Provide more configuration suggestions on setting up high availability Apache APISIX clusters
cardiyu opened a new issue, #8537:
URL: https://github.com/apache/apisix/issues/8537
### Current State
When I try to setup high availability Apache APISIX clusters for production environment,I find this
[FAQ](https://apisix.apache.org/docs/apisix/2.15/FAQ/#how-do-i-setup-high-availability-apache-apisix-clusters).
**********
How do I setup high availability Apache APISIX clusters?[#](https://apisix.apache.org/docs/apisix/2.15/FAQ/#how-do-i-setup-high-availability-apache-apisix-clusters)
Apache APISIX can be made highly available by adding a load balancer in front of it as APISIX's data plane is stateless and can be scaled when needed.
The control plane of Apache APISIX is highly available as it relies only on an etcd cluster.
**********
However, I still wonder how to set the specific configuration.
### Desired State
Provide more configuration suggestions, such as defining multiple etcd host addresses for an etcd cluster in config.yaml.
--
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] docs: Provide more configuration suggestions on setting up high availability Apache APISIX clusters [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8537: docs: Provide more configuration suggestions on setting up high availability Apache APISIX clusters
URL: https://github.com/apache/apisix/issues/8537
--
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] docs: Provide more configuration suggestions on setting up high availability Apache APISIX clusters [apisix]
Posted by "umiecornxig (via GitHub)" <gi...@apache.org>.
umiecornxig commented on issue #8537:
URL: https://github.com/apache/apisix/issues/8537#issuecomment-1999001746
**Step2** : prepare docker compose file for both vms
for vm (**192.168.100.170**)
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.3.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"
- "443:9443/tcp"
- "9092:9092/tcp"
networks:
apisix:
**etcd:
image: bitnami/etcd:3.4.15
restart: always
volumes:
- etcd_data:/bitnami/etcd
environment:
ETCD_NAME: "etcd-0"
ETCD_ENABLE_V2: "true"
ALLOW_NONE_AUTHENTICATION: "yes"
ETCD_ADVERTISE_CLIENT_URLS: "http://192.168.100.170:2379"
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
ETCD_INITIAL_ADVERTISE_PEER_URLS: "http://192.168.100.170:2380"
ETCD_LISTEN_PEER_URLS: "http://0.0.0.0:2380"
ETCD_INITIAL_CLUSTER: "etcd-0=http://192.168.100.170:2380,etcd-1=http://192.168.101.123:2380"
ETCD_INITIAL_CLUSTER_TOKEN: "apisix-cluster"
ETCD_INITIAL_CLUSTER_STATE: "new"
ports:
- "2379:2379/tcp"
- "2380:2380/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:
networks:
apisix:
driver: bridge
volumes:
etcd_data:
driver: local
--
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] docs: Provide more configuration suggestions on setting up high availability Apache APISIX clusters [apisix]
Posted by "umiecornxig (via GitHub)" <gi...@apache.org>.
umiecornxig commented on issue #8537:
URL: https://github.com/apache/apisix/issues/8537#issuecomment-1998999573
**For distributing apisix in a highly available environment and distribute it across multiple servers Below is sample Configuration that worked for me .**
**Step1**: Modify apisix.conf (added etcd cluster hosts)
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://192.168.100.170:2379"
- "http://192.168.101.123:2379"
prefix: "/apisix" # apisix configurations prefix
timeout: 30 # 30 seconds
plugin_attr:
prometheus:
export_addr:
ip: "0.0.0.0"
port: 9091
--
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] docs: Provide more configuration suggestions on setting up high availability Apache APISIX clusters [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8537:
URL: https://github.com/apache/apisix/issues/8537#issuecomment-1864191572
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] docs: Provide more configuration suggestions on setting up high availability Apache APISIX clusters [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8537:
URL: https://github.com/apache/apisix/issues/8537#issuecomment-1840427835
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
Re: [I] docs: Provide more configuration suggestions on setting up high availability Apache APISIX clusters [apisix]
Posted by "umiecornxig (via GitHub)" <gi...@apache.org>.
umiecornxig commented on issue #8537:
URL: https://github.com/apache/apisix/issues/8537#issuecomment-1999002592
**For VM (192.168.101.123)**
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.3.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"
- "443:9443/tcp"
- "9092:9092/tcp"
networks:
apisix:
**etcd:
image: bitnami/etcd:3.4.15
restart: always
volumes:
- etcd_data:/bitnami/etcd
environment:
ETCD_NAME: "etcd-1"
ETCD_ENABLE_V2: "true"
ALLOW_NONE_AUTHENTICATION: "yes"
ETCD_ADVERTISE_CLIENT_URLS: "http://192.168.101.123:2379"
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
ETCD_INITIAL_ADVERTISE_PEER_URLS: "http://192.168.101.123:2380"
ETCD_LISTEN_PEER_URLS: "http://0.0.0.0:2380"
ETCD_INITIAL_CLUSTER: "etcd-0=http://192.168.100.170:2380,etcd-1=http://192.168.101.123:2380"
ETCD_INITIAL_CLUSTER_TOKEN: "apisix-cluster"
ETCD_INITIAL_CLUSTER_STATE: "new"
ports:
- "2379:2379/tcp"
- "2380:2380/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:
networks:
apisix:
driver: bridge
volumes:
etcd_data:
driver: local
--
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