Skip to content

Commit 389e596

Browse files
authored
revert: remove grpc-client-nginx-module" (#376)
1 parent 0b0d528 commit 389e596

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

build-apisix-base.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then
1515
apisix_nginx_module_ver="main"
1616
wasm_nginx_module_ver="main"
1717
lua_var_nginx_module_ver="master"
18+
grpc_client_nginx_module_ver="main"
1819
lua_resty_events_ver="main"
1920
debug_args="--with-debug"
2021
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty-debug"}
@@ -24,6 +25,7 @@ else
2425
apisix_nginx_module_ver="1.16.0"
2526
wasm_nginx_module_ver="0.7.0"
2627
lua_var_nginx_module_ver="v0.5.3"
28+
grpc_client_nginx_module_ver="v0.5.0"
2729
lua_resty_events_ver="0.2.0"
2830
debug_args=${debug_args:-}
2931
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty"}
@@ -77,6 +79,14 @@ else
7779
lua-var-nginx-module-${lua_var_nginx_module_ver}
7880
fi
7981

82+
if [ "$repo" == grpc-client-nginx-module ]; then
83+
cp -r "$prev_workdir" ./grpc-client-nginx-module-${grpc_client_nginx_module_ver}
84+
else
85+
git clone --depth=1 -b $grpc_client_nginx_module_ver \
86+
https://github.com/api7/grpc-client-nginx-module \
87+
grpc-client-nginx-module-${grpc_client_nginx_module_ver}
88+
fi
89+
8090
if [ "$repo" == lua-resty-events ]; then
8191
cp -r "$prev_workdir" ./lua-resty-events-${lua_resty_events_ver}
8292
else
@@ -101,6 +111,9 @@ cc_opt=${cc_opt:-}
101111
ld_opt=${ld_opt:-}
102112
luajit_xcflags=${luajit_xcflags:="-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT"}
103113
no_pool_patch=${no_pool_patch:-}
114+
# TODO: remove old NGX_HTTP_GRPC_CLI_ENGINE_PATH once we have released a new
115+
# version of grpc-client-nginx-module
116+
grpc_engine_path="-DNGX_GRPC_CLI_ENGINE_PATH=$OR_PREFIX/libgrpc_engine.so -DNGX_HTTP_GRPC_CLI_ENGINE_PATH=$OR_PREFIX/libgrpc_engine.so"
104117

105118
cd openresty-${OPENRESTY_VERSION} || exit 1
106119

@@ -126,7 +139,7 @@ else
126139
fi
127140

128141
./configure --prefix="$OR_PREFIX" \
129-
--with-cc-opt="-DAPISIX_BASE_VER=$version $cc_opt" \
142+
--with-cc-opt="-DAPISIX_BASE_VER=$version $grpc_engine_path $cc_opt" \
130143
--with-ld-opt="-Wl,-rpath,$OR_PREFIX/wasmtime-c-api/lib $ld_opt" \
131144
$debug_args \
132145
--add-module=../mod_dubbo-${mod_dubbo_ver} \
@@ -136,6 +149,7 @@ fi
136149
--add-module=../apisix-nginx-module-${apisix_nginx_module_ver}/src/meta \
137150
--add-module=../wasm-nginx-module-${wasm_nginx_module_ver} \
138151
--add-module=../lua-var-nginx-module-${lua_var_nginx_module_ver} \
152+
--add-module=../grpc-client-nginx-module-${grpc_client_nginx_module_ver} \
139153
--add-module=../lua-resty-events-${lua_resty_events_ver} \
140154
--with-poll_module \
141155
--with-pcre-jit \
@@ -180,6 +194,10 @@ cd wasm-nginx-module-${wasm_nginx_module_ver} || exit 1
180194
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
181195
cd ..
182196

197+
cd grpc-client-nginx-module-${grpc_client_nginx_module_ver} || exit 1
198+
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
199+
cd ..
200+
183201
cd lua-resty-events-${lua_resty_events_ver} || exit 1
184202
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
185203
cd ..

build-apisix-runtime.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ mod_dubbo_ver="1.0.2"
2727
apisix_nginx_module_ver="1.16.0"
2828
wasm_nginx_module_ver="0.7.0"
2929
lua_var_nginx_module_ver="v0.5.3"
30+
grpc_client_nginx_module_ver="v0.5.0"
3031
lua_resty_events_ver="0.2.0"
3132

3233

@@ -127,6 +128,14 @@ else
127128
lua-var-nginx-module-${lua_var_nginx_module_ver}
128129
fi
129130

131+
if [ "$repo" == grpc-client-nginx-module ]; then
132+
cp -r "$prev_workdir" ./grpc-client-nginx-module-${grpc_client_nginx_module_ver}
133+
else
134+
git clone --depth=1 -b $grpc_client_nginx_module_ver \
135+
https://github.com/api7/grpc-client-nginx-module \
136+
grpc-client-nginx-module-${grpc_client_nginx_module_ver}
137+
fi
138+
130139
cd ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} || exit 1
131140
./patch.sh ../openresty-${OPENRESTY_VERSION}
132141
cd ..
@@ -142,6 +151,9 @@ cd ..
142151

143152
luajit_xcflags=${luajit_xcflags:="-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT"}
144153
no_pool_patch=${no_pool_patch:-}
154+
# TODO: remove old NGX_HTTP_GRPC_CLI_ENGINE_PATH once we have released a new
155+
# version of grpc-client-nginx-module
156+
grpc_engine_path="-DNGX_GRPC_CLI_ENGINE_PATH=$OR_PREFIX/libgrpc_engine.so -DNGX_HTTP_GRPC_CLI_ENGINE_PATH=$OR_PREFIX/libgrpc_engine.so"
145157

146158
cd openresty-${OPENRESTY_VERSION} || exit 1
147159

@@ -159,7 +171,7 @@ fi
159171

160172

161173
./configure --prefix="$OR_PREFIX" \
162-
--with-cc-opt="-DAPISIX_RUNTIME_VER=$runtime_version $cc_opt" \
174+
--with-cc-opt="-DAPISIX_RUNTIME_VER=$runtime_version $grpc_engine_path $cc_opt" \
163175
--with-ld-opt="-Wl,-rpath,$OR_PREFIX/wasmtime-c-api/lib $ld_opt" \
164176
$debug_args \
165177
--add-module=../mod_dubbo-${mod_dubbo_ver} \
@@ -169,6 +181,7 @@ fi
169181
--add-module=../apisix-nginx-module-${apisix_nginx_module_ver}/src/meta \
170182
--add-module=../wasm-nginx-module-${wasm_nginx_module_ver} \
171183
--add-module=../lua-var-nginx-module-${lua_var_nginx_module_ver} \
184+
--add-module=../grpc-client-nginx-module-${grpc_client_nginx_module_ver} \
172185
--add-module=../lua-resty-events-${lua_resty_events_ver} \
173186
--with-poll_module \
174187
--with-pcre-jit \
@@ -220,6 +233,10 @@ cd wasm-nginx-module-${wasm_nginx_module_ver} || exit 1
220233
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
221234
cd ..
222235

236+
cd grpc-client-nginx-module-${grpc_client_nginx_module_ver} || exit 1
237+
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
238+
cd ..
239+
223240
# package etcdctl
224241
ETCD_ARCH="amd64"
225242
ETCD_VERSION=${ETCD_VERSION:-'3.5.4'}

0 commit comments

Comments
 (0)