Skip to content

Commit

Permalink
revert: remove grpc-client-nginx-module" (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
zll600 authored Feb 22, 2024
1 parent 0b0d528 commit 389e596
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
20 changes: 19 additions & 1 deletion build-apisix-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then
apisix_nginx_module_ver="main"
wasm_nginx_module_ver="main"
lua_var_nginx_module_ver="master"
grpc_client_nginx_module_ver="main"
lua_resty_events_ver="main"
debug_args="--with-debug"
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty-debug"}
Expand All @@ -24,6 +25,7 @@ else
apisix_nginx_module_ver="1.16.0"
wasm_nginx_module_ver="0.7.0"
lua_var_nginx_module_ver="v0.5.3"
grpc_client_nginx_module_ver="v0.5.0"
lua_resty_events_ver="0.2.0"
debug_args=${debug_args:-}
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty"}
Expand Down Expand Up @@ -77,6 +79,14 @@ else
lua-var-nginx-module-${lua_var_nginx_module_ver}
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 \
grpc-client-nginx-module-${grpc_client_nginx_module_ver}
fi

if [ "$repo" == lua-resty-events ]; then
cp -r "$prev_workdir" ./lua-resty-events-${lua_resty_events_ver}
else
Expand All @@ -101,6 +111,9 @@ cc_opt=${cc_opt:-}
ld_opt=${ld_opt:-}
luajit_xcflags=${luajit_xcflags:="-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT"}
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

Expand All @@ -126,7 +139,7 @@ else
fi

./configure --prefix="$OR_PREFIX" \
--with-cc-opt="-DAPISIX_BASE_VER=$version $cc_opt" \
--with-cc-opt="-DAPISIX_BASE_VER=$version $grpc_engine_path $cc_opt" \
--with-ld-opt="-Wl,-rpath,$OR_PREFIX/wasmtime-c-api/lib $ld_opt" \
$debug_args \
--add-module=../mod_dubbo-${mod_dubbo_ver} \
Expand All @@ -136,6 +149,7 @@ fi
--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=../grpc-client-nginx-module-${grpc_client_nginx_module_ver} \
--add-module=../lua-resty-events-${lua_resty_events_ver} \
--with-poll_module \
--with-pcre-jit \
Expand Down Expand Up @@ -180,6 +194,10 @@ cd wasm-nginx-module-${wasm_nginx_module_ver} || exit 1
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
cd ..

cd grpc-client-nginx-module-${grpc_client_nginx_module_ver} || exit 1
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
cd ..

cd lua-resty-events-${lua_resty_events_ver} || exit 1
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
cd ..
Expand Down
19 changes: 18 additions & 1 deletion build-apisix-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ mod_dubbo_ver="1.0.2"
apisix_nginx_module_ver="1.16.0"
wasm_nginx_module_ver="0.7.0"
lua_var_nginx_module_ver="v0.5.3"
grpc_client_nginx_module_ver="v0.5.0"
lua_resty_events_ver="0.2.0"


Expand Down Expand Up @@ -127,6 +128,14 @@ else
lua-var-nginx-module-${lua_var_nginx_module_ver}
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 \
grpc-client-nginx-module-${grpc_client_nginx_module_ver}
fi

cd ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} || exit 1
./patch.sh ../openresty-${OPENRESTY_VERSION}
cd ..
Expand All @@ -142,6 +151,9 @@ cd ..

luajit_xcflags=${luajit_xcflags:="-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT"}
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

Expand All @@ -159,7 +171,7 @@ fi


./configure --prefix="$OR_PREFIX" \
--with-cc-opt="-DAPISIX_RUNTIME_VER=$runtime_version $cc_opt" \
--with-cc-opt="-DAPISIX_RUNTIME_VER=$runtime_version $grpc_engine_path $cc_opt" \
--with-ld-opt="-Wl,-rpath,$OR_PREFIX/wasmtime-c-api/lib $ld_opt" \
$debug_args \
--add-module=../mod_dubbo-${mod_dubbo_ver} \
Expand All @@ -169,6 +181,7 @@ fi
--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=../grpc-client-nginx-module-${grpc_client_nginx_module_ver} \
--add-module=../lua-resty-events-${lua_resty_events_ver} \
--with-poll_module \
--with-pcre-jit \
Expand Down Expand Up @@ -220,6 +233,10 @@ cd wasm-nginx-module-${wasm_nginx_module_ver} || exit 1
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
cd ..

cd grpc-client-nginx-module-${grpc_client_nginx_module_ver} || exit 1
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
cd ..

# package etcdctl
ETCD_ARCH="amd64"
ETCD_VERSION=${ETCD_VERSION:-'3.5.4'}
Expand Down

0 comments on commit 389e596

Please sign in to comment.