Re: [I] help request: Missing documentation or explanation for conf.yaml file [apisix]
Baoyuantop closed issue #12340: help request: Missing documentation or explanation for conf.yaml file URL: https://github.com/apache/apisix/issues/12340 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] help request: Missing documentation or explanation for conf.yaml file [apisix]
Baoyuantop commented on issue #12340: URL: https://github.com/apache/apisix/issues/12340#issuecomment-2986520507 If there is still a problem, please open it again. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] help request: Missing documentation or explanation for conf.yaml file [apisix]
mikyll commented on issue #12340:
URL: https://github.com/apache/apisix/issues/12340#issuecomment-2980529303
@didididi2001 some time ago I made a repository with different examples and
use cases (you can find it here:
[mikyll/apisix-examples](https://github.com/mikyll/apisix-examples)).
## Docker Compose Example
### Setup/Configuration
File structure:
```lang-none
.
├── compose.yaml
├── conf_control_plane
│ └── config.yaml
└── conf_data_plane
└── config.yaml
```
File `compose.yaml`:
```yaml
name: apisix-decoupled
services:
etcd:
image: bitnami/etcd:latest
restart: no
environment:
ALLOW_NONE_AUTHENTICATION: yes
ports:
- "2379:2379"
healthcheck:
test: "etcdctl endpoint health"
interval: 5s
timeout: 30s
retries: 5
networks:
apisix:
apisix-data-plane:
image: apache/apisix:latest
restart: no
depends_on:
etcd:
condition: service_healthy
volumes:
- ./conf_data_plane/config.yaml:/usr/local/apisix/conf/config.yaml:ro
ports:
- "9080:9080/tcp"
- "9443:9443/tcp"
networks:
apisix:
apisix-control-plane:
image: apache/apisix:latest
restart: no
depends_on:
etcd:
condition: service_healthy
volumes:
-
./conf_control_plane/config.yaml:/usr/local/apisix/conf/config.yaml:ro
ports:
- "9180:9180/tcp"
- "9091:9091/tcp"
- "9092:9092/tcp"
networks:
apisix:
httpbin:
image: kennethreitz/httpbin:latest
restart: no
ports:
- "3000:80/tcp"
networks:
apisix:
networks:
apisix:
driver: bridge
```
File `conf_control_plane/config.yaml`:
```yaml
deployment:
role: control_plane
role_control_plane:
config_provider: etcd
admin:
admin_key_required: true
admin_key:
- name: admin
key: 1a8fe9bd-73ab-493c-ac82-44db40eab641
role: admin
- name: guest
key: ""
role: viewer
allow_admin:
- 127.0.0.0/24
- 0.0.0.0/0
admin_listen:
ip: 0.0.0.0
port: 9180
etcd:
host:
- http://etcd:2379
prefix: "/apisix"
timeout: 30
```
File `conf_data_plane/config.yaml`:
```yaml
apisix:
router:
http: radixtree_uri_with_parameter
node_listen: 9080
deployment:
role: data_plane
role_data_plane:
config_provider: etcd
etcd:
host:
- http://etcd:2379
prefix: "/apisix"
timeout: 30
```
### Usage
Create some resources for testing:
```bash
ADMIN_APIKEY="1a8fe9bd-73ab-493c-ac82-44db40eab641"
# Upstreams
# Upstream to internal service
curl -s -i -X PUT
"http://localhost:9180/apisix/admin/upstreams/internal_httpbin"; -H "X-API-KEY:
$ADMIN_APIKEY" -d '
{
"nodes": {
"httpbin:80": 1
},
"type": "roundrobin"
}'
# Routes
# Simple route to internal service
curl -s -i -X PUT "http://localhost:9180/apisix/admin/routes/base_internal";
-H "X-API-KEY: $ADMIN_APIKEY" -d '
{
"uri": "/anything",
"upstream_id": "internal_httpbin"
}'
# Route with regex URI transformation
curl -s -i -X PUT "http://localhost:9180/apisix/admin/routes/httpbin"; -H
"X-API-KEY: $ADMIN_APIKEY" -d '
{
"uri": "/httpbin/*",
"upstream_id": "internal_httpbin",
"plugins": {
"proxy-rewrite": {
"regex_uri": [
"^/httpbin/(.*)",
"/$1"
]
}
}
}'
```
Test routes:
```bash
curl localhost:9080/anything
```
```bash
curl localhost:9080/httpbin/get
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Re: [I] help request: Missing documentation or explanation for conf.yaml file [apisix]
Baoyuantop commented on issue #12340: URL: https://github.com/apache/apisix/issues/12340#issuecomment-2979646573 You can refer to https://docs.api7.ai/apisix/production/deployment-modes -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
[I] help request: Missing documentation or explanation for conf.yaml file [apisix]
didididi2001 opened a new issue, #12340: URL: https://github.com/apache/apisix/issues/12340 ### Description I’m using the project and noticed there is little to no documentation or explanation about the conf.yaml file. In particular, I’m interested in how to configure it for decoupled mode. Could you please provide some details, examples, or guidance on how to properly set up and use conf.yaml in decoupled mode? ### 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
