Skip to content

Commit 391a304

Browse files
authored
Bump grpc and reintroduce OTEL compilation (#11021)
* Bump grpc and reintroduce OTEL compilation * Enable s390x again
1 parent e78af97 commit 391a304

File tree

5 files changed

+38
-6
lines changed

5 files changed

+38
-6
lines changed

.github/workflows/images.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ jobs:
216216
if: |
217217
(github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changes.outputs.nginx125 == 'true')
218218
env:
219-
PLATFORMS: linux/amd64,linux/arm,linux/arm64
219+
PLATFORMS: linux/amd64,linux/arm,linux/arm64,linux/s390x
220220
steps:
221221
- name: Checkout
222222
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

images/nginx-1.25/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ IMAGE = $(REGISTRY)/nginx-1.25
3232
export DOCKER_CLI_EXPERIMENTAL=enabled
3333

3434
# build with buildx
35-
PLATFORMS?=linux/amd64,linux/arm,linux/arm64
35+
PLATFORMS?=linux/amd64,linux/arm,linux/arm64,linux/s390x
3636
OUTPUT=
3737
PROGRESS=plain
3838
build: ensure-buildx

images/nginx-1.25/TAG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.0.3
1+
v0.0.4

images/nginx-1.25/rootfs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ ENV LUA_PATH="/usr/local/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1
2929
ENV LUA_CPATH="/usr/local/lib/lua/?/?.so;/usr/local/lib/lua/?.so;;"
3030

3131
COPY --from=builder /usr/local /usr/local
32+
COPY --from=builder /usr/lib/libopentelemetry* /usr/local/lib
3233
COPY --from=builder /opt /opt
3334
COPY --from=builder /etc/nginx /etc/nginx
3435

@@ -50,7 +51,6 @@ RUN apk update \
5051
tzdata \
5152
grpc-cpp \
5253
libprotobuf \
53-
&& apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing opentelemetry-cpp-exporter-otlp-common opentelemetry-cpp-exporter-otlp-grpc \
5454
&& ln -s /usr/local/nginx/sbin/nginx /sbin/nginx \
5555
&& adduser -S -D -H -u 101 -h /usr/local/nginx \
5656
-s /sbin/nologin -G www-data -g www-data www-data \

images/nginx-1.25/rootfs/build.sh

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ export LUA_RESTY_GLOBAL_THROTTLE_VERSION=v0.2.0
104104
# Check for recent changes: https://github.com/microsoft/mimalloc/compare/v1.7.6...master
105105
export MIMALOC_VERSION=v2.1.2
106106

107+
# Check on https://github.com/open-telemetry/opentelemetry-cpp
108+
export OPENTELEMETRY_CPP_VERSION="v1.11.0"
109+
# Check on https://github.com/open-telemetry/opentelemetry-proto
110+
export OPENTELEMETRY_PROTO_VERSION="v1.1.0"
111+
107112
export BUILD_PATH=/tmp/build
108113

109114
ARCH=$(uname -m)
@@ -119,6 +124,7 @@ get_src()
119124
echo "Downloading $url"
120125

121126
curl -sSL "$url" -o "$f"
127+
# TODO: Reenable checksum verification but make it smarter
122128
# echo "$hash $f" | sha256sum -c - || exit 10
123129
if [ ! -z "$dest" ]; then
124130
mkdir ${BUILD_PATH}/${dest}
@@ -177,7 +183,7 @@ apk add \
177183
grpc-dev \
178184
protobuf-dev
179185

180-
apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing opentelemetry-cpp-dev
186+
# apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing opentelemetry-cpp-dev
181187

182188
# There is some bug with some platforms and git, so force HTTP/1.1
183189
git config --global http.version HTTP/1.1
@@ -195,6 +201,12 @@ get_src 66dc7081488811e9f925719e34d1b4504c2801c81dee2920e5452a86b11405ae \
195201
get_src aa961eafb8317e0eb8da37eb6e2c9ff42267edd18b56947384e719b85188f58b \
196202
"https://github.com/vision5/ngx_devel_kit/archive/$NDK_VERSION.tar.gz" "ngx_devel_kit"
197203

204+
get_src abc123 \
205+
"https://github.com/open-telemetry/opentelemetry-cpp/archive/$OPENTELEMETRY_CPP_VERSION.tar.gz" "opentelemetry-cpp"
206+
207+
get_src abc123 \
208+
"https://github.com/open-telemetry/opentelemetry-proto/archive/$OPENTELEMETRY_PROTO_VERSION.tar.gz" "opentelemetry-proto"
209+
198210
get_src cd5e2cc834bcfa30149e7511f2b5a2183baf0b70dc091af717a89a64e44a2985 \
199211
"https://github.com/openresty/set-misc-nginx-module/archive/$SETMISC_VERSION.tar.gz" "set-misc-nginx-module"
200212

@@ -288,7 +300,27 @@ make install
288300
ln -s /usr/local/bin/luajit /usr/local/bin/lua
289301
ln -s "$LUAJIT_INC" /usr/local/include/lua
290302

291-
cd "$BUILD_PATH"
303+
cd "$BUILD_PATH/opentelemetry-cpp"
304+
export CXXFLAGS="-DBENCHMARK_HAS_NO_INLINE_ASSEMBLY"
305+
cmake -B build -G Ninja -Wno-dev \
306+
-DOTELCPP_PROTO_PATH="${BUILD_PATH}/opentelemetry-proto/" \
307+
-DCMAKE_INSTALL_PREFIX=/usr \
308+
-DBUILD_SHARED_LIBS=ON \
309+
-DBUILD_TESTING="OFF" \
310+
-DBUILD_W3CTRACECONTEXT_TEST="OFF" \
311+
-DCMAKE_BUILD_TYPE=None \
312+
-DWITH_ABSEIL=ON \
313+
-DWITH_STL=ON \
314+
-DWITH_EXAMPLES=OFF \
315+
-DWITH_ZPAGES=OFF \
316+
-DWITH_OTLP_GRPC=ON \
317+
-DWITH_OTLP_HTTP=ON \
318+
-DWITH_ZIPKIN=ON \
319+
-DWITH_PROMETHEUS=OFF \
320+
-DWITH_ASYNC_EXPORT_PREVIEW=OFF \
321+
-DWITH_METRICS_EXEMPLAR_PREVIEW=OFF
322+
cmake --build build
323+
cmake --install build
292324

293325
# Git tuning
294326
git config --global --add core.compression -1

0 commit comments

Comments
 (0)