Skip to content

Commit d32debd

Browse files
authored
Remove o11y (#249)
* refactor(all-in-one): optimize image size by ~1.1G - Replace envoy binary with optimized version from GitHub releases (734M -> 163M, saves 571M) - Remove observability components by default: - prometheus (110M) - promtail (89M) - loki (64M) - grafana (305M) - Add ENVOY_VERSION arg for flexible version control Total image size reduced from ~2.4G to ~1.3G Change-Id: I87cfa6299c9b9d9f5a7fd548cb6a997084093a73 Co-developed-by: Claude <noreply@anthropic.com> * refactor(all-in-one): remove observability services from supervisord Remove prometheus, promtail, loki, and grafana service configurations since these components are no longer included in the image. Change-Id: I7318cd025491da54d76b92a04373124d2017b7df Co-developed-by: Claude <noreply@anthropic.com> * refactor(all-in-one): set O11Y default to off in get-ai-gateway.sh Change O11Y default value from 'on' to 'off' since observability components are no longer included in the image by default. Change-Id: I69203aaec31f37258701dedf689603759b728c2a Co-developed-by: Claude <noreply@anthropic.com> * refactor(all-in-one): remove unused observability startup scripts Remove start-promtail.sh, start-grafana.sh, start-prometheus.sh, and start-loki.sh since these components are no longer included. Change-Id: Ic09a1dd54247acd939f89472eda19be3a154f510 Co-developed-by: Claude <noreply@anthropic.com>
1 parent b320509 commit d32debd

7 files changed

Lines changed: 15 additions & 162 deletions

File tree

all-in-one/Dockerfile

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,13 @@ ARG BASE_VERSION=2022-10-27T19-02-22
33
ARG CORE_VERSION=2.1.11
44
ARG CONSOLE_VERSION=2.1.11
55
ARG APISERVER_VERSION=0.0.29
6-
ARG PROMETHEUS_VERSION=v2.40.7
7-
ARG PROMTAIL_VERSION=2.9.4
8-
ARG LOKI_VERSION=2.9.4
9-
ARG GRAFANA_VERSION=9.3.6
6+
ARG ENVOY_VERSION=2.1.11
107

118
FROM ${HUB}/api-server:${APISERVER_VERSION} AS apiserver
129
FROM ${HUB}/higress:${CORE_VERSION} AS controller
1310
FROM ${HUB}/pilot:${CORE_VERSION} AS pilot
1411
FROM ${HUB}/gateway:${CORE_VERSION} AS gateway
1512
FROM ${HUB}/console:${CONSOLE_VERSION} AS console
16-
FROM ${HUB}/prometheus:${PROMETHEUS_VERSION} AS prometheus
17-
FROM ${HUB}/promtail:${PROMTAIL_VERSION} AS promtail
18-
FROM ${HUB}/loki:${LOKI_VERSION} AS loki
19-
FROM ${HUB}/grafana:${GRAFANA_VERSION} AS grafana
2013
FROM ${HUB}/eclipse-temurin:21-jre AS jdk
2114

2215
FROM ${HUB}/base:${BASE_VERSION}
@@ -35,7 +28,6 @@ COPY --from=pilot /usr/local/bin/higress-pilot-start.sh /usr/local/bin/higress-p
3528
COPY --from=gateway /var/lib/istio/envoy/*.json /var/lib/istio/envoy/
3629
COPY --from=gateway /var/lib/istio/envoy/*.so /var/lib/istio/envoy/
3730
COPY --from=gateway /usr/local/bin/pilot-agent /usr/local/bin/pilot-agent
38-
COPY --from=gateway /usr/local/bin/envoy /usr/local/bin/envoy
3931
COPY --from=gateway /usr/local/bin/higress-proxy-*.sh /usr/local/bin/
4032
RUN chmod a+x /usr/local/bin/higress-proxy-container-init.sh; \
4133
sed -i 's/1337/0/g' /usr/local/bin/higress-proxy-container-init.sh; \
@@ -50,27 +42,26 @@ ENV JAVA_HOME=/opt/java/openjdk
5042
COPY --from=jdk $JAVA_HOME $JAVA_HOME
5143
ENV PATH="${JAVA_HOME}/bin:${PATH}"
5244

53-
# Install Prometheus
54-
COPY --from=prometheus /bin/prometheus /usr/local/bin/prometheus
55-
56-
# Install Promtail
57-
COPY --from=promtail /usr/bin/promtail /usr/local/bin/promtail
58-
59-
# Install Loki
60-
COPY --from=loki /usr/bin/loki /usr/local/bin/loki
61-
62-
# Install Grafana
63-
COPY --from=grafana /usr/share/grafana /usr/share/grafana
64-
COPY --from=grafana /run.sh /usr/local/bin/grafana.sh
65-
6645
# Install supervisord, logrotate, cron and initialize related folders
67-
RUN arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
46+
# Also download optimized envoy binary
47+
ARG ENVOY_VERSION
48+
RUN arch="$(dpkg --print-architecture)"; \
49+
case "$arch" in \
50+
amd64) envoy_arch="amd64" ;; \
51+
arm64) envoy_arch="arm64" ;; \
52+
*) echo "Unsupported architecture: $arch" && exit 1 ;; \
53+
esac; \
6854
apt-get update --allow-unauthenticated; \
6955
apt-get install --no-install-recommends -y --allow-unauthenticated \
7056
wget supervisor logrotate cron; \
7157
apt-get upgrade -y --allow-unauthenticated; \
7258
apt-get clean; \
7359
rm -rf /var/log/*log /var/lib/apt/lists/* /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old; \
60+
wget -q "https://github.com/higress-group/proxy/releases/download/v${ENVOY_VERSION}/envoy-${envoy_arch}.tar.gz" -O /tmp/envoy.tar.gz && \
61+
tar -xzf /tmp/envoy.tar.gz -C / && \
62+
rm /tmp/envoy.tar.gz && \
63+
chmod +x /usr/local/bin/envoy; \
64+
arch="${arch##*-}"; \
7465
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_$arch -O /usr/local/bin/yq && chmod +x /usr/local/bin/yq; \
7566
mkdir -p /var/log/higress; \
7667
mkdir /data;
@@ -83,10 +74,6 @@ COPY ./gateway/podinfo /etc/istio/pod
8374
COPY ./scripts /usr/local/bin
8475
COPY ./apiserver/config /app/kubeconfig
8576
COPY ./config /opt/data/defaultConfig
86-
COPY ./prometheus /etc/prometheus
87-
COPY ./promtail /etc/promtail
88-
COPY ./loki /etc/loki
89-
COPY ./grafana /etc/grafana
9077

9178
EXPOSE 8080 8443 8001
9279

all-in-one/get-ai-gateway.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ AUTO_ROUTING_DEFAULT_MODEL=${AUTO_ROUTING_DEFAULT_MODEL}"
15821582

15831583
cat <<EOF >$DATA_FOLDER/$CONFIG_FILENAME
15841584
MODE=full
1585-
O11Y=on
1585+
O11Y=off
15861586
CONFIG_TEMPLATE=ai-gateway
15871587
GATEWAY_HTTP_PORT=${GATEWAY_HTTP_PORT}
15881588
GATEWAY_HTTPS_PORT=${GATEWAY_HTTPS_PORT}

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

Lines changed: 0 additions & 26 deletions
This file was deleted.

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

Lines changed: 0 additions & 21 deletions
This file was deleted.

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

Lines changed: 0 additions & 22 deletions
This file was deleted.

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

Lines changed: 0 additions & 18 deletions
This file was deleted.

all-in-one/supervisord/supervisord.conf

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -66,50 +66,3 @@ stdout_logfile_maxbytes=10MB
6666
redirect_stderr=true
6767
environment=
6868

69-
[program:prometheus]
70-
directory=/
71-
command=bash /usr/local/bin/start-prometheus.sh
72-
priority=2000
73-
autostart=true
74-
autorestart=unexpected
75-
startsecs=1
76-
stdout_logfile=/var/log/higress/prometheus.log
77-
stdout_logfile_maxbytes=10MB
78-
redirect_stderr=true
79-
environment=
80-
81-
[program:promtail]
82-
directory=/
83-
command=bash /usr/local/bin/start-promtail.sh
84-
priority=2100
85-
autostart=true
86-
autorestart=unexpected
87-
startsecs=1
88-
stdout_logfile=/var/log/higress/promtail.log
89-
stdout_logfile_maxbytes=10MB
90-
redirect_stderr=true
91-
environment=HOSTNAME="higress-gateway"
92-
93-
[program:loki]
94-
directory=/
95-
command=bash /usr/local/bin/start-loki.sh
96-
priority=2200
97-
autostart=true
98-
autorestart=unexpected
99-
startsecs=1
100-
stdout_logfile=/var/log/higress/loki.log
101-
stdout_logfile_maxbytes=10MB
102-
redirect_stderr=true
103-
environment=
104-
105-
[program:grafana]
106-
directory=/
107-
command=bash /usr/local/bin/start-grafana.sh
108-
priority=3000
109-
autostart=true
110-
autorestart=unexpected
111-
startsecs=1
112-
stdout_logfile=/var/log/higress/grafana.log
113-
stdout_logfile_maxbytes=10MB
114-
redirect_stderr=true
115-
environment=

0 commit comments

Comments
 (0)