Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to openresty-1.25.3.1 #367

Merged
merged 22 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions build-apisix-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ set -x

version=${version:-0.0.0}

OPENRESTY_VERSION=${OPENRESTY_VERSION:-1.21.4.2}
OPENRESTY_VERSION=${OPENRESTY_VERSION:-1.25.3.1}
if [ "$OPENRESTY_VERSION" == "source" ] || [ "$OPENRESTY_VERSION" == "default" ]; then
OPENRESTY_VERSION="1.21.4.2"
OPENRESTY_VERSION="1.25.3.1"
fi

if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then
ngx_multi_upstream_module_ver="master"
mod_dubbo_ver="master"
apisix_nginx_module_ver="main"
apisix_nginx_module_ver="upgrade_openresty-1.25.3.1"
wasm_nginx_module_ver="main"
lua_var_nginx_module_ver="master"
grpc_client_nginx_module_ver="main"
Expand Down Expand Up @@ -42,8 +42,8 @@ tar -zxvpf openresty-${OPENRESTY_VERSION}.tar.gz > /dev/null
if [ "$repo" == ngx_multi_upstream_module ]; then
cp -r "$prev_workdir" ./ngx_multi_upstream_module-${ngx_multi_upstream_module_ver}
else
git clone --depth=1 -b $ngx_multi_upstream_module_ver \
https://github.com/api7/ngx_multi_upstream_module.git \
git clone --depth=1 -b upgrade_openresty-1.25.3 \
https://github.com/zll600/ngx_multi_upstream_module.git \
zll600 marked this conversation as resolved.
Show resolved Hide resolved
ngx_multi_upstream_module-${ngx_multi_upstream_module_ver}
fi

Expand All @@ -58,16 +58,16 @@ fi
if [ "$repo" == apisix-nginx-module ]; then
cp -r "$prev_workdir" ./apisix-nginx-module-${apisix_nginx_module_ver}
else
git clone --depth=1 -b $apisix_nginx_module_ver \
https://github.com/api7/apisix-nginx-module.git \
git clone --depth=1 -b upgrade_openresty_1.25.3.1 \
https://github.com/zll600/apisix-nginx-module.git \
apisix-nginx-module-${apisix_nginx_module_ver}
fi

if [ "$repo" == wasm-nginx-module ]; then
cp -r "$prev_workdir" ./wasm-nginx-module-${wasm_nginx_module_ver}
else
git clone --depth=1 -b $wasm_nginx_module_ver \
https://github.com/api7/wasm-nginx-module.git \
git clone --depth=1 -b fix_header_files \
https://github.com/zll600/wasm-nginx-module.git \
zll600 marked this conversation as resolved.
Show resolved Hide resolved
wasm-nginx-module-${wasm_nginx_module_ver}
fi

Expand All @@ -82,8 +82,8 @@ fi
if [ "$repo" == grpc-client-nginx-module ]; then
cp -r "$prev_workdir" ./grpc-client-nginx-module-${grpc_client_nginx_module_ver}
else
git clone --depth=1 -b $grpc_client_nginx_module_ver \
https://github.com/api7/grpc-client-nginx-module \
git clone --depth=1 -b fix_header_files \
https://github.com/zll600/grpc-client-nginx-module \
zll600 marked this conversation as resolved.
Show resolved Hide resolved
grpc-client-nginx-module-${grpc_client_nginx_module_ver}
fi

Expand Down Expand Up @@ -114,7 +114,6 @@ no_pool_patch=${no_pool_patch:-}
# TODO: remove old NGX_HTTP_GRPC_CLI_ENGINE_PATH once we have released a new
# version of grpc-client-nginx-module
grpc_engine_path="-DNGX_GRPC_CLI_ENGINE_PATH=$OR_PREFIX/libgrpc_engine.so -DNGX_HTTP_GRPC_CLI_ENGINE_PATH=$OR_PREFIX/libgrpc_engine.so"

cd openresty-${OPENRESTY_VERSION} || exit 1

if [[ "$OPENRESTY_VERSION" == 1.21.4.1 ]] || [[ "$OPENRESTY_VERSION" == 1.19.* ]]; then
Expand All @@ -127,6 +126,12 @@ mv luajit2-* bundle/LuaJIT-2.1-20220411
fi

or_limit_ver=0.08
enable_http3=${enable_http3:-}
if [ "$OPENRESTY_VERSION" == "1.25.3.1" ]; then
or_limit_ver=0.09
enable_http3="--with-http_v3_module"
fi

