forked from elastic/apm-agent-rum-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
243 lines (236 loc) · 6.35 KB
/
docker-compose.yml
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
version: "2.1"
services:
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION:-7.16.3}
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-XX:UseAVX=2 -Xms1g -Xmx1g"
- "cluster.routing.allocation.disk.threshold_enabled=false"
- "discovery.type=single-node"
- "path.data=/usr/share/elasticsearch/data/${STACK_VERSION}"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2000m
# cpus: 0.5
logging:
driver: 'json-file'
options:
max-size: '2m'
max-file: '5'
ports:
- "127.0.0.1:${ELASTICSEARCH_PORT:-9200}:9200"
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health | grep -vq '\"status\":\"red\"'"]
retries: 10
interval: 20s
networks:
apm:
aliases:
- elasticsearch
apm-server:
container_name: apm-server
image: docker.elastic.co/apm/apm-server:${STACK_VERSION:-7.16.3}
ports:
- "127.0.0.1:${APM_SERVER_PORT:-8200}:8200"
environment:
BEAT_STRICT_PERMS: "false"
command: >
apm-server -e
-E apm-server.rum.enabled=true
-E apm-server.rum.event_rate.limit=100000
-E apm-server.rum.allow_headers=["x-custom-header"]
-E apm-server.host=0.0.0.0:8200
-E apm-server.read_timeout=1m
-E apm-server.shutdown_timeout=2m
-E apm-server.write_timeout=1m
-E apm-server.kibana.enabled=true
-E apm-server.kibana.host=http://kibana:5601
-E setup.template.settings.index.number_of_replicas=0
-E monitoring.enabled=true
-E apm-server.expvar.enabled=true
-E apm-server.ilm.enabled=false
-E apm-server.instrumentation.enabled=true
cap_drop:
- ALL
cap_add:
- CHOWN
- DAC_OVERRIDE
- SETGID
- SETUID
logging:
driver: 'json-file'
options:
max-size: '2m'
max-file: '5'
mem_limit: 1000m
# cpus: 0.5
depends_on:
elasticsearch:
condition: service_healthy
kibana:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "--write-out", "'HTTP %{http_code}'", "--silent", "--output", "/dev/null", "http://apm-server:8200/"]
retries: 10
interval: 10s
networks:
apm:
aliases:
- apm-server
kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:${STACK_VERSION:-7.16.3}
environment:
SERVER_NAME: kibana.example.org
ELASTICSEARCH_URL: http://elasticsearch:9200
ports:
- "127.0.0.1:${KIBANA_PORT:-5601}:5601"
logging:
driver: 'json-file'
options:
max-size: '2m'
max-file: '5'
healthcheck:
test: ["CMD", "curl", "--write-out", "'HTTP %{http_code}'", "--silent", "--output", "/dev/null", "http://kibana:5601/"]
retries: 10
interval: 10s
mem_limit: 2000m
# cpus: 0.5
depends_on:
elasticsearch:
condition: service_healthy
labels:
- "co.elatic.apm.stack-version=${STACK_VERSION}"
networks:
apm:
aliases:
- kibana
wait-for-apm-server:
container_name: wait-for-apm-server
image: alpine
command: >
/bin/sh -c exit 0
healthcheck:
test: ["CMD", "/bin/sh", "-c", "exit 0"]
retries: 10
interval: 10s
depends_on:
apm-server:
condition: service_healthy
networks:
apm:
aliases:
- wait-for-apm-server
node-puppeteer:
build:
context: ../.ci/docker/node-puppeteer
args:
- NODEJS_VERSION=${NODEJS_VERSION}
container_name: node-puppeteer
image: docker.elastic.co/observability-ci/node-puppeteer:${NODEJS_VERSION}
environment:
- HOME=/app
- SCOPE=${SCOPE}
- STACK_VERSION=${STACK_VERSION}
- APM_SERVER_URL=${APM_SERVER_URL}
- BUILD_NUMBER=${BUILD_NUMBER}
- BRANCH_NAME=${BRANCH_NAME}
- JENKINS_URL=${JENKINS_URL}
- SAUCE_USERNAME=${SAUCE_USERNAME}
- SAUCE_ACCESS_KEY=${SAUCE_ACCESS_KEY}
- MODE=${MODE}
- GOAL=${GOAL}
- WORKSPACE=${WORKSPACE}
- BASE_DIR=${BASE_DIR}
command: /run-test.sh
mem_limit: 2000m
# cpus: 0.5
depends_on:
apm-server:
condition: service_healthy
volumes:
- ..:/app
networks:
apm:
aliases:
- node-puppeteer
user: ${USER_ID}
node-benchmark:
build:
context: ../.ci/docker/node-playwright
args:
- NODEJS_VERSION=${NODEJS_VERSION}
container_name: node-playwright
image: docker.elastic.co/observability-ci/node-playwright:${NODEJS_VERSION}
environment:
- HOME=/app
- BUILD_NUMBER=${BUILD_NUMBER}
- BRANCH_NAME=${BRANCH_NAME}
- JENKINS_URL=${JENKINS_URL}
- REPORT_FILE=${REPORT_FILE}
command: >
/bin/bash -c "set -x
id
node --version
npm --version
npx --version
cd /app
export
npm install
npm install playwright --unsafe-perm=true --allow-root
set -eo pipefail
npx lerna run build:module
node ./scripts/benchmarks.js ${REPORT_FILE}"
mem_limit: 2000m
volumes:
- ..:/app
networks:
apm:
aliases:
- node-benchmark
user: ${USER_ID}
load-testing:
build:
context: ../.ci/docker/node-playwright
args:
- NODEJS_VERSION=${NODEJS_VERSION}
container_name: node-playwright
image: docker.elastic.co/observability-ci/node-playwright:${NODEJS_VERSION}
environment:
- HOME=/app
- BUILD_NUMBER=${BUILD_NUMBER}
- BRANCH_NAME=${BRANCH_NAME}
- JENKINS_URL=${JENKINS_URL}
- REPORT_FILE=${REPORT_FILE}
- APM_SERVER_URL=http://apm-server:8200
command: >
/bin/bash -c "set -x
id
node --version
npm --version
npx --version
cd /app
export
npm install
set -eo pipefail
npx lerna run build:main
node ./scripts/apm-server-load-test.js ${REPORT_FILE}"
mem_limit: 2000m
volumes:
- ..:/app
networks:
apm:
aliases:
- load-testing
user: ${USER_ID}
depends_on:
elasticsearch:
condition: service_healthy
apm-server:
condition: service_healthy
networks:
apm: