-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
188 lines (182 loc) · 5.06 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
version: '3'
services:
cassandra1:
image: cassandra
restart: unless-stopped
cap_add:
- CAP_SYS_NICE # Cassandra use mbind on NUMA system
labels:
# Glouton is the monitoring agent made by Bleemeo.
# On real setup of SquirrelDB, you probably want to monitor component, but
# this docker compose is a quick-start used to test and evaluate SquirrelDB so disable
# monitoring to avoid false notification.
glouton.enable: "false"
environment:
- "MAX_HEAP_SIZE=128M"
- "HEAP_NEWSIZE=24M"
- "CASSANDRA_SEEDS=cassandra1,cassandra2"
networks:
default:
ipv4_address: 172.28.0.11 # Cassandra don't like if node swap their IPs. Other case should be fine
cassandra2:
image: cassandra
restart: unless-stopped
cap_add:
- CAP_SYS_NICE # Cassandra use mbind on NUMA system
labels:
glouton.enable: "false"
environment:
- "MAX_HEAP_SIZE=128M"
- "HEAP_NEWSIZE=24M"
- "CASSANDRA_SEEDS=cassandra1,cassandra2"
networks:
default:
ipv4_address: 172.28.0.12
cassandra3:
image: cassandra
restart: unless-stopped
cap_add:
- CAP_SYS_NICE # Cassandra use mbind on NUMA system
labels:
glouton.enable: "false"
environment:
- "MAX_HEAP_SIZE=128M"
- "HEAP_NEWSIZE=24M"
- "CASSANDRA_SEEDS=cassandra1,cassandra2"
# We don't fix Cassandra 3 IP because:
# * in a 3 nodes cluster, with the first two having fixed IP avoid any swap of node IP
# * it make easier to run some test with higher number of Cassandra. Just scale cassandra3
redis1:
image: redis:6
restart: unless-stopped
labels:
glouton.enable: "false"
volumes:
- ./redis.conf:/etc/redis.conf:ro
command: [ "/etc/redis.conf" ]
networks:
default:
ipv4_address: 172.28.0.21 # Redis need fixed IP of the cluster may fail to recover by itself if node switch their IPs or all node changes their IP.
redis2:
image: redis:6
restart: unless-stopped
labels:
glouton.enable: "false"
volumes:
- ./redis.conf:/etc/redis.conf:ro
command: [ "/etc/redis.conf" ]
networks:
default:
ipv4_address: 172.28.0.22
redis3:
image: redis:6
restart: unless-stopped
labels:
glouton.enable: "false"
volumes:
- ./redis.conf:/etc/redis.conf:ro
command: [ "/etc/redis.conf" ]
networks:
default:
ipv4_address: 172.28.0.23
redis4:
image: redis:6
restart: unless-stopped
labels:
glouton.enable: "false"
volumes:
- ./redis.conf:/etc/redis.conf:ro
command: [ "/etc/redis.conf" ]
networks:
default:
ipv4_address: 172.28.0.24
redis5:
image: redis:6
restart: unless-stopped
labels:
glouton.enable: "false"
volumes:
- ./redis.conf:/etc/redis.conf:ro
command: [ "/etc/redis.conf" ]
networks:
default:
ipv4_address: 172.28.0.25
redis6:
image: redis:6
restart: unless-stopped
labels:
glouton.enable: "false"
volumes:
- ./redis.conf:/etc/redis.conf:ro
command: [ "/etc/redis.conf" ]
networks:
default:
ipv4_address: 172.28.0.26
redis_init:
image: redis:6
restart: unless-stopped
labels:
glouton.enable: "false"
volumes:
- ./redis-init.sh:/usr/bin/redis-init.sh:ro
command: [ "/bin/sh", "/usr/bin/redis-init.sh" ]
squirreldb1:
image: bleemeo/squirreldb
restart: unless-stopped
labels:
glouton.enable: "false"
environment:
- SQUIRRELDB_CASSANDRA_ADDRESSES=cassandra1:9042,cassandra2:9042
- SQUIRRELDB_CASSANDRA_REPLICATION_FACTOR=3
- SQUIRRELDB_REDIS_ADDRESSES=redis1:6379,redis2:6379
networks:
default:
ipv4_address: 172.28.0.31 # SquirrelDB don't care about its IP, but nginx will only resolv DNS name on startup. So if SquirrelDB change their IP, nginx will no longer send traffic to them
squirreldb2:
image: bleemeo/squirreldb
restart: unless-stopped
labels:
glouton.enable: "false"
environment:
- SQUIRRELDB_CASSANDRA_ADDRESSES=cassandra1:9042,cassandra2:9042
- SQUIRRELDB_CASSANDRA_REPLICATION_FACTOR=3
- SQUIRRELDB_REDIS_ADDRESSES=redis1:6379,redis2:6379
networks:
default:
ipv4_address: 172.28.0.32
squirreldb:
image: nginx
labels:
glouton.enable: "false"
restart: unless-stopped
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- 127.0.0.1:9201:9201
prometheus:
image: prom/prometheus
restart: unless-stopped
labels:
glouton.enable: "false"
volumes:
- ./sample-prometheus.yml:/etc/prometheus/prometheus.yml:ro
node:
image: prom/node-exporter
restart: unless-stopped
labels:
glouton.enable: "false"
volumes:
- /:/rootfs:ro,rslave
command: --path.rootfs=/rootfs
grafana:
image: grafana/grafana
labels:
glouton.enable: "false"
restart: unless-stopped
ports:
- 127.0.0.1:3000:3000
networks:
default:
ipam:
config:
- subnet: 172.28.0.0/16