commit old changes

Signed-off-by: Ava Hahn <a.hahn@f5.com>
This commit is contained in:
Ava Hahn 2025-08-25 16:56:35 -07:00
parent e7b504fa40
commit 3844ffd94b
3 changed files with 38 additions and 8 deletions

View file

@ -46,6 +46,7 @@ For Otel module build and tests:
### Fedora ### Fedora
- install zlib-ng-compat-devel and zlib-ng-compat-static for zlib, not zlibrary-devel or zlib-ng-devel. - install zlib-ng-compat-devel and zlib-ng-compat-static for zlib, not zlibrary-devel or zlib-ng-devel.
- fedora also seems to need the openssl-devel-engine package. - fedora also seems to need the openssl-devel-engine package.
- need perl-Test-Harness and perl-FindBin and perl-Sys-Hostname for the nginx tests
## Usage ## Usage
Invoke `test.sh` with some or all of the following flags: Invoke `test.sh` with some or all of the following flags:

View file

@ -52,7 +52,7 @@ function build_nginx() {
--with-stream_ssl_module \ --with-stream_ssl_module \
--with-stream_realip_module \ --with-stream_realip_module \
--with-stream_ssl_preread_module \ --with-stream_ssl_preread_module \
--with-debug && \ --with-debug
make -j$(num_jobs) make -j$(num_jobs)
} }
@ -67,12 +67,22 @@ function clean_nginx() {
} }
function build_otel() { function build_otel() {
mkdir -p build && \ BSDFLG=""
cd build && \ if [[ $(uname) == "FreeBSD" ]] || [[ "$(grep "Fedora" /etc/issue)" ]]; then
BSDFLG="-DNGX_OTEL_GRPC=package"
fi
if [[ -d build ]]; then
rm -rf build
fi
mkdir -p build
cd build
cmake -DCMAKE_CXX_COMPILER=$(which g++) \ cmake -DCMAKE_CXX_COMPILER=$(which g++) \
-DNGX_OTEL_NGINX_BUILD_DIR=../../nginx/objs \ -DNGX_OTEL_NGINX_BUILD_DIR=../../nginx/objs \
-DNGX_OTEL_GRPC=package \ $BSDFLG \
-DCMAKE_CXX_FLAGS="-D_LARGEFILE64_SOURCE" .. && \ -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="-D_LARGEFILE64_SOURCE" ..
make -j$(num_jobs) make -j$(num_jobs)
} }

19
utils.sh Normal file
View file

@ -0,0 +1,19 @@
#!/bin/bash
dirn=$(dirname "$0")
source $dirn/common.sh
function otel() {
docker run \
--name lgtm \
-p 3000:3000 \
-p 4317:4317 \
-p 4318:4318 \
--rm \
-ti \
-v "$PWD"/container/grafana:/data/grafana \
-v "$PWD"/container/prometheus:/data/prometheus \
-v "$PWD"/container/loki:/data/loki \
-e GF_PATHS_DATA=/data/grafana \
docker.io/grafana/otel-lgtm
}