From a70e92f275c779e5f43664d4471c16e13bde2f5c Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Mon, 16 May 2022 12:37:27 +0800 Subject: [PATCH 01/11] feat(shdict): multi-subsystems lua_shared_dict support --- build-apisix-base.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index 9eb6e0c81..b6c5cc9c1 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -72,6 +72,10 @@ cd .. cd apisix-nginx-module/patch || exit 1 ./patch.sh ../../openresty-${or_ver} +sed -i '/ngx_http_lua_shdict.c/d' ../../openresty-${or_ver}/bundle/ngx_lua-0.10.20/config +sed -i '/ngx_http_lua_shdict.h/d' ../../openresty-${or_ver}/bundle/ngx_lua-0.10.20/config +sed -i '/ngx_stream_lua_shdict.c/d' ../../openresty-${or_ver}/bundle/ngx_stream_lua-0.0.10/config +sed -i '/ngx_stream_lua_shdict.h/d' ../../openresty-${or_ver}/bundle/ngx_stream_lua-0.0.10/config cd ../.. cd wasm-nginx-module || exit 1 @@ -92,6 +96,7 @@ cd openresty-${or_ver} || exit 1 --add-module=../ngx_multi_upstream_module \ --add-module=../apisix-nginx-module \ --add-module=../apisix-nginx-module/src/stream \ + --add-module=/usr/local/apisix-nginx-module/src/meta \ --add-module=../wasm-nginx-module \ --add-module=../lua-var-nginx-module \ --with-poll_module \ From deb965ce4016f43a0b3386cde636c927ac6b6e14 Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Tue, 17 May 2022 16:07:42 +0800 Subject: [PATCH 02/11] adjust patchs --- build-apisix-base.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index b6c5cc9c1..b729fa871 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -72,10 +72,6 @@ cd .. cd apisix-nginx-module/patch || exit 1 ./patch.sh ../../openresty-${or_ver} -sed -i '/ngx_http_lua_shdict.c/d' ../../openresty-${or_ver}/bundle/ngx_lua-0.10.20/config -sed -i '/ngx_http_lua_shdict.h/d' ../../openresty-${or_ver}/bundle/ngx_lua-0.10.20/config -sed -i '/ngx_stream_lua_shdict.c/d' ../../openresty-${or_ver}/bundle/ngx_stream_lua-0.0.10/config -sed -i '/ngx_stream_lua_shdict.h/d' ../../openresty-${or_ver}/bundle/ngx_stream_lua-0.0.10/config cd ../.. cd wasm-nginx-module || exit 1 @@ -96,7 +92,7 @@ cd openresty-${or_ver} || exit 1 --add-module=../ngx_multi_upstream_module \ --add-module=../apisix-nginx-module \ --add-module=../apisix-nginx-module/src/stream \ - --add-module=/usr/local/apisix-nginx-module/src/meta \ + --add-module=../apisix-nginx-module/src/meta \ --add-module=../wasm-nginx-module \ --add-module=../lua-var-nginx-module \ --with-poll_module \ From c0d915c97505f148474396f10fdd1e00aaa7237c Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Tue, 17 May 2022 16:14:33 +0800 Subject: [PATCH 03/11] CI test --- build-apisix-base.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index b729fa871..2d8f780f8 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -49,7 +49,9 @@ if [ "$repo" == apisix-nginx-module ]; then cp -r "$prev_workdir" . else git clone --depth=1 $apisix_nginx_module_ver \ - https://github.com/api7/apisix-nginx-module.git + #https://github.com/api7/apisix-nginx-module.git + # for CI, should remove before merge to master + https://github.com/tzssangglass/apisix-nginx-module.git -b unify_shdict fi if [ "$repo" == wasm-nginx-module ]; then From 0e7f68f14bac3116d8f13adc9d860d9c6079d130 Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Tue, 17 May 2022 16:22:14 +0800 Subject: [PATCH 04/11] fix git clone --- build-apisix-base.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index 2d8f780f8..f763bf126 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -48,9 +48,10 @@ fi if [ "$repo" == apisix-nginx-module ]; then cp -r "$prev_workdir" . else - git clone --depth=1 $apisix_nginx_module_ver \ - #https://github.com/api7/apisix-nginx-module.git - # for CI, should remove before merge to master + # git clone --depth=1 $apisix_nginx_module_ver \ + # https://github.com/api7/apisix-nginx-module.git + # for CI, should remove before merge to master + git clone --depth=1 \ https://github.com/tzssangglass/apisix-nginx-module.git -b unify_shdict fi From cabbc4da605d59262ec0a5bdeae32f09e2e8ca59 Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Thu, 19 May 2022 17:54:48 +0800 Subject: [PATCH 05/11] revert link --- build-apisix-base.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index f763bf126..9641d275b 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -50,9 +50,7 @@ if [ "$repo" == apisix-nginx-module ]; then else # git clone --depth=1 $apisix_nginx_module_ver \ # https://github.com/api7/apisix-nginx-module.git - # for CI, should remove before merge to master - git clone --depth=1 \ - https://github.com/tzssangglass/apisix-nginx-module.git -b unify_shdict + fi if [ "$repo" == wasm-nginx-module ]; then From 3fc180ffadc9fcefc6e9cbbf060f5ed7083b9f96 Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Thu, 19 May 2022 17:55:32 +0800 Subject: [PATCH 06/11] revert link --- build-apisix-base.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index 9641d275b..953a3289e 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -48,8 +48,8 @@ fi if [ "$repo" == apisix-nginx-module ]; then cp -r "$prev_workdir" . else - # git clone --depth=1 $apisix_nginx_module_ver \ - # https://github.com/api7/apisix-nginx-module.git + git clone --depth=1 $apisix_nginx_module_ver \ + https://github.com/api7/apisix-nginx-module.git fi From 4f04f475054463f20e9d40cbd895d2005233c255 Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Thu, 19 May 2022 17:56:17 +0800 Subject: [PATCH 07/11] revert --- build-apisix-base.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index 953a3289e..b729fa871 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -50,7 +50,6 @@ if [ "$repo" == apisix-nginx-module ]; then else git clone --depth=1 $apisix_nginx_module_ver \ https://github.com/api7/apisix-nginx-module.git - fi if [ "$repo" == wasm-nginx-module ]; then From a556e9e075ed833a7b27dce3850f2aad0abc2de7 Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Thu, 19 May 2022 19:32:21 +0800 Subject: [PATCH 08/11] fix new module --- build-apisix-base.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index b729fa871..7658d747f 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -12,6 +12,7 @@ if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then lua_var_nginx_module_ver="" debug_args="--with-debug" OR_PREFIX=${OR_PREFIX:="/usr/local/openresty-debug"} + with_shared_shdict_module ="--add-module=../apisix-nginx-module/src/meta" else ngx_multi_upstream_module_ver="-b 1.0.1" mod_dubbo_ver="-b 1.0.2" @@ -20,6 +21,7 @@ else lua_var_nginx_module_ver="-b v0.5.2" debug_args=${debug_args:-} OR_PREFIX=${OR_PREFIX:="/usr/local/openresty"} + with_shared_shdict_module=${with_shared_shdict_module:-} fi prev_workdir="$PWD" @@ -92,7 +94,7 @@ cd openresty-${or_ver} || exit 1 --add-module=../ngx_multi_upstream_module \ --add-module=../apisix-nginx-module \ --add-module=../apisix-nginx-module/src/stream \ - --add-module=../apisix-nginx-module/src/meta \ + $with_shared_shdict_module \ --add-module=../wasm-nginx-module \ --add-module=../lua-var-nginx-module \ --with-poll_module \ From b466aa74bc07ffe5b2f39eb6ad5314e053cff67b Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Thu, 19 May 2022 21:37:44 +0800 Subject: [PATCH 09/11] fix --- build-apisix-base.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-apisix-base.sh b/build-apisix-base.sh index 7658d747f..279b42448 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -12,7 +12,7 @@ if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then lua_var_nginx_module_ver="" debug_args="--with-debug" OR_PREFIX=${OR_PREFIX:="/usr/local/openresty-debug"} - with_shared_shdict_module ="--add-module=../apisix-nginx-module/src/meta" + add_shared_shdict_module="--add-module=../apisix-nginx-module/src/meta" else ngx_multi_upstream_module_ver="-b 1.0.1" mod_dubbo_ver="-b 1.0.2" @@ -21,7 +21,7 @@ else lua_var_nginx_module_ver="-b v0.5.2" debug_args=${debug_args:-} OR_PREFIX=${OR_PREFIX:="/usr/local/openresty"} - with_shared_shdict_module=${with_shared_shdict_module:-} + add_shared_shdict_module=${add_shared_shdict_module:-} fi prev_workdir="$PWD" @@ -94,7 +94,7 @@ cd openresty-${or_ver} || exit 1 --add-module=../ngx_multi_upstream_module \ --add-module=../apisix-nginx-module \ --add-module=../apisix-nginx-module/src/stream \ - $with_shared_shdict_module \ + $add_shared_shdict_module \ --add-module=../wasm-nginx-module \ --add-module=../lua-var-nginx-module \ --with-poll_module \ From 11377c4bef87e7412a58998a62041b3fc499d1a3 Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Thu, 19 May 2022 22:45:59 +0800 Subject: [PATCH 10/11] build 2.13.1 --- .github/workflows/package-apisix-rpm-el7.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/package-apisix-rpm-el7.yml b/.github/workflows/package-apisix-rpm-el7.yml index 587fe4a56..12b47d852 100644 --- a/.github/workflows/package-apisix-rpm-el7.yml +++ b/.github/workflows/package-apisix-rpm-el7.yml @@ -40,7 +40,7 @@ jobs: - name: packaging APISIX(-remote) with remote code run: | make package type=rpm app=apisix version=2.7 checkout=release/2.7 image_base=centos image_tag=7 artifact=apisix-remote - make package type=rpm app=apisix version=2.10.1 checkout=2.10.1 image_base=centos image_tag=7 artifact=apisix-remote + make package type=rpm app=apisix version=2.13.1 checkout=2.13.1 image_base=centos image_tag=7 artifact=apisix-remote make package type=rpm app=apisix version=master checkout=master image_base=centos image_tag=7 artifact=apisix-remote - name: packaging APISIX(-local) with local code @@ -75,12 +75,12 @@ jobs: docker exec centos7Instance bash -c "pkill -f nginx" docker exec centos7Instance bash -c "yum -y erase apisix-remote-master" - - name: install APISIX(-remote) 2.10.1 by rpm in container + - name: install APISIX(-remote) 2.13.1 by rpm in container run: | - docker exec centos7Instance bash -c "yum -y localinstall /output/apisix-remote-2.10.1-0.el7.x86_64.rpm" + docker exec centos7Instance bash -c "yum -y localinstall /output/apisix-remote-2.13.1-0.el7.x86_64.rpm" docker exec centos7Instance bash -c "apisix start" - - name: check and ensure APISIX(-remote) 2.10.1 is installed + - name: check and ensure APISIX(-remote) 2.13.1 is installed run: | code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1') if [ ! $code -eq 200 ]; then @@ -88,10 +88,10 @@ jobs: exit 1 fi - - name: stop and uninstall APISIX(-remote) 2.10.1 + - name: stop and uninstall APISIX(-remote) 2.13.1 run: | docker exec centos7Instance bash -c "pkill -f nginx" - docker exec centos7Instance bash -c "yum -y erase apisix-remote-2.10.1" + docker exec centos7Instance bash -c "yum -y erase apisix-remote-2.13.1" - name: install APISIX(-local) by rpm in container run: | From cf3c6072fb6537e6c10b8ce0ee7e65ed75ce3428 Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Thu, 19 May 2022 22:49:16 +0800 Subject: [PATCH 11/11] build 2.13.1 --- .github/workflows/package-apisix-deb-ubuntu20.04.yml | 2 +- .github/workflows/package-apisix-rpm-el8.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/package-apisix-deb-ubuntu20.04.yml b/.github/workflows/package-apisix-deb-ubuntu20.04.yml index 444081a24..8755c3831 100644 --- a/.github/workflows/package-apisix-deb-ubuntu20.04.yml +++ b/.github/workflows/package-apisix-deb-ubuntu20.04.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 env: - PACKAGE_APISIX_VERSION: 2.12.0 + PACKAGE_APISIX_VERSION: 2.13.1 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/package-apisix-rpm-el8.yml b/.github/workflows/package-apisix-rpm-el8.yml index 20ae02fea..a93454433 100644 --- a/.github/workflows/package-apisix-rpm-el8.yml +++ b/.github/workflows/package-apisix-rpm-el8.yml @@ -40,7 +40,7 @@ jobs: - name: packaging APISIX(-remote) with remote code run: | make package type=rpm app=apisix version=2.7 checkout=release/2.7 image_base=centos image_tag=8 artifact=apisix-remote - make package type=rpm app=apisix version=2.10.1 checkout=2.10.1 image_base=centos image_tag=8 artifact=apisix-remote + make package type=rpm app=apisix version=2.13.1 checkout=2.13.1 image_base=centos image_tag=8 artifact=apisix-remote make package type=rpm app=apisix version=master checkout=master image_base=centos image_tag=8 artifact=apisix-remote - name: packaging APISIX(-local) with local code @@ -80,12 +80,12 @@ jobs: docker exec centos8Instance bash -c "pkill -f nginx" docker exec centos8Instance bash -c "yum -y erase apisix-remote-master" - - name: install APISIX(-remote) 2.10.1 by rpm in container + - name: install APISIX(-remote) 2.13.1 by rpm in container run: | - docker exec centos8Instance bash -c "yum -y localinstall /output/apisix-remote-2.10.1-0.el8.x86_64.rpm" + docker exec centos8Instance bash -c "yum -y localinstall /output/apisix-remote-2.13.1-0.el8.x86_64.rpm" docker exec centos8Instance bash -c "apisix start" - - name: check and ensure APISIX(-remote) 2.10.1 is installed + - name: check and ensure APISIX(-remote) 2.13.1 is installed run: | code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1') if [ ! $code -eq 200 ]; then @@ -93,10 +93,10 @@ jobs: exit 1 fi - - name: stop and uninstall APISIX(-remote) 2.10.1 + - name: stop and uninstall APISIX(-remote) 2.13.1 run: | docker exec centos8Instance bash -c "pkill -f nginx" - docker exec centos8Instance bash -c "yum -y erase apisix-remote-2.10.1" + docker exec centos8Instance bash -c "yum -y erase apisix-remote-2.13.1" - name: install APISIX(-local) by rpm in container run: |