-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
123 lines (123 loc) · 3.39 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
version: '2'
services:
agent:
build: ./agent
image: scary:agent
environment: &base_env
MARIADB_HOST: mariadb_base
MARIADB_USER: test
MARIADB_PASSWORD: test
MARIADB_DATABASE: test
KAFKA: kafka
PROCESSOR : processor
depends_on:
mariadb_base:
condition: service_healthy
kafka:
condition: service_healthy
processor:
build: ./processor
image: scary:processor
environment:
<<: *base_env
TARGET_MARIADB_HOST: mariadb_target
TARGET_MARIADB_PORT: 3307
RECORD_USER: recording
RECORD_PASSWORD: record
RECORD_HOST: mariadb_recording
RECORD_DATABASE: scary
RECORD_PORT : 3308
depends_on:
mariadb_base:
condition: service_healthy
mariadb_target:
condition: service_healthy
mariadb_recording:
condition: service_healthy
kafka:
condition: service_healthy
mariadb_base:
image: docker.io/library/mariadb:10.6
volumes:
- 'mariadb_base:/var/lib/mysql'
environment:
<<: *base_env
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
MARIADB_REPLICATION_USER: repl
MARIADB_REPLICATION_PASSWORD: replica
command: --log-bin=mariadb --server-id=100 --sync-binlog=1
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 3
mariadb_target:
image: docker.io/library/mariadb:10.11
volumes:
- 'mariadb_target:/var/lib/mysql'
depends_on:
mariadb_base:
condition: service_healthy
environment:
- MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1
- MARIADB_MASTER_HOST=mariadb_base
- MARIADB_REPLICATION_USER=repl
- MARIADB_REPLICATION_PASSWORD=replica
- MARIADB_HEALTHCHECK_GRANTS=REPLICA MONITOR
command: --server-id=200 --port 3307
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized", "--replication_io", "--replication_sql", "--replication_seconds_behind_master=5", "--replication"]
interval: 10s
timeout: 5s
retries: 3
mariadb_recording:
image: docker.io/library/mariadb:10.6
volumes:
- 'mariadb_recording:/var/lib/mysql'
environment:
- MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1
- MARIADB_USER=recording
- MARIADB_PASSWORD=record
- MARIADB_DATABASE=scary
command: --port 3308
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 3
kafka:
image: 'bitnami/kafka:latest'
environment:
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
healthcheck:
test: ["CMD", "kafka-features.sh", "--bootstrap-server", "127.0.0.1:9092", "describe"]
interval: 2s
timeout: 2s
retries: 15
volumes:
- 'kafka_storage:/bitnami/kafka'
workload:
image: docker.io/tpcorg/hammerdb:maria
volumes:
- type: bind
source: ./workload_scripts
target: /mnt
environment:
<<: *base_env
LOGS: /tmp
depends_on:
mariadb_base:
condition: service_healthy
mariadb_recording:
condition: service_healthy
command: ./hammerdbcli auto /mnt/maria_tproch.tcl
volumes:
mariadb_base:
driver: local
mariadb_target:
driver: local
mariadb_recording:
driver: local
kafka_storage:
driver: local