if [ ! -d "bundle/lua-resty-limit-traffic-$or_limit_ver" ]; then
echo "ERROR: the official repository of lua-resty-limit-traffic has been updated, please sync to API7's repository." >&2
exit 1
Expand Down Expand Up @@ -160,6 +165,7 @@ fi
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-http_v2_module \
$enable_http3 \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
Expand Down
25 changes: 16 additions & 9 deletions build-apisix-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ld_opt=${ld_opt:-"-L$zlib_prefix/lib -L$pcre_prefix/lib -L$OPENSSL_PREFIX/lib -W

# dependencies for building openresty
OPENSSL_VERSION=${OPENSSL_VERSION:-"3.2.0"}
OPENRESTY_VERSION="1.21.4.2"
OPENRESTY_VERSION="1.25.3.1"
ngx_multi_upstream_module_ver="1.1.1"
mod_dubbo_ver="1.0.2"
apisix_nginx_module_ver="1.15.0"
Expand Down Expand Up @@ -91,8 +91,8 @@ fi
if [ "$repo" == ngx_multi_upstream_module ]; then
cp -r "$prev_workdir" ./ngx_multi_upstream_module-${ngx_multi_upstream_module_ver}
else
git clone --depth=1 -b $ngx_multi_upstream_module_ver \
https://github.com/api7/ngx_multi_upstream_module.git \
git clone --depth=1 -b upgrade_openresty-1.25.3 \
https://github.com/zll600/ngx_multi_upstream_module.git \
zll600 marked this conversation as resolved.
Show resolved Hide resolved
ngx_multi_upstream_module-${ngx_multi_upstream_module_ver}
fi

Expand All @@ -107,16 +107,16 @@ fi
if [ "$repo" == apisix-nginx-module ]; then
cp -r "$prev_workdir" ./apisix-nginx-module-${apisix_nginx_module_ver}
else
git clone --depth=1 -b $apisix_nginx_module_ver \
https://github.com/api7/apisix-nginx-module.git \
git clone --depth=1 -b upgrade_openresty_1.25.3.1 \
https://github.com/zll600/apisix-nginx-module.git \
zll600 marked this conversation as resolved.
Show resolved Hide resolved
apisix-nginx-module-${apisix_nginx_module_ver}
fi

if [ "$repo" == wasm-nginx-module ]; then
cp -r "$prev_workdir" ./wasm-nginx-module-${wasm_nginx_module_ver}
else
git clone --depth=1 -b $wasm_nginx_module_ver \
https://github.com/api7/wasm-nginx-module.git \
git clone --depth=1 -b fix_header_files \
https://github.com/zll600/wasm-nginx-module.git \
zll600 marked this conversation as resolved.
Show resolved Hide resolved
wasm-nginx-module-${wasm_nginx_module_ver}
fi

Expand All @@ -131,8 +131,8 @@ fi
if [ "$repo" == grpc-client-nginx-module ]; then
cp -r "$prev_workdir" ./grpc-client-nginx-module-${grpc_client_nginx_module_ver}
else
git clone --depth=1 -b $grpc_client_nginx_module_ver \
https://github.com/api7/grpc-client-nginx-module \
git clone --depth=1 -b fix_header_files \
https://github.com/zll600/grpc-client-nginx-module \
zll600 marked this conversation as resolved.
Show resolved Hide resolved
grpc-client-nginx-module-${grpc_client_nginx_module_ver}
fi

Expand All @@ -158,6 +158,12 @@ grpc_engine_path="-DNGX_GRPC_CLI_ENGINE_PATH=$OR_PREFIX/libgrpc_engine.so -DNGX_
cd openresty-${OPENRESTY_VERSION} || exit 1

or_limit_ver=0.08
enable_http3=${enable_http3:-}
zll600 marked this conversation as resolved.
Show resolved Hide resolved
if [ "$OPENRESTY_VERSION" == "1.25.3.1" ]; then
or_limit_ver=0.09
enable_http3="--with-http_v3_module"
fi

if [ ! -d "bundle/lua-resty-limit-traffic-$or_limit_ver" ]; then
echo "ERROR: the official repository of lua-resty-limit-traffic has been updated, please sync to API7's repository." >&2
exit 1
Expand Down Expand Up @@ -192,6 +198,7 @@ fi
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-http_v2_module \
$enable_http3 \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
Expand Down
Loading