You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by so...@apache.org on 2022/09/16 01:21:26 UTC
[apisix-docker] branch master updated: ci: sync etcd config from APISIX (#352)
This is an automated email from the ASF dual-hosted git repository.
soulbird pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-docker.git
The following commit(s) were added to refs/heads/master by this push:
new 2ae270c ci: sync etcd config from APISIX (#352)
2ae270c is described below
commit 2ae270c44ead1de828067664876197dd58d971a2
Author: soulbird <zh...@outlook.com>
AuthorDate: Fri Sep 16 09:21:21 2022 +0800
ci: sync etcd config from APISIX (#352)
* ci: sync etcd config from APISIX
Co-authored-by: soulbird <zh...@gmail.com>
---
.github/workflows/apisix-docker-dev-test.yaml | 4 +--
.github/workflows/apisix-docker-test.yaml | 4 +--
.gitignore | 1 +
compose/apisix_conf/master/config.yaml | 36 ++++++++++++++++++++++
compose/apisix_conf/release/config.yaml | 34 ++++++++++++++++++++
compose/apisix_log/.gitkeep | 0
...ker-compose.yaml => docker-compose-master.yaml} | 4 +--
...er-compose.yaml => docker-compose-release.yaml} | 7 ++---
8 files changed, 80 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/apisix-docker-dev-test.yaml b/.github/workflows/apisix-docker-dev-test.yaml
index 0358382..b254473 100644
--- a/.github/workflows/apisix-docker-dev-test.yaml
+++ b/.github/workflows/apisix-docker-dev-test.yaml
@@ -27,13 +27,13 @@ jobs:
- name: Build and run
run: |
make build-on-${{ matrix.platform }}
- docker-compose -f ./compose/docker-compose.yaml up -d
+ docker-compose -f ./compose/docker-compose-master.yaml up -d
sleep 30
docker logs compose_apisix_1
- name: Test
run: |
- grep -C 3 '\[error\]' example/apisix_log/error.log && exit 1
+ grep -C 3 '\[error\]' compose/apisix_log/error.log && exit 1
curl http://127.0.0.1:9180/apisix/admin/routes/1 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
diff --git a/.github/workflows/apisix-docker-test.yaml b/.github/workflows/apisix-docker-test.yaml
index 7ed687a..95f1025 100644
--- a/.github/workflows/apisix-docker-test.yaml
+++ b/.github/workflows/apisix-docker-test.yaml
@@ -27,13 +27,13 @@ jobs:
- name: Build and run
run: |
make build-on-${{ matrix.platform }}
- docker-compose -f ./compose/docker-compose.yaml up -d
+ docker-compose -f ./compose/docker-compose-release.yaml up -d
sleep 30
docker logs compose_apisix_1
- name: Test
run: |
- grep -C 3 '\[error\]' example/apisix_log/error.log && exit 1
+ grep -C 3 '\[error\]' compose/apisix_log/error.log && exit 1
curl http://127.0.0.1:9080/apisix/admin/routes/1 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
diff --git a/.gitignore b/.gitignore
index e1f0889..046bb0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.idea
.DS_Store
./package
+!compose/apisix_log/.gitkeep
diff --git a/compose/apisix_conf/master/config.yaml b/compose/apisix_conf/master/config.yaml
new file mode 100644
index 0000000..7ddb27d
--- /dev/null
+++ b/compose/apisix_conf/master/config.yaml
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apisix:
+ node_listen: 9080 # APISIX listening port
+ enable_ipv6: false
+
+deployment:
+ admin:
+ allow_admin: # http://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
+
+ 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
diff --git a/compose/apisix_conf/release/config.yaml b/compose/apisix_conf/release/config.yaml
new file mode 100644
index 0000000..c302dc0
--- /dev/null
+++ b/compose/apisix_conf/release/config.yaml
@@ -0,0 +1,34 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apisix:
+ node_listen: 9080 # APISIX listening port
+ enable_ipv6: false
+
+ allow_admin: # http://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
+
+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
diff --git a/compose/apisix_log/.gitkeep b/compose/apisix_log/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/compose/docker-compose.yaml b/compose/docker-compose-master.yaml
similarity index 91%
copy from compose/docker-compose.yaml
copy to compose/docker-compose-master.yaml
index 6f62c38..8c3ee8b 100644
--- a/compose/docker-compose.yaml
+++ b/compose/docker-compose-master.yaml
@@ -22,8 +22,8 @@ services:
image: "apache/apisix:${APISIX_DOCKER_TAG}"
restart: always
volumes:
- - ../example/apisix_log:/usr/local/apisix/logs
- - ../example/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
+ - ./apisix_log:/usr/local/apisix/logs
+ - ./apisix_conf/master/config.yaml:/usr/local/apisix/conf/config.yaml:ro
depends_on:
- etcd
ports:
diff --git a/compose/docker-compose.yaml b/compose/docker-compose-release.yaml
similarity index 89%
rename from compose/docker-compose.yaml
rename to compose/docker-compose-release.yaml
index 6f62c38..d354d3a 100644
--- a/compose/docker-compose.yaml
+++ b/compose/docker-compose-release.yaml
@@ -22,12 +22,11 @@ services:
image: "apache/apisix:${APISIX_DOCKER_TAG}"
restart: always
volumes:
- - ../example/apisix_log:/usr/local/apisix/logs
- - ../example/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
+ - ./apisix_log:/usr/local/apisix/logs
+ - ./apisix_conf/release/config.yaml:/usr/local/apisix/conf/config.yaml:ro
depends_on:
- etcd
ports:
- - "9180:9180/tcp"
- "9080:9080/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
@@ -53,4 +52,4 @@ services:
networks:
apisix:
- driver: bridge
+ driver: bridge
\ No newline at end of file