chore: telemetry updates for the deployments

Keycloak example will be updated to 26.2.5, which contains support for
telemetry. The committed setup changes are required for the Keycloak
update.

Due to the Keycloak update to 26.2.5, jaeger will also need to be
updated. It isn't part of the deployment, but the expected docker image
is jaegertracing/jaeger:2.7.0 (which is supported by Keycloak 26.2.5).

The jaeger update also brings changes in oCIS. Previous 6831 port in
jaeger isn't available in recent versions (particularly 2.7.0), and has
changed to port 4317, which supports the "otlp" tracing type in oCIS. No
code change is needed.
This commit is contained in:
Juan Pablo Villafáñez
2025-07-03 14:07:26 +02:00
parent a5ebdf0a78
commit f49e5c5c64
9 changed files with 30 additions and 28 deletions

View File

@@ -6,8 +6,8 @@ services:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_TYPE: "jaeger"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
OCIS_TRACING_TYPE: "otlp"
OCIS_TRACING_ENDPOINT: jaeger:4317
# metrics
# if oCIS runs as a single process, all <debug>/metrics endpoints
# will expose the same metrics, so it's sufficient to query one endpoint
@@ -15,4 +15,3 @@ services:
networks:
ocis-net:
external: true

View File

@@ -5,8 +5,8 @@ services:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_TYPE: "jaeger"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
OCIS_TRACING_TYPE: "otlp"
OCIS_TRACING_ENDPOINT: jaeger:4317
# metrics
# if oCIS runs as a single process, all <debug>/metrics endpoints
# will expose the same metrics, so it's sufficient to query one endpoint
@@ -16,11 +16,10 @@ services:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_TYPE: "jaeger"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
OCIS_TRACING_TYPE: "otlp"
OCIS_TRACING_ENDPOINT: jaeger:4317
# metrics
COLLABORATION_DEBUG_ADDR: 0.0.0.0:9304
networks:
ocis-net:
external: true

View File

@@ -5,8 +5,8 @@ services:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_TYPE: "jaeger"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
OCIS_TRACING_TYPE: "otlp"
OCIS_TRACING_ENDPOINT: jaeger:4317
# metrics
# if oCIS runs as a single process, all <debug>/metrics endpoints
# will expose the same metrics, so it's sufficient to query one endpoint
@@ -16,11 +16,10 @@ services:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_TYPE: "jaeger"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
OCIS_TRACING_TYPE: "otlp"
OCIS_TRACING_ENDPOINT: jaeger:4317
# metrics
COLLABORATION_DEBUG_ADDR: 0.0.0.0:9304
networks:
ocis-net:
external: true

View File

@@ -6,8 +6,8 @@ services:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_TYPE: "jaeger"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
OCIS_TRACING_TYPE: "otlp"
OCIS_TRACING_ENDPOINT: jaeger:4317
# metrics
# if oCIS runs as a single process, all <debug>/metrics endpoints
# will expose the same metrics, so it's sufficient to query one endpoint
@@ -15,4 +15,3 @@ services:
networks:
ocis-net:
external: true

View File

@@ -33,6 +33,8 @@ KEYCLOAK_REALM=
KEYCLOAK_ADMIN_USER=
# Admin user login password. Defaults to "admin"
KEYCLOAK_ADMIN_PASSWORD=
# Enable tracing in Keycloak. Traces will be sent to "http://jaeger:4317" Defaults to "false"
KEYCLOAK_TRACING=
# If you want to use debugging and tracing with this stack,

View File

@@ -2,7 +2,7 @@
printenv
# replace oCIS domain in keycloak realm import
mkdir /opt/keycloak/data/import
sed -e "s/ocis.owncloud.test/${OCIS_DOMAIN}/g" /opt/keycloak/data/import-dist/ocis-realm.json > /opt/keycloak/data/import/ocis-realm.json
sed -e "s/ocis.owncloud.test/${OCIS_DOMAIN}/g" /opt/keycloak/data/import-dist/ocis-realm.json > /opt/keycloak/data/import/oCIS-realm.json
# run original docker-entrypoint
/opt/keycloak/bin/kc.sh "$@"

View File

@@ -112,10 +112,10 @@ services:
restart: always
keycloak:
image: quay.io/keycloak/keycloak:25.0.0
image: quay.io/keycloak/keycloak:26.2.5
networks:
ocis-net:
command: ["start", "--proxy=edge", "--spi-connections-http-client-default-disable-trust-manager=${INSECURE:-false}", "--import-realm"]
command: ["start", "--spi-connections-http-client-default-disable-trust-manager=${INSECURE:-false}", "--import-realm"]
entrypoint: ["/bin/sh", "/opt/keycloak/bin/docker-entrypoint-override.sh"]
volumes:
- "./config/keycloak/docker-entrypoint-override.sh:/opt/keycloak/bin/docker-entrypoint-override.sh"
@@ -127,9 +127,15 @@ services:
KC_DB_URL: "jdbc:postgresql://postgres:5432/keycloak"
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: keycloak
KC_FEATURES: impersonation
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN_USER:-admin}
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-admin}
KC_FEATURES: impersonation,opentelemetry
KC_BOOTSTRAP_ADMIN_USERNAME: ${KEYCLOAK_ADMIN_USER:-admin}
KC_BOOTSTRAP_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-admin}
# as replacement of --proxy=edge
KC_PROXY_HEADERS: xforwarded
KC_HTTP_ENABLED: true
# tracing
KC_TRACING_ENABLED: ${KEYCLOAK_TRACING:-false}
KC_TRACING_ENDPOINT: http://jaeger:4317
labels:
- "traefik.enable=true"
- "traefik.http.routers.keycloak.entrypoints=https"

View File

@@ -6,8 +6,8 @@ services:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_TYPE: "jaeger"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
OCIS_TRACING_TYPE: "otlp"
OCIS_TRACING_ENDPOINT: jaeger:4317
# metrics
# if oCIS runs as a single process, all <debug>/metrics endpoints
# will expose the same metrics, so it's sufficient to query one endpoint
@@ -15,4 +15,3 @@ services:
networks:
ocis-net:
external: true

View File

@@ -6,8 +6,8 @@ services:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_TYPE: "jaeger"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
OCIS_TRACING_TYPE: "otlp"
OCIS_TRACING_ENDPOINT: jaeger:4317
# metrics
# if oCIS runs as a single process, all <debug>/metrics endpoints
# will expose the same metrics, so it's sufficient to query one endpoint
@@ -15,4 +15,3 @@ services:
networks:
ocis-net:
external: true