-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
154 lines (144 loc) · 4.73 KB
/
docker-compose.yaml
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
144
145
146
147
148
149
150
151
152
153
154
version: "3.0"
services:
# Observability stack
otel_integration_testing:
container_name: otel_integration_testing
user: "1000:1000"
# Using older version as some extensions we use in the config have been removed in newer - needs patching properly
image: otel/opentelemetry-collector-contrib:0.81.0
command: [ "--config=/etc/otel-collector.yaml" ]
volumes:
- ./observability/opentelemetry-collector-integration.yaml:/etc/otel-collector.yaml
- /etc/nginx/ca.crt:/etc/ssl/certs/ca.crt
- /etc/nginx/ca.key:/etc/ssl/certs/ca.key
ports:
- "10003:10003" # OTLP GRPC
- "10000:10000" # Prometheus metrics (of what's sent to opentelemetry-collector)
- "10006:8888" # Prometheus metrics (of opentelemetry-collector's own metrics)
networks:
- perf
otel_performance_testing:
container_name: otel_performance_testing
user: "1000:1000"
image: otel/opentelemetry-collector-contrib:0.81.0
command: [ "--config=/etc/otel-collector.yaml" ]
volumes:
- ./observability/opentelemetry-collector-performance.yaml:/etc/otel-collector.yaml
- /etc/nginx/ca.crt:/etc/ssl/certs/ca.crt
- /etc/nginx/ca.key:/etc/ssl/certs/ca.key
ports:
- "10001:10001" # OTLP GRPC
- "10002:10002" # Prometheus metrics (of what's sent to opentelemetry-collector)
- "10005:8888" # Prometheus metrics (of opentelemetry-collector's own metrics)
- "1888:1888" # pprof extension
- "13133:13133" # health_check extension
- "55679:55679" # zpages extension
networks:
- perf
otel_adhoc_testing:
container_name: otel_adhoc_testing
user: "1000:1000"
image: otel/opentelemetry-collector-contrib:0.81.0
command: [ "--config=/etc/otel-collector.yaml" ]
volumes:
- ./observability/opentelemetry-collector-adhoc.yaml:/etc/otel-collector.yaml
- /etc/nginx/ca.crt:/etc/ssl/certs/ca.crt
- /etc/nginx/ca.key:/etc/ssl/certs/ca.key
ports:
- "4317:4317" # OTLP GRPC
- "10004:10004" # Prometheus metrics (of what's sent to opentelemetry-collector)
- "10007:8888" # Prometheus metrics (of opentelemetry-collector's own metrics)
networks:
- perf
jaeger:
container_name: jaeger
user: "1000:1000"
image: jaegertracing/all-in-one:latest
# Jaeger defaults to in-memory, and even with maximum traces set to 100, memory rapidly ballooned until the server
# crashed. Trying out Badger, a local storage backend, instead. Traces are deleted after 72 hours by default.
environment:
SPAN_STORAGE_TYPE: badger
BADGER_EPHEMERAL: "false"
BADGER_DIRECTORY_VALUE: /badger/data
BADGER_DIRECTORY_KEY: badger/key
#QUERY_BASE_PATH: /jaeger
command:
- '--query.base-path=/jaeger'
volumes:
- /home/ec2-user/jaeger-data-badger:/badger
ports:
- "6831:6831/udp"
- "16685:16685" # grpc queries
- "16686:16686" # ui
networks:
- perf
prometheus:
container_name: prometheus
image: prom/prometheus:latest
volumes:
- ./observability/prometheus.yaml:/etc/prometheus.yaml
command:
- '--web.external-url=/prometheus/'
- '--web.route-prefix=/'
- '--config.file=/etc/prometheus.yaml'
ports:
- "9090:9090"
networks:
- perf
# Performance stack
timedb:
container_name: timedb
image: timescale/timescaledb-ha:pg14-latest
volumes:
- /home/ec2-user/perf-data:/home/postgres/pgdata/data
environment:
- POSTGRES_PASSWORD
ports:
- "5432:5432"
networks:
- perf
# Logging stack
loki:
image: grafana/loki:latest
user: "1000:1000"
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
volumes:
- ./logging/loki-local-config.yaml:/etc/loki/local-config.yaml
- /data/logs:/logs
networks:
- perf
grafana:
image: grafana/grafana:latest
user: "1000:1000"
ports:
- "3000:3000"
volumes:
- ./logging/grafana.ini:/etc/grafana/grafana.ini
- /data/logs/grafana/data:/var/lib/grafana
depends_on:
- loki
networks:
- perf
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
# Workaround https://github.com/grafana/grafana/issues/49055
command:
- "sh"
- "-c"
- "grafana cli admin reset-admin-password ${GF_SECURITY_ADMIN_PASSWORD} && /run.sh"# healthcheck:
nginx:
image: nginx:latest
restart: unless-stopped
volumes:
- ./logging/nginx.conf:/etc/nginx/nginx.conf
- /etc/nginx/ca.crt:/etc/ssl/certs/ca.crt
- /etc/nginx/ca.key:/etc/ssl/certs/ca.key
ports:
- "443:443"
networks:
- perf
networks:
perf: