Skip to content

Commit 846be7f

Browse files
authored
fix: Fix start-up errors related to plugin-server integration (#257)
1 parent 8e34c41 commit 846be7f

8 files changed

Lines changed: 20 additions & 78 deletions

File tree

all-in-one/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG HUB=higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
22
ARG BASE_VERSION=2022-10-27T19-02-22
3-
ARG CORE_VERSION=2.2.1
3+
ARG CORE_VERSION=2.2.0
44
ARG CONSOLE_VERSION=2.2.1
55
ARG APISERVER_VERSION=0.0.29
66
ARG ENVOY_VERSION=2.2.1
@@ -81,6 +81,6 @@ COPY ./apiserver/config /app/kubeconfig
8181
COPY ./config /opt/data/defaultConfig
8282
COPY ./plugin-server/nginx.conf /etc/nginx/plugin-server/nginx.conf
8383

84-
EXPOSE 8080 8443 8001 8002
84+
EXPOSE 8080 8443 8001
8585

8686
ENTRYPOINT ["supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

all-in-one/scripts/config-template/ai-gateway.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ spec:
381381
failStrategy: FAIL_OPEN
382382
phase: UNSPECIFIED_PHASE
383383
priority: 100
384-
url: oci://${PLUGIN_REGISTRY:-higress-registry.cn-hangzhou.cr.aliyuncs.com}/plugins/ai-proxy:2.0.0" >"$WASM_PLUGIN_CONFIG_FOLDER/ai-proxy.internal.yaml"
384+
url: http://localhost:8002/plugins/ai-proxy/1.0.0/plugin.wasm" >"$WASM_PLUGIN_CONFIG_FOLDER/ai-proxy.internal.yaml"
385385

386386
echo -e "\
387387
apiVersion: extensions.higress.io/v1alpha1
@@ -405,7 +405,7 @@ spec:
405405
failStrategy: FAIL_OPEN
406406
phase: UNSPECIFIED_PHASE
407407
priority: 900
408-
url: oci://${PLUGIN_REGISTRY:-higress-registry.cn-hangzhou.cr.aliyuncs.com}/plugins/ai-statistics:2.0.0" >"$WASM_PLUGIN_CONFIG_FOLDER/ai-statistics-1.0.0.yaml"
408+
url: http://localhost:8002/plugins/ai-statistics/1.0.0/plugin.wasm" >"$WASM_PLUGIN_CONFIG_FOLDER/ai-statistics-1.0.0.yaml"
409409

410410
echo -e "\
411411
apiVersion: extensions.higress.io/v1alpha1
@@ -429,7 +429,7 @@ spec:
429429
failStrategy: FAIL_OPEN
430430
phase: AUTHN
431431
priority: 900
432-
url: oci://${PLUGIN_REGISTRY:-higress-registry.cn-hangzhou.cr.aliyuncs.com}/plugins/model-router:2.0.0" >"$WASM_PLUGIN_CONFIG_FOLDER/model-router.internal.yaml"
432+
url: http://localhost:8002/plugins/model-router/1.0.0/plugin.wasm" >"$WASM_PLUGIN_CONFIG_FOLDER/model-router.internal.yaml"
433433
}
434434

435435
function appendAiProxyConfigs() {

all-in-one/scripts/config-template/ai-proxy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ spec:
125125
failStrategy: FAIL_OPEN
126126
phase: UNSPECIFIED_PHASE
127127
priority: \"100\"
128-
url: oci://${PLUGIN_REGISTRY:-higress-registry.cn-hangzhou.cr.aliyuncs.com}/plugins/ai-proxy:2.0.0" > "$WASM_PLUGIN_CONFIG_FILE"
128+
url: http://localhost:8002/plugins/ai-proxy/1.0.0/plugin.wasm" > "$WASM_PLUGIN_CONFIG_FILE"
129129
}
130130

131131
function initializeMcpBridge() {

all-in-one/scripts/start-gateway.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ fi
3131
--domain=higress-system.svc.cluster.local \
3232
--proxyLogLevel=${GATEWAY_LOG_LEVEL:-warning} \
3333
--proxyComponentLogLevel=${GATEWAY_COMPONENT_LOG_LEVEL:-misc:error} \
34-
--log_output_level=all:info \
3534
--serviceCluster=higress-gateway

bin/configure.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,8 @@ writeConfiguration() {
655655

656656
# Generate wasm plugin URL variables
657657
if [ "$USE_PLUGIN_SERVER" == "Y" ]; then
658-
WASM_PLUGIN_URL_PATTERN="http://plugin-server:8002/plugins/\${name}/\${version}/plugin.wasm"
659-
MCP_SERVER_WASM_URL="http://plugin-server:8002/plugins/mcp-server/1.0.0/plugin.wasm"
658+
WASM_PLUGIN_URL_PATTERN="http://plugin-server:8080/plugins/\${name}/\${version}/plugin.wasm"
659+
MCP_SERVER_WASM_URL="http://plugin-server:8080/plugins/mcp-server/1.0.0/plugin.wasm"
660660
else
661661
WASM_PLUGIN_URL_PATTERN=''
662662
MCP_SERVER_WASM_URL=''

compose/.env

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ NACOS_DATA_ENC_KEY=''
99
NACOS_SERVER_TAG='v3.0.1'
1010
HIGRESS_RUNNER_TAG='0.0.3'
1111
HIGRESS_API_SERVER_TAG='0.0.29'
12-
HIGRESS_CONTROLLER_TAG='2.2.1'
13-
HIGRESS_PILOT_TAG='2.2.1'
14-
HIGRESS_GATEWAY_TAG='2.2.1'
12+
HIGRESS_CONTROLLER_TAG='2.2.0'
13+
HIGRESS_PILOT_TAG='2.2.0'
14+
HIGRESS_GATEWAY_TAG='2.2.0'
1515
HIGRESS_CONSOLE_TAG='2.2.1'
1616
HIGRESS_PLUGIN_SERVER_TAG='2.2.1'
17-
WASM_PLUGIN_URL_PATTERN='http://plugin-server:8002/plugins/${name}/${version}/plugin.wasm'
18-
MCP_SERVER_WASM_URL='http://plugin-server:8002/plugins/mcp-server/1.0.0/plugin.wasm'
17+
WASM_PLUGIN_URL_PATTERN='http://plugin-server:8080/plugins/${name}/${version}/plugin.wasm'
18+
MCP_SERVER_WASM_URL='http://plugin-server:8080/plugins/mcp-server/1.0.0/plugin.wasm'
1919
PROMETHEUS_TAG='v2.40.7'
2020
PROMTAIL_TAG='2.9.4'
2121
LOKI_TAG='2.9.4'
2222
GRAFANA_TAG='9.3.6'
23+
NACOS_CONSOLE_PORT='8888'
2324
NACOS_HTTP_PORT='8848'
2425
NACOS_GRPC_PORT='9848'
2526
GATEWAY_HTTP_PORT='80'

compose/docker-compose.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ services:
135135
depends_on:
136136
prepare:
137137
condition: service_completed_successfully
138-
plugin-server:
139-
condition: service_healthy
140-
required: false
141138
networks:
142139
higress-net:
143140
aliases:
@@ -204,6 +201,8 @@ services:
204201
depends_on:
205202
pilot:
206203
condition: service_healthy
204+
plugin-server:
205+
condition: service_healthy
207206
networks:
208207
higress-net:
209208
aliases:
@@ -237,18 +236,19 @@ services:
237236
hostname: higress-plugin-server
238237
image: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/plugin-server:${HIGRESS_PLUGIN_SERVER_TAG}
239238
profiles: [ "plugin-server" ]
239+
depends_on:
240+
prepare:
241+
condition: service_completed_successfully
240242
networks:
241243
higress-net:
242244
aliases:
243245
- plugin-server.svc
244246
restart: always
245247
healthcheck:
246-
test: [ "CMD-SHELL", "curl -sf http://127.0.0.1:8002/healthz || exit 1" ]
248+
test: [ "CMD-SHELL", "curl -sf http://127.0.0.1:8080/ || exit 1" ]
247249
interval: 1s
248250
timeout: 3s
249251
retries: 60
250-
volumes:
251-
- ./volumes/plugin-server/nginx.conf:/etc/nginx/nginx.conf:ro
252252

253253
console:
254254
hostname: higress-console

compose/scripts/prepare.sh

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -727,67 +727,9 @@ checkO11y() {
727727
checkGrafana
728728
}
729729

730-
checkPluginServer() {
731-
echo "Checking plugin-server configurations..."
732-
733-
mkdir -p $VOLUMES_ROOT/plugin-server
734-
735-
if [ ! -f $VOLUMES_ROOT/plugin-server/nginx.conf ]; then
736-
cat <<'EOF' >$VOLUMES_ROOT/plugin-server/nginx.conf
737-
daemon off;
738-
user www-data;
739-
worker_processes auto;
740-
pid /run/nginx.pid;
741-
error_log /var/log/nginx/error.log notice;
742-
743-
events {
744-
worker_connections 1024;
745-
}
746-
747-
http {
748-
include /etc/nginx/mime.types;
749-
default_type application/octet-stream;
750-
751-
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
752-
'$status $body_bytes_sent "$http_referer" '
753-
'"$http_user_agent"';
754-
755-
access_log /var/log/nginx/access.log main;
756-
757-
sendfile on;
758-
keepalive_timeout 65;
759-
760-
server {
761-
listen 8002;
762-
server_name localhost;
763-
764-
# Static files root directory
765-
root /usr/share/nginx/html;
766-
767-
# Hide Nginx version
768-
server_tokens off;
769-
770-
# Health check endpoint
771-
location = /healthz {
772-
return 200 'ok';
773-
add_header Content-Type text/plain;
774-
}
775-
776-
# Error pages
777-
error_page 500 502 503 504 /50x.html;
778-
location = /50x.html {
779-
root /usr/share/nginx/html;
780-
}
781-
}
782-
}
783-
EOF
784-
fi
785-
}
786-
787730
checkStorage
788731
checkPilot
789732
checkGateway
790733
checkConsole
791734
checkGatewayApi
792735
checkO11y
793-
checkPluginServer

0 commit comments

Comments
 (0)