-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.e2e.yml
More file actions
143 lines (138 loc) · 5.72 KB
/
docker-compose.e2e.yml
File metadata and controls
143 lines (138 loc) · 5.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# =============================================================================
# TelemetryFlow Agent - E2E Test Docker Compose
# =============================================================================
#
# TelemetryFlow Agent - Community Enterprise Observability Platform (CEOP)
# Copyright (c) 2024-2026 DevOpsCorner Indonesia. All rights reserved.
#
# Usage:
# docker-compose -f docker-compose.e2e.yml up -d
# ./scripts/wait-for-services.sh
# make test-e2e
# docker-compose -f docker-compose.e2e.yml down
#
# =============================================================================
# OTLP HTTP Endpoints (Dual Ingestion Support)
# =============================================================================
#
# TelemetryFlow Platform (Recommended - TFO Standalone):
# POST http://localhost:4318/v2/traces
# POST http://localhost:4318/v2/metrics
# POST http://localhost:4318/v2/logs
#
# OTEL Community (Backwards Compatible - OCB/Standard):
# POST http://localhost:4318/v1/traces
# POST http://localhost:4318/v1/metrics
# POST http://localhost:4318/v1/logs
#
# gRPC (Both versions via same port):
# localhost:4317
#
# NOTE: v2 endpoints require TFO Standalone build.
# OCB builds support v1 endpoints only.
#
# =============================================================================
services:
# ---------------------------------------------------------------------------
# TelemetryFlow Agent under test
# ---------------------------------------------------------------------------
tfo-agent-e2e:
build:
context: .
dockerfile: Dockerfile
container_name: tfo-agent-e2e
environment:
- TELEMETRYFLOW_API_ENDPOINT=http://mock-backend:8080
- TELEMETRYFLOW_ENDPOINT=otel-collector:4317
- TELEMETRYFLOW_LOG_LEVEL=debug
volumes:
- ./tests/e2e/testdata/e2e-config.yaml:/etc/tfo-agent/tfo-agent.yaml:ro
depends_on:
otel-collector:
condition: service_healthy
networks:
- e2e-test
# ---------------------------------------------------------------------------
# OpenTelemetry Collector
# ---------------------------------------------------------------------------
# Supports dual ingestion: v1 (OTEL standard) and v2 (TelemetryFlow enhanced)
otel-collector:
platform: linux/amd64
# =============================================================================
# TelemetryFlow Collector (TFO-Collector) - Custom TFO format with OTLP support (v1.1.4+)
image: telemetryflow/telemetryflow-collector:${TFO_VERSION:-latest}
command: ["--config=/etc/tfo-collector/tfo-collector.yaml"]
# =============================================================================
# TelemetryFlow Collector OCB (TFO-Collector-OCB) - Standard OTEL format
# image: telemetryflow/telemetryflow-collector-ocb:${TFO_VERSION:-latest}
# command: ["--config=/etc/tfo-collector/otel-collector.yaml"]
# =============================================================================
# OTEL Collector Community Contributor (Standard OTEL format)
# image: otel/opentelemetry-collector-contrib:${OTEL_VERSION:-0.142.0}
# command: ["--config=/etc/otelcol-contrib/config.yaml"]
# =============================================================================
container_name: otel-collector-e2e
restart: unless-stopped
volumes:
# TelemetryFlow Collector config (Custom TFO format)
- ./tests/e2e/testdata/tfo-collector.yaml:/etc/tfo-collector/tfo-collector.yaml:ro
# =============================================================================
# TelemetryFlow Collector OCB config (Standard OTEL format)
# - ./tests/e2e/testdata/otel-collector.yaml:/etc/tfo-collector/otel-collector.yaml:ro
# =============================================================================
# OTEL Collector Community Contributor config (Standard OTEL format)
# - ./tests/e2e/testdata/otel-collector.yaml:/etc/otelcol-contrib/config.yaml:ro
ports:
- "4317:4317" # OTLP gRPC (v1 & v2)
- "4318:4318" # OTLP HTTP (v1 & v2)
- "8888:8888" # Prometheus metrics (self)
- "8889:8889" # Prometheus exporter
- "13133:13133" # Health check
- "55679:55679" # zPages
- "1777:1777" # pprof
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:13133"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- e2e-test
# ---------------------------------------------------------------------------
# Mock backend API for agent registration/heartbeat
# ---------------------------------------------------------------------------
mock-backend:
image: nginx:alpine
container_name: mock-backend-e2e
ports:
- "8080:80"
volumes:
- ./tests/e2e/testdata/nginx.conf:/etc/nginx/nginx.conf:ro
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost/health"]
interval: 10s
timeout: 5s
retries: 3
networks:
- e2e-test
# ---------------------------------------------------------------------------
# Jaeger for trace visualization
# ---------------------------------------------------------------------------
jaeger:
image: jaegertracing/jaeger:${JAEGER_VERSION:-2.2.0}
container_name: jaeger-e2e
ports:
- "16686:16686" # Jaeger UI
- "14268:14268" # Jaeger HTTP
- "14250:14250" # Jaeger gRPC
environment:
- COLLECTOR_OTLP_ENABLED=true
networks:
- e2e-test
# -----------------------------------------------------------------------------
# Networks
# -----------------------------------------------------------------------------
networks:
e2e-test:
driver: bridge
name: telemetryflow-agent-e2e-network