-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
368 lines (346 loc) · 7.84 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
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
version: "3.9"
services:
# db:
# image: redis:latest
# container_name: tf-db
# restart: unless-stopped
# expose:
# - 6379
# hostname: tf-db
# networks:
# needham_int:
# ipv4_address: 10.245.128.13
# # docker_int:
# # ipv4_address: 172.16.0.13
# volumes:
# - db_data:/data
# - db_log:/var/log/redis
# command:
# - redis-server
# - "--bind"
# - "0.0.0.0"
# - "--maxmemory"
# - "16384mb"
# - "--maxmemory-policy"
# - "allkeys-lfu"
# environment:
# - REDIS_REPLICATION_MODE=master
mqtt:
build:
context: .
dockerfile: tf-mqtt
container_name: tf-mqtt
depends_on:
- agent
hostname: tf-mqtt
expose:
- 1883
- 9001
networks:
needham_int:
ipv4_address: 10.245.128.14
# docker_int:
# ipv4_address: 172.16.0.14
restart: unless-stopped
# volumes:
# - ./mqtt/conf:/mosquitto/config
# api:
# build:
# context: .
# dockerfile: tf-api
# command: [
# "gunicorn",
# "-b=0.0.0.0",
# "-t=0",
# "-k=gevent",
# "--worker-connections=1000",
# "testflinger:app"
# ]
# container_name: tf-api
# depends_on:
# - mqtt
# environment:
# - PATH=/data/testflinger:$PATH
# expose:
# - 8000
# hostname: tf-api
# networks:
# needham_int:
# ipv4_address: 10.245.128.10
# # docker_int:
# # ipv4_address: 172.16.0.10
# restart: unless-stopped
# sysctls:
# net.core.somaxconn: 2048
# volumes:
# - api_data:/data/testflinger
vault:
image: hashicorp/vault:latest
restart: unless-stopped
container_name: nh-vault
networks:
needham_int:
ipv4_address: 10.245.128.121
docker_int:
ipv4_address: 172.16.0.2
expose:
- 8200
ports:
- "8200:8200"
hostname: nh-vault
environment:
VAULT_DEV_ROOT_TOKEN_ID: nh-vault-root
VAULT_DEV_LISTEN_ADDRESS: 172.16.0.2:8200
volumes:
- vault_data:/vault/data
cap_add:
- IPC_LOCK
agent:
build:
context: .
dockerfile: tf-agent
command: ["/opt/tf-entrypoint.sh"]
container_name: tf-agent
depends_on:
- vault
hostname: tf-agent
networks:
needham_int:
ipv4_address: 10.245.128.11
docker_int:
ipv4_address: 172.16.0.11
expose:
- 19999
privileged: true
restart: unless-stopped
stdin_open: true
tty: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- agent_data:/data/testflinger/agent
- snappy_data:/data/testflinger/device-connectors
- docker_data:/data/docker
- ./code/init_agent_cntnrs.py:/opt/init_agent_cntnrs.py
- ./log:/var/log/sut-agent
- ./sut/agent:/data/testflinger/agent/sut
- ./sut/snappy:/data/testflinger/device-connectors/sut/
# netdata volumes
# - netdata_cache:/var/cache/netdata
# - netdata_config:/etc/netdata
# - netdata_lib:/var/lib/netdata
# - /proc:/host/proc:ro
# - /sys:/host/sys:ro
# - /etc/os-release:/host/etc/os-release:ro
# environment:
# - PATH=/data/testflinger-agent:/data/snappy-device-agents:$PATH
# # for netdata
# cap_add:
# - SYS_PTRACE
# security_opt:
# - apparmor:unconfined
cli:
depends_on:
- agent
build:
context: .
dockerfile: tf-cli
stdin_open: true
tty: true
restart: unless-stopped
container_name: tf-cli
networks:
needham_int:
ipv4_address: 10.245.128.12
docker_int:
ipv4_address: 172.16.0.12
hostname: tf-cli
volumes:
- cli_data:/data/testflinger/cli
environment:
- PATH=/data/testflinger/cli:$PATH
portainer:
depends_on:
- agent
image: portainer/portainer-ce:2.9.3
restart: unless-stopped
container_name: nh-portainer
networks:
needham_int:
ipv4_address: 10.245.128.15
# docker_int:
# ipv4_address: 172.16.0.15
expose:
- 9443
hostname: nh-portainer
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
jenkins:
depends_on:
- agent
image: jenkins/jenkins:lts
restart: unless-stopped
container_name: nh-jenkins
networks:
needham_int:
ipv4_address: 10.245.128.116
# docker_int:
# ipv4_address: 172.16.0.16
expose:
- 8080
- 50000
hostname: nh-jenkins
volumes:
- jenkins_data:/var/jenkins_home
- ./jenkins/backups:/data/backups
- ./jenkins/pipelines:/opt/pipelines
# restarter:
# depends_on:
# - api
# image: docker
# restart: unless-stopped
# container_name: tf-restarter
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# # periodic execution (UTC 06:00)
# command: [
# "/bin/sh",
# "-c",
# "while true; \
# do if [ `date +'%H'` -eq 6 ];
# then echo 'restarting tf-api @' `date`;
# docker restart tf-api;
# echo;
# sleep 3600;
# fi; \
# done"]
influxdb:
image: influxdb:1.8
container_name: nh-influxdb
restart: unless-stopped
depends_on:
- agent
expose:
- 8086
- 8082
- 8089
ports:
- "8086:8086"
- "8089:8089"
volumes:
- influx_data:/var/lib/influxdb
- ./db/influxdb.conf:/etc/influxdb/influxdb.conf
networks:
needham_int:
ipv4_address: 10.245.128.117
# docker_int:
# ipv4_address: 172.16.0.17
hostname: nh-influxdb
environment:
INFLUXDB_HTTP_BIND_ADDRESS: 10.245.128.117:8086
chronograf:
depends_on:
- influxdb
image: chronograf:latest
restart: unless-stopped
container_name: nh-chronograf
networks:
needham_int:
ipv4_address: 10.245.128.118
# docker_int:
# ipv4_address: 172.16.0.18
expose:
- 8888
ports:
- "8888:8888"
links:
- influxdb
volumes:
- chronograf_data:/var/lib/chronograf
environment:
- INFLUXDB_URL=http://influxdb:8086
# influxdb_relay:
# depends_on:
# - influxdb
# image: bitnami/influxdb-relay:latest
# restart: unless-stopped
# container_name: nh-inflx-relay
# networks:
# needham_int:
# ipv4_address: 10.245.128.19
# expose:
# - 9096
# hostname: nh-inflx-relay
grafana:
depends_on:
- influxdb
image: grafana/grafana:latest
networks:
needham_int:
ipv4_address: 10.245.128.120
# docker_int:
# ipv4_address: 172.16.0.20
expose:
- 3000
ports:
- "3000:3000"
links:
- influxdb
hostname: nh-grafana
image_server:
depends_on:
- portainer
image: halverneus/static-file-server:latest
restart: unless-stopped
container_name: nh-imgsrv
networks:
needham_int:
ipv4_address: 10.245.128.123
# docker_int:
# ipv4_address: 172.16.0.23
expose:
- 9999
ports:
- "9999:9999"
environment:
- FOLDER=/web
- PORT=9999
- URL_PREFIX=/srv
volumes:
- ./filesrv:/web
networks:
docker_int:
driver: bridge
ipam:
config:
- subnet: "172.16.0.0/24"
needham_int:
driver: macvlan
# driver:ipvlan
driver_opts:
# mode: l3
parent: ens3f1
ipam:
config:
- subnet: "10.245.128.0/21"
ip_range: "10.245.132.1/23"
gateway: "10.245.128.1"
volumes:
# db_data: {}
# db_log: {}
# api_data: {}
agent_data: {}
snappy_data: {}
docker_data: {}
agent_log: {}
cli_data: {}
portainer_data: {}
jenkins_data: {}
influx_data: {}
chronograf_data: {}
grafana_data: {}
vault_data: {}
vault_config: {}
# netdata_cache: {}
# netdata_config: {}
# netdata_lib: {}