forked from vectordotdev/vector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
604 lines (562 loc) · 19.1 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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
version: "3"
services:
# jobs
build-x86_64:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-x86_64-unknown-linux-musl/Dockerfile
environment:
CARGO_TERM_COLOR: always
volumes:
- $PWD:$PWD
- ./target/x86_64-unknown-linux-musl/cargo/registry:/opt/rust/cargo/registry
- ./target/x86_64-unknown-linux-musl/cargo/git:/opt/rust/cargo/git
- ./target/x86_64-unknown-linux-musl/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: cargo build --no-default-features --features default-musl --target x86_64-unknown-linux-musl
build-armv7:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-armv7-unknown-linux-musleabihf/Dockerfile
environment:
CARGO_TERM_COLOR: always
volumes:
- $PWD:$PWD
- ./target/armv7-unknown-linux-musleabihf/cargo/registry:/opt/rust/cargo/registry
- ./target/armv7-unknown-linux-musleabihf/cargo/git:/opt/rust/cargo/git
- ./target/armv7-unknown-linux-musleabihf/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: cargo build --no-default-features --features default-musl --target armv7-unknown-linux-musleabihf
build-aarch64:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-aarch64-unknown-linux-musl/Dockerfile
environment:
CARGO_TERM_COLOR: always
volumes:
- $PWD:$PWD
- ./target/aarch64-unknown-linux-musl/cargo/registry:/opt/rust/cargo/registry
- ./target/aarch64-unknown-linux-musl/cargo/git:/opt/rust/cargo/git
- ./target/aarch64-unknown-linux-musl/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: cargo build --no-default-features --features default-musl --target aarch64-unknown-linux-musl
bench:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-x86_64-unknown-linux-musl/Dockerfile
environment:
CARGO_TERM_COLOR: always
volumes:
- $PWD:$PWD
- ./target/x86_64-unknown-linux-musl/cargo/registry:/opt/rust/cargo/registry
- ./target/x86_64-unknown-linux-musl/cargo/git:/opt/rust/cargo/git
- ./target/x86_64-unknown-linux-musl/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: cargo bench --all --no-default-features --features default-musl --target x86_64-unknown-linux-musl
generate:
build:
context: .
dockerfile: scripts/ci-docker-images/checker/Dockerfile
environment:
CHECK_URLS: "false"
volumes:
- $PWD:$PWD
working_dir: $PWD
user: $USER
command: ./scripts/generate.rb
check-code:
build:
context: .
dockerfile: scripts/ci-docker-images/checker/Dockerfile
environment:
RUSTFLAGS: "-D warnings"
CARGO_TERM_COLOR: always
volumes:
- $PWD:$PWD
- ./target/cargo/registry:/root/.cargo/registry
- ./target/cargo/git:/root/.cargo/git
- ./target/rustup/tmp:/root/.rustup/tmp
working_dir: $PWD
command: cargo check --all --all-targets
check-component-features:
build:
context: .
dockerfile: scripts/ci-docker-images/checker-component-features/Dockerfile
environment:
RUSTFLAGS: "-D warnings"
CARGO_TERM_COLOR: always
volumes:
- $PWD:$PWD
- ./target/cargo/registry:/root/.cargo/registry
- ./target/cargo/git:/root/.cargo/git
- ./target/rustup/tmp:/root/.rustup/tmp
working_dir: $PWD
command: ./scripts/check-component-features.sh
check-fmt:
build:
context: .
dockerfile: scripts/ci-docker-images/checker/Dockerfile
environment:
CARGO_TERM_COLOR: always
volumes:
- $PWD:$PWD
- ./target/cargo/registry:/root/.cargo/registry
- ./target/cargo/git:/root/.cargo/git
- ./target/rustup/tmp:/root/.rustup/tmp
working_dir: $PWD
command: cargo fmt -- --check
check-style:
build:
context: .
dockerfile: scripts/ci-docker-images/checker/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
user: $USER
command: ./scripts/check-style.sh
check-markdown:
build:
context: .
dockerfile: scripts/ci-docker-images/checker-markdown/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
user: $USER
command: markdownlint .
check-generate:
build:
context: .
dockerfile: scripts/ci-docker-images/checker/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
user: $USER
command: ./scripts/check-generate.sh
check-version:
build:
context: .
dockerfile: scripts/ci-docker-images/checker/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
user: $USER
command: ./scripts/check-version.rb
check-examples:
image: ubuntu:18.04
volumes:
- $PWD:$PWD
working_dir: $PWD
user: $USER
command: ["sh", "-ec", "./target/x86_64-unknown-linux-musl/debug/vector validate --topology --deny-warnings ./config/examples/*.toml"]
check-blog:
build:
context: .
dockerfile: scripts/ci-docker-images/checker/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ./scripts/check-blog-signatures.rb
build-archive-x86_64:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-x86_64-unknown-linux-musl/Dockerfile
environment:
TARGET: x86_64-unknown-linux-musl
FEATURES: default-musl
CARGO_TERM_COLOR: always
volumes:
- $PWD:$PWD
- ./target/x86_64-unknown-linux-musl/cargo/registry:/opt/rust/cargo/registry
- ./target/x86_64-unknown-linux-musl/cargo/git:/opt/rust/cargo/git
- ./target/x86_64-unknown-linux-musl/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: ./scripts/build-archive.sh
build-archive-armv7:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-armv7-unknown-linux-musleabihf/Dockerfile
environment:
TARGET: armv7-unknown-linux-musleabihf
FEATURES: default-musl
CARGO_TERM_COLOR: always
volumes:
- $PWD:$PWD
- ./target/armv7-unknown-linux-musleabihf/cargo/registry:/opt/rust/cargo/registry
- ./target/armv7-unknwon-linux-musleabihf/cargo/git:/opt/rust/cargo/git
- ./target/armv7-unknwon-linux-musleabihf/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: ./scripts/build-archive.sh
build-archive-aarch64:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-aarch64-unknown-linux-musl/Dockerfile
environment:
TARGET: aarch64-unknown-linux-musl
FEATURES: default-musl
CARGO_TERM_COLOR: always
volumes:
- $PWD:$PWD
- ./target/aarch64-unknown-linux-musl/cargo/registry:/opt/rust/cargo/registry
- ./target/aarch64-unknown-linux-musl/cargo/git:/opt/rust/cargo/git
- ./target/aarch64-unknown-linux-musl/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: ./scripts/build-archive.sh
package-deb-x86_64:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-x86_64-unknown-linux-musl/Dockerfile
environment:
TARGET: x86_64-unknown-linux-musl
volumes:
- $PWD:$PWD
- ./target/x86_64-unknown-linux-musl/cargo/registry:/opt/rust/cargo/registry
- ./target/x86_64-unknown-linux-musl/cargo/git:/opt/rust/cargo/git
- ./target/x86_64-unknown-linux-musl/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: ./scripts/package-deb.sh
package-deb-armv7:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-armv7-unknown-linux-musleabihf/Dockerfile
environment:
TARGET: armv7-unknown-linux-musleabihf
volumes:
- $PWD:$PWD
- ./target/armv7-unknown-linux-musleabihf/cargo/registry:/opt/rust/cargo/registry
- ./target/armv7-unknown-linux-musleabihf/cargo/git:/opt/rust/cargo/git
- ./target/armv7-unknown-linux-musleabihf/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: ./scripts/package-deb.sh
package-deb-aarch64:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-aarch64-unknown-linux-musl/Dockerfile
environment:
TARGET: aarch64-unknown-linux-musl
volumes:
- $PWD:$PWD
- ./target/aarch64-unknown-linux-musl/cargo/registry:/opt/rust/cargo/registry
- ./target/aarch64-unknown-linux-musl/cargo/git:/opt/rust/cargo/git
- ./target/aarch64-unknown-linux-musl/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: ./scripts/package-deb.sh
package-rpm-x86_64:
build:
context: .
dockerfile: scripts/ci-docker-images/packager-rpm/Dockerfile
environment:
TARGET: x86_64-unknown-linux-musl
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ./scripts/package-rpm.sh
package-rpm-armv7:
build:
context: .
dockerfile: scripts/ci-docker-images/packager-rpm/Dockerfile
environment:
TARGET: armv7-unknown-linux-musleabihf
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ./scripts/package-rpm.sh
package-rpm-aarch64:
build:
context: .
dockerfile: scripts/ci-docker-images/packager-rpm/Dockerfile
environment:
TARGET: aarch64-unknown-linux-musl
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ./scripts/package-rpm.sh
verify-rpm-amazonlinux-1:
build:
context: .
dockerfile: scripts/ci-docker-images/verifier-amazonlinux-1/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "rpm -i target/artifacts/*-x86_64.rpm && vector --version"]
verify-rpm-amazonlinux-2:
build:
context: .
dockerfile: scripts/ci-docker-images/verifier-amazonlinux-2/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "rpm -i target/artifacts/*-x86_64.rpm && vector --version"]
verify-rpm-centos-7:
build:
context: .
dockerfile: scripts/ci-docker-images/verifier-centos-7/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "rpm -i target/artifacts/*-x86_64.rpm && vector --version"]
verify-deb-artifact-on-deb-8:
build:
context: .
dockerfile: scripts/ci-docker-images/verifier-deb-8/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "dpkg -i target/artifacts/*-amd64.deb && vector --version"]
verify-deb-artifact-on-deb-9:
build:
context: .
dockerfile: scripts/ci-docker-images/verifier-deb-9/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "dpkg -i target/artifacts/*-amd64.deb && vector --version"]
verify-deb-artifact-on-deb-10:
build:
context: .
dockerfile: scripts/ci-docker-images/verifier-deb-10/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "dpkg -i target/artifacts/*-amd64.deb && vector --version"]
verify-deb-artifact-on-ubuntu-16-04:
build:
context: .
dockerfile: scripts/ci-docker-images/verifier-ubuntu-16-04/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "dpkg -i target/artifacts/*-amd64.deb && vector --version"]
verify-deb-artifact-on-ubuntu-18-04:
build:
context: .
dockerfile: scripts/ci-docker-images/verifier-ubuntu-18-04/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "dpkg -i target/artifacts/*-amd64.deb && vector --version"]
verify-deb-artifact-on-ubuntu-19-04:
build:
context: .
dockerfile: scripts/ci-docker-images/verifier-ubuntu-19-04/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "dpkg -i target/artifacts/*-amd64.deb && vector --version"]
verify-nixos:
build:
context: .
dockerfile: scripts/ci-docker-images/verifier-nixos/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "./scripts/verify-nix.sh && vector --version"]
target-graph:
build:
context: .
dockerfile: scripts/ci-docker-images/target-graph/Dockerfile
volumes:
- $PWD:$PWD
working_dir: $PWD
entrypoint: ./scripts/target-graph.sh
clean:
image: ubuntu:18.04
volumes:
- $PWD:$PWD
working_dir: $PWD
command: ["sh", "-ec", "rm -rf target"]
load-qemu-binfmt:
build:
context: .
dockerfile: scripts/ci-docker-images/loader-qemu-binfmt/Dockerfile
privileged: true
command: dpkg-reconfigure qemu-user-binfmt
test:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-x86_64-unknown-linux-musl/Dockerfile
environment:
CARGO_TERM_COLOR: always
TEST_LOG: debug
RUST_BACKTRACE: full
volumes:
- $PWD:$PWD
- ./target/x86_64-unknown-linux-musl/cargo/registry:/opt/rust/cargo/registry
- ./target/x86_64-unknown-linux-musl/cargo/git:/opt/rust/cargo/git
- ./target/x86_64-unknown-linux-musl/rustup/tmp:/opt/rust/rustup/tmp
working_dir: $PWD
command: cargo test --no-default-features --features default-musl --target x86_64-unknown-linux-musl
test-docker:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-x86_64-unknown-linux-musl/Dockerfile
environment:
CARGO_TERM_COLOR: always
AWS_ACCESS_KEY_ID: dummy
AWS_SECRET_ACCESS_KEY: dummy
TEST_LOG: debug
RUST_BACKTRACE: full
volumes:
- $PWD:$PWD
- ./target/x86_64-unknown-linux-musl/cargo/registry:/opt/rust/cargo/registry
- ./target/x86_64-unknown-linux-musl/cargo/git:/opt/rust/cargo/git
- ./target/x86_64-unknown-linux-musl/rustup/tmp:/opt/rust/rustup/tmp
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- test-runtime-deps
network_mode: host
working_dir: $PWD
command: cargo test --all --no-default-features --features default-musl,docker,kubernetes --target x86_64-unknown-linux-musl -- --test-threads 4
test-behavior:
image: ubuntu:18.04
volumes:
- $PWD:$PWD
working_dir: $PWD
user: $USER
command: ["sh", "-c", "./target/x86_64-unknown-linux-musl/debug/vector test tests/behavior/**/*.toml"]
test-kubernetes:
build:
context: .
dockerfile: scripts/ci-docker-images/builder-kubernetes/Dockerfile
environment:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
TEST_LOG: debug
volumes:
- $PWD:$PWD
- ./target/x86_64-unknown-linux-musl/cargo/registry:/opt/rust/cargo/registry
- ./target/x86_64-unknown-linux-musl/cargo/git:/opt/rust/cargo/git
- ./target/x86_64-unknown-linux-musl/rustup/tmp:/opt/rust/rustup/tmp
- /var/run/docker.sock:/var/run/docker.sock
network_mode: host
working_dir: $PWD
command: ["sh", "-ec", "./scripts/kubernetes-test.sh"]
# test dependencies
# dummy service which runs all dependencies
test-runtime-deps:
image: ubuntu:18.04
command: sleep infinity
depends_on:
- localstack
- minio
- mockwatchlogs
- zookeeper
- kafka
- splunk
- pulsar
- elasticsearch
- elasticsearch-tls
- clickhouse
- ec2_metadata
- gcloud-pubsub
- loki
- influxdb_v1
- influxdb_v2
localstack:
image: localstack/localstack@sha256:f21f1fc770ee4bfd5012afdc902154c56b7fb18c14cf672de151b65569c8251e
ports:
- "4568:4568"
- "4582:4582"
- "4571:4571"
- "4573:4573"
environment:
SERVICES: kinesis:4568,cloudwatch:4582,elasticsearch:4571,firehose:4573
minio:
image: minio/minio
ports:
- "9000:9000"
environment:
MINIO_ACCESS_KEY: "test-access-key"
MINIO_SECRET_KEY: "test-secret-key"
command: server /tmp
mockwatchlogs:
image: luciofranco/mockwatchlogs:latest
ports:
- "6000:6000"
environment:
RUST_LOG: trace
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
ports:
- "9091-9093:9091-9093"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENERS: PLAINTEXT://:9092,SSL://:9091
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,SSL://localhost:9091
KAFKA_SSL_KEYSTORE_LOCATION: /certs/localhost.p12
KAFKA_SSL_KEYSTORE_PASSWORD: NOPASS
KAFKA_SSL_TRUSTSTORE_LOCATION: /certs/localhost.p12
KAFKA_SSL_TRUSTSTORE_PASSWORD: NOPASS
KAFKA_SSL_KEY_PASSWORD: NOPASS
KAFKA_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM: none
volumes:
- ./tests/data/localhost.p12:/certs/localhost.p12:ro
pulsar:
image: apachepulsar/pulsar
command: bin/pulsar standalone
ports:
- "6650:6650"
splunk:
image: timberio/splunk-hec-test:latest
ports:
- "8088:8088"
- "8000:8000"
- "8089:8089"
entrypoint: ["sh", "-c", "./bin/splunk add index custom_index && ./entrypoint.sh"]
elasticsearch:
image: elasticsearch:6.6.2
ports:
- "9200:9200"
- "9300:9300"
environment:
- discovery.type=single-node
elasticsearch-tls:
image: elasticsearch:6.6.2
ports:
- "9201:9200"
- "9301:9300"
environment:
- discovery.type=single-node
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=true
- xpack.security.transport.ssl.enabled=true
- xpack.ssl.certificate=certs/localhost.crt
- xpack.ssl.key=certs/localhost.key
volumes:
- ./tests/data:/usr/share/elasticsearch/config/certs:ro
clickhouse:
image: yandex/clickhouse-server:19
ports:
- "8123:8123"
ec2_metadata:
image: timberiodev/mock-ec2-metadata:latest
ports:
- "8111:8111"
gcloud-pubsub:
image: messagebird/gcloud-pubsub-emulator
ports:
- 8681-8682:8681-8682
environment:
- PUBSUB_PROJECT1=testproject,topic1:subscription1
loki:
image: grafana/loki:master-89263b0-amd64
ports:
- "3100:3100"
command: -config.file=/etc/loki/loki-config.yaml
volumes:
- ./tests/data:/etc/loki
influxdb_v1:
image: influxdb:1.7
ports:
- "8086:8086"
environment:
- INFLUXDB_REPORTING_DISABLED=true
influxdb_v2:
image: quay.io/influxdb/influxdb:2.0.0-beta
ports:
- "9999:9999"
command: influxd --reporting-disabled