diff --git a/.github/updatecli.d/update-docker-image.yaml b/.github/updatecli.d/update-docker-image.yaml index aa23ff8d..4f74d323 100644 --- a/.github/updatecli.d/update-docker-image.yaml +++ b/.github/updatecli.d/update-docker-image.yaml @@ -1,8 +1,7 @@ -name: Bump up image version +name: Update Docker Compose image versions sources: alloy-version: - name: Check Alloy image tag in DockerHub kind: dockerimage spec: image: docker.io/grafana/alloy @@ -10,32 +9,94 @@ sources: kind: semver pattern: "~1.x" + loki-version: + kind: dockerimage + spec: + image: docker.io/grafana/loki + versionfilter: + kind: semver + pattern: "~3.x" + conditions: - alloy-image: - name: Check latest image tag for alloy/alloy + check-alloy-image: kind: dockerimage disablesourceinput: true spec: image: docker.io/grafana/alloy tag: '{{ source "alloy-version" }}' + check-loki-image: + kind: dockerimage + disablesourceinput: true + spec: + image: docker.io/grafana/loki + tag: '{{ source "loki-version" }}' + targets: - alloy-yaml: - name: "Update Alloy image version in docker-compose/common/compose-include/alloy.yaml" + update-alloy-image-version-in-compose-include: kind: yaml + sourceid: alloy-version transformers: - addprefix: "${ALLOY_IMAGE:-docker.io/grafana/alloy:" - addsuffix: "}" spec: file: docker-compose/common/compose-include/alloy.yaml - key: services.alloy.image + key: $.services.alloy.image - alloy-env: - name: "Update Alloy image version in docker-compose/common/config/.env" + update-alloy-image-version-in-env: kind: "file" - disablesourceinput: true + sourceid: alloy-version spec: files: - docker-compose/common/config/.env matchpattern: 'ALLOY_IMAGE=grafana/alloy:.*' replacepattern: 'ALLOY_IMAGE=grafana/alloy:{{ source "alloy-version" }}' + + update-loki-image-version-in-compose-include: + kind: yaml + sourceid: loki-version + transformers: + - addprefix: "${LOKI_IMAGE:-docker.io/grafana/loki:" + - addsuffix: "}" + spec: + file: docker-compose/common/compose-include/loki.yaml + key: $.services.loki.image + + update-loki-image-version-in-all-in-one-mode-logs: + kind: yaml + sourceid: loki-version + transformers: + - addprefix: "${LOKI_IMAGE:-docker.io/grafana/loki:" + - addsuffix: "}" + spec: + file: docker-compose/monolithic-mode/all-in-one/compose.yaml + key: $.services.loki.image + + update-loki-image-version-in-read-write-mode-logs: + kind: yaml + sourceid: loki-version + transformers: + - addprefix: "&lokiImage ${LOKI_IMAGE:-docker.io/grafana/loki:" + - addsuffix: "}" + spec: + file: docker-compose/read-write-mode/logs/compose.yaml + key: $.services.loki-read.image + + update-loki-image-version-in-microservices-mode-logs: + kind: yaml + sourceid: loki-version + transformers: + - addprefix: "&lokiImage ${LOKI_IMAGE:-docker.io/grafana/loki:" + - addsuffix: "}" + spec: + file: docker-compose/microservices-mode/logs/compose.yaml + key: $.services.distributor.image + + update-loki-image-version-in-env: + kind: "file" + sourceid: loki-version + spec: + files: + - docker-compose/common/config/.env + matchpattern: 'LOKI_IMAGE=grafana/loki:.*' + replacepattern: 'LOKI_IMAGE=grafana/loki:{{ source "loki-version" }}' diff --git a/docker-compose/common/compose-include/loki.yaml b/docker-compose/common/compose-include/loki.yaml index 3e30df5a..ed155a83 100644 --- a/docker-compose/common/compose-include/loki.yaml +++ b/docker-compose/common/compose-include/loki.yaml @@ -1,4 +1,3 @@ - services: # Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired # by Prometheus. It is designed to be very cost effective and easy to operate. It does not index @@ -8,8 +7,8 @@ services: loki: labels: metrics.grafana.com/scrape: false - depends_on: { minio: { condition: service_healthy } } - image: ${LOKI_IMAGE:-docker.io/grafana/loki:3.3.0} + depends_on: {minio: {condition: service_healthy}} + image: ${LOKI_IMAGE:-docker.io/grafana/loki:3.3.2} configs: - source: loki_config_file target: /etc/loki/config.yaml @@ -20,7 +19,7 @@ services: - -target=all - -config.expand-env=true healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready"] interval: 3s timeout: 1s retries: 15 diff --git a/docker-compose/common/config/.env b/docker-compose/common/config/.env index a64d3166..308de916 100644 --- a/docker-compose/common/config/.env +++ b/docker-compose/common/config/.env @@ -1,5 +1,5 @@ ALLOY_IMAGE=grafana/alloy:v1.5.1 -LOKI_IMAGE=grafana/loki:3.3.0 +LOKI_IMAGE=grafana/loki:3.3.2 GRAFANA_IMAGE=grafana/grafana:11.4.0 TEMPO_IMAGE=grafana/tempo:2.6.0 MIMIR_IMAGE=grafana/mimir-alpine:2.14.0 diff --git a/docker-compose/microservices-mode/logs/compose.yaml b/docker-compose/microservices-mode/logs/compose.yaml index 095d3bc7..8055ce72 100644 --- a/docker-compose/microservices-mode/logs/compose.yaml +++ b/docker-compose/microservices-mode/logs/compose.yaml @@ -37,7 +37,7 @@ services: labels: metrics.grafana.com/scrape: false logs.grafana.com/log-format: nginx - depends_on: { distributor: { condition: service_healthy } } + depends_on: {distributor: {condition: service_healthy}} image: ${NGINX_IMAGE:-docker.io/nginxinc/nginx-unprivileged:1.27-alpine} volumes: - ../../common/config/nginx/10-default-lgtmp.envsh:/docker-entrypoint.d/10-default-lgtmp.envsh @@ -52,7 +52,7 @@ services: - LOKI_QUERIER_HOST=querier - LOKI_COMPACTOR_HOST=compactor healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/"] interval: 3s timeout: 1s retries: 20 @@ -61,8 +61,8 @@ services: distributor: labels: *loki-labels - depends_on: { ingester: { condition: service_healthy } } - image: &lokiImage ${LOKI_IMAGE:-docker.io/grafana/loki:3.3.0} + depends_on: {ingester: {condition: service_healthy}} + image: &lokiImage ${LOKI_IMAGE:-docker.io/grafana/loki:3.3.2} configs: - source: loki_config_file target: /etc/loki/config.yaml @@ -73,7 +73,7 @@ services: - -target=distributor - -config.expand-env=true healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready"] <<: *status-healthcheck deploy: replicas: 2 @@ -84,7 +84,7 @@ services: ingester: labels: *loki-labels - depends_on: { minio: { condition: service_healthy } } + depends_on: {minio: {condition: service_healthy}} image: *lokiImage configs: - source: loki_config_file @@ -96,7 +96,7 @@ services: - -target=ingester - -config.expand-env=true healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready"] <<: *status-healthcheck deploy: replicas: 3 @@ -107,7 +107,7 @@ services: pattern-ingester: labels: *loki-labels - depends_on: { minio: { condition: service_healthy } } + depends_on: {minio: {condition: service_healthy}} image: *lokiImage configs: - source: loki_config_file @@ -119,7 +119,7 @@ services: - -target=pattern-ingester - -config.expand-env=true healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready"] <<: *status-healthcheck deploy: replicas: 1 @@ -130,7 +130,7 @@ services: index-gateway: labels: *loki-labels - depends_on: { query-scheduler: { condition: service_healthy } } + depends_on: {query-scheduler: {condition: service_healthy}} image: *lokiImage configs: - source: loki_config_file @@ -144,7 +144,7 @@ services: query-frontend: labels: *loki-labels - depends_on: { query-scheduler: { condition: service_healthy } } + depends_on: {query-scheduler: {condition: service_healthy}} image: *lokiImage configs: - source: loki_config_file @@ -169,7 +169,7 @@ services: - -target=query-scheduler - -config.expand-env=true healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready"] <<: *status-healthcheck deploy: replicas: 2 @@ -180,7 +180,7 @@ services: querier: labels: *loki-labels - depends_on: { query-scheduler: { condition: service_healthy } } + depends_on: {query-scheduler: {condition: service_healthy}} image: *lokiImage configs: - source: loki_config_file @@ -194,7 +194,7 @@ services: ruler: labels: *loki-labels - depends_on: { minio: { condition: service_healthy } } + depends_on: {minio: {condition: service_healthy}} image: *lokiImage configs: - source: loki_config_file diff --git a/docker-compose/monolithic-mode/all-in-one/compose.yaml b/docker-compose/monolithic-mode/all-in-one/compose.yaml index 4f4273a2..c3e72e94 100644 --- a/docker-compose/monolithic-mode/all-in-one/compose.yaml +++ b/docker-compose/monolithic-mode/all-in-one/compose.yaml @@ -46,7 +46,7 @@ services: gateway: labels: metrics.grafana.com/scrape: false - depends_on: { tempo: { condition: service_healthy }, mimir: { condition: service_healthy }, pyroscope: { condition: service_healthy } } + depends_on: {tempo: {condition: service_healthy}, mimir: {condition: service_healthy}, pyroscope: {condition: service_healthy}} image: ${NGINX_IMAGE:-docker.io/nginxinc/nginx-unprivileged:1.27-alpine} restart: always volumes: @@ -57,7 +57,7 @@ services: - ../../common/config/mimir/gateway_mimir.conf:/etc/nginx/templates/gateway_mimir.conf.template - ../../common/config/pyroscope/gateway_pyroscope.conf:/etc/nginx/templates/gateway_pyroscope.conf.template healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/"] interval: 3s timeout: 1s retries: 20 @@ -67,8 +67,8 @@ services: <<: *profiles-labels metrics.grafana.com/scrape: false profiles.grafana.com/service_name: loki - depends_on: { minio: { condition: service_healthy } } - image: ${LOKI_IMAGE:-docker.io/grafana/loki:3.3.0} + depends_on: {minio: {condition: service_healthy}} + image: ${LOKI_IMAGE:-docker.io/grafana/loki:3.3.2} configs: - source: loki_config_file target: /etc/loki/config.yaml @@ -82,7 +82,7 @@ services: <<: *jaeger-environment JAEGER_TAGS: app=loki healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready"] <<: *status-healthcheck # expose 33100 port so we can directly access loki inside container ports: @@ -97,7 +97,7 @@ services: <<: *profiles-labels metrics.grafana.com/scrape: false profiles.grafana.com/service_name: tempo - depends_on: { minio: { condition: service_healthy }, mimir: { condition: service_healthy } } + depends_on: {minio: {condition: service_healthy}, mimir: {condition: service_healthy}} image: ${TEMPO_IMAGE:-docker.io/grafana/tempo:2.6.0} configs: - source: tempo_config_file @@ -112,7 +112,7 @@ services: <<: *jaeger-environment JAEGER_TAGS: app=tempo healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3200/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3200/ready"] <<: *status-healthcheck start_period: 10s # expose 33200 port so we can directly access tempo inside container @@ -124,7 +124,7 @@ services: <<: *profiles-labels metrics.grafana.com/scrape: false profiles.grafana.com/service_name: mimir - depends_on: { minio: { condition: service_healthy } } + depends_on: {minio: {condition: service_healthy}} image: ${MIMIR_IMAGE:-docker.io/grafana/mimir-alpine:2.14.0} configs: - source: mimir_config_file @@ -140,7 +140,7 @@ services: <<: *jaeger-environment JAEGER_TAGS: app=mimir healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/ready"] <<: *status-healthcheck # expose 38080 port so we can directly access mimir inside container ports: @@ -168,7 +168,7 @@ services: labels: metrics.grafana.com/scrape: false profiles.grafana.com/service_name: pyroscope - depends_on: { minio: { condition: service_healthy } } + depends_on: {minio: {condition: service_healthy}} image: ${PYROSCOPE_IMAGE:-docker.io/grafana/pyroscope:1.10.0} configs: - source: pyroscope_config_file @@ -185,11 +185,11 @@ services: <<: *jaeger-environment JAEGER_TAGS: app=pyroscope healthcheck: - test: [ "CMD", "profilecli", "ready" ] + test: ["CMD", "profilecli", "ready"] <<: *status-healthcheck # expose 34040 port so we can directly access pyroscope inside container ports: - "34040:4040" volumes: - pyroscope_data: + pyroscope_data: {} diff --git a/docker-compose/read-write-mode/logs/compose.yaml b/docker-compose/read-write-mode/logs/compose.yaml index 140171be..ad6f7ff6 100644 --- a/docker-compose/read-write-mode/logs/compose.yaml +++ b/docker-compose/read-write-mode/logs/compose.yaml @@ -32,7 +32,7 @@ services: # https://github.com/qclaogui/codelab-monitoring/blob/main/alloy-modules/compose/README.md labels: metrics.grafana.com/scrape: false - depends_on: { loki-write: { condition: service_healthy } } + depends_on: {loki-write: {condition: service_healthy}} image: ${NGINX_IMAGE:-docker.io/nginxinc/nginx-unprivileged:1.27-alpine} volumes: - ../../common/config/nginx/10-default-lgtmp.envsh:/docker-entrypoint.d/10-default-lgtmp.envsh @@ -47,7 +47,7 @@ services: - LOKI_QUERIER_HOST=loki-read - LOKI_COMPACTOR_HOST=loki-backend healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/"] interval: 3s timeout: 1s retries: 20 @@ -55,8 +55,8 @@ services: - "33100:3100" loki-read: - depends_on: { minio: { condition: service_healthy } } - image: &lokiImage ${LOKI_IMAGE:-docker.io/grafana/loki:3.3.0} + depends_on: {minio: {condition: service_healthy}} + image: &lokiImage ${LOKI_IMAGE:-docker.io/grafana/loki:3.3.2} configs: - source: loki_config_file target: /etc/loki/config.yaml @@ -68,7 +68,7 @@ services: - -legacy-read-mode=false - -config.expand-env=true healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready"] <<: *status-healthcheck deploy: replicas: 2 @@ -78,7 +78,7 @@ services: - loki-memberlist loki-write: - depends_on: { minio: { condition: service_healthy } } + depends_on: {minio: {condition: service_healthy}} image: *lokiImage configs: - source: loki_config_file @@ -90,7 +90,7 @@ services: - -target=write - -config.expand-env=true healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready"] <<: *status-healthcheck deploy: replicas: 3 @@ -100,7 +100,7 @@ services: - loki-memberlist loki-backend: - depends_on: { minio: { condition: service_healthy } } + depends_on: {minio: {condition: service_healthy}} image: *lokiImage configs: - source: loki_config_file @@ -113,7 +113,7 @@ services: - -legacy-read-mode=false - -config.expand-env=true healthcheck: - test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready" ] + test: ["CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/ready"] <<: *status-healthcheck deploy: replicas: 2