Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
37 changes: 22 additions & 15 deletions build-apisix-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@ 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.4.1"}
OPENRESTY_VERSION="1.27.1.2"
ngx_multi_upstream_module_ver="1.3.2"
OPENRESTY_VERSION=${OPENRESTY_VERSION:-"1.29.2.4"}
Comment thread
jarvis9443 marked this conversation as resolved.
if [[ ! "$OPENRESTY_VERSION" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
echo "ERROR: invalid OPENRESTY_VERSION: $OPENRESTY_VERSION" >&2
exit 1
fi
ngx_multi_upstream_module_ver="1.3.3"
mod_dubbo_ver="1.0.2"
Comment thread
jarvis9443 marked this conversation as resolved.
apisix_nginx_module_ver="1.19.4"
apisix_nginx_module_ver=${apisix_nginx_module_ver:-"1.19.5"}
if [[ ! "$apisix_nginx_module_ver" =~ ^[A-Za-z0-9._/-]+$ ]]; then
echo "ERROR: invalid apisix_nginx_module_ver: $apisix_nginx_module_ver" >&2
exit 1
fi
wasm_nginx_module_ver="0.7.0"
lua_var_nginx_module_ver="v0.5.3"
lua_resty_events_ver="0.2.0"
Expand Down Expand Up @@ -52,7 +60,7 @@ install_openssl_3(){
--with-zlib-lib=$zlib_prefix/lib \
--with-zlib-include=$zlib_prefix/include
make -j $(nproc) LD_LIBRARY_PATH= CC="gcc"
sudo make install
sudo make install_sw install_ssldirs
if [ -f "$OPENSSL_CONF_PATH" ]; then
sudo cp "$OPENSSL_CONF_PATH" "$OPENSSL_PREFIX"/ssl/openssl.cnf
fi
Expand All @@ -63,7 +71,6 @@ install_openssl_3(){
cd ..
}


if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$runtime_version" == "0.0.0" ]; then
debug_args="--with-debug"
fi
Expand All @@ -76,8 +83,8 @@ cd "$workdir" || exit 1

install_openssl_3

wget --no-check-certificate https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz
tar -zxvpf openresty-${OPENRESTY_VERSION}.tar.gz > /dev/null
wget --no-check-certificate "https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz"
tar -zxvpf "openresty-${OPENRESTY_VERSION}.tar.gz" > /dev/null

if [ "$repo" == lua-resty-events ]; then
cp -r "$prev_workdir" ./lua-resty-events-${lua_resty_events_ver}
Expand All @@ -104,11 +111,11 @@ else
fi

if [ "$repo" == apisix-nginx-module ]; then
cp -r "$prev_workdir" ./apisix-nginx-module-${apisix_nginx_module_ver}
cp -r "$prev_workdir" "./apisix-nginx-module-${apisix_nginx_module_ver}"
else
git clone --depth=1 -b $apisix_nginx_module_ver \
git clone --depth=1 -b "$apisix_nginx_module_ver" -- \
https://github.com/api7/apisix-nginx-module.git \
apisix-nginx-module-${apisix_nginx_module_ver}
"apisix-nginx-module-${apisix_nginx_module_ver}"
fi

if [ "$repo" == wasm-nginx-module ]; then
Expand All @@ -131,7 +138,7 @@ cd ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} || exit 1
./patch.sh ../openresty-${OPENRESTY_VERSION}
cd ..

cd apisix-nginx-module-${apisix_nginx_module_ver}/patch || exit 1
cd "apisix-nginx-module-${apisix_nginx_module_ver}/patch" || exit 1
./patch.sh ../../openresty-${OPENRESTY_VERSION}
cd ../..

Expand Down Expand Up @@ -164,9 +171,9 @@ fi
$debug_args \
--add-module=../mod_dubbo-${mod_dubbo_ver} \
--add-module=../ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} \
--add-module=../apisix-nginx-module-${apisix_nginx_module_ver} \
--add-module=../apisix-nginx-module-${apisix_nginx_module_ver}/src/stream \
--add-module=../apisix-nginx-module-${apisix_nginx_module_ver}/src/meta \
--add-module="../apisix-nginx-module-${apisix_nginx_module_ver}" \
--add-module="../apisix-nginx-module-${apisix_nginx_module_ver}/src/stream" \
--add-module="../apisix-nginx-module-${apisix_nginx_module_ver}/src/meta" \
--add-module=../wasm-nginx-module-${wasm_nginx_module_ver} \
--add-module=../lua-var-nginx-module-${lua_var_nginx_module_ver} \
--add-module=../lua-resty-events-${lua_resty_events_ver} \
Expand Down Expand Up @@ -212,7 +219,7 @@ sudo install -d "$OR_PREFIX"/lualib/resty/events/compat/
sudo install -m 644 lualib/resty/events/compat/*.lua "$OR_PREFIX"/lualib/resty/events/compat/
cd ..

cd apisix-nginx-module-${apisix_nginx_module_ver} || exit 1
cd "apisix-nginx-module-${apisix_nginx_module_ver}" || exit 1
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
cd ..

Expand Down
4 changes: 2 additions & 2 deletions utils/install-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ install_apisix_dependencies_rpm() {
install_dependencies_rpm() {
# install basic dependencies
if [[ $IMAGE_BASE == "registry.access.redhat.com/ubi9/ubi" ]]; then
yum install -y --disablerepo=* --enablerepo=ubi-9-appstream-rpms --enablerepo=ubi-9-baseos-rpms wget tar gcc automake autoconf libtool make git which unzip sudo
yum install -y --disablerepo=* --enablerepo=ubi-9-appstream-rpms --enablerepo=ubi-9-baseos-rpms wget tar gcc gcc-c++ automake autoconf libtool make git which unzip sudo
yum install -y --disablerepo=* --enablerepo=ubi-9-appstream-rpms --enablerepo=ubi-9-baseos-rpms yum-utils
else
yum install -y wget tar gcc automake autoconf libtool make curl git which unzip sudo
yum install -y wget tar gcc gcc-c++ automake autoconf libtool make curl git which unzip sudo
yum install -y yum-utils
fi
}
Expand Down
Loading