mirror of
https://github.com/moby/buildkit.git
synced 2026-06-24 08:47:57 +00:00
Modifies the hack/compose script to use a newer otel collector and try to suppress miscellaneous logs when it fails to export traces. Disable jaeger, prometheus, and grafana by default. It also adds a metrics pipeline that goes to a nop exporter. This is force the otel collector to start the metrics service and prevent an error when buildkit exports metrics to the otel collector related to the metrics service being missing. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
88 lines
1.8 KiB
YAML
88 lines
1.8 KiB
YAML
name: buildkit
|
|
services:
|
|
buildkit:
|
|
container_name: buildkit-dev
|
|
build:
|
|
context: ../..
|
|
image: moby/buildkit:local
|
|
ports:
|
|
- 127.0.0.1:5000:5000
|
|
- 127.0.0.1:6060:6060
|
|
restart: always
|
|
privileged: true
|
|
environment:
|
|
OTEL_SERVICE_NAME: buildkitd
|
|
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
|
|
command:
|
|
- '--save-cache-debug'
|
|
configs:
|
|
- source: buildkit_config
|
|
target: /etc/buildkit/buildkitd.toml
|
|
volumes:
|
|
- buildkit:/var/lib/buildkit
|
|
depends_on:
|
|
- otel-collector
|
|
|
|
otel-collector:
|
|
image: otel/opentelemetry-collector-contrib:0.135.0
|
|
restart: always
|
|
configs:
|
|
- source: otelcol_config
|
|
target: /etc/otelcol-contrib/config.yaml
|
|
|
|
jaeger:
|
|
image: jaegertracing/all-in-one:latest
|
|
ports:
|
|
- 127.0.0.1:16686:16686
|
|
profiles:
|
|
- tracing
|
|
|
|
prometheus:
|
|
image: prom/prometheus:v2.48.1
|
|
configs:
|
|
- source: prometheus_config
|
|
target: /etc/prometheus/prometheus.yml
|
|
volumes:
|
|
- prometheus:/prometheus
|
|
depends_on:
|
|
- buildkit
|
|
profiles:
|
|
- metrics
|
|
|
|
grafana:
|
|
image: grafana/grafana-oss:10.2.3
|
|
configs:
|
|
- source: grafana_config
|
|
target: /etc/grafana/grafana.ini
|
|
- source: grafana_datasources_config
|
|
target: /etc/grafana/provisioning/datasources/datasources.yaml
|
|
ports:
|
|
- 127.0.0.1:3000:3000
|
|
volumes:
|
|
- grafana:/var/lib/grafana
|
|
depends_on:
|
|
- prometheus
|
|
profiles:
|
|
- metrics
|
|
|
|
volumes:
|
|
buildkit:
|
|
prometheus:
|
|
grafana:
|
|
|
|
configs:
|
|
buildkit_config:
|
|
file: ./buildkitd.toml
|
|
|
|
otelcol_config:
|
|
file: ./otelcol.yaml
|
|
|
|
prometheus_config:
|
|
file: ./prometheus.yml
|
|
|
|
grafana_config:
|
|
file: ./grafana.ini
|
|
|
|
grafana_datasources_config:
|
|
file: ./datasources.yaml
|