-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
102 lines (94 loc) · 2.11 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
version: '3.7'
services:
mysql:
image: mysql:5.7
hostname: mysql
networks:
- slurm
environment:
MYSQL_DATABASE: slurm
MYSQL_USER: slurm
MYSQL_PASSWORD: slurm
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- var_lib_mysql:/var/lib/mysql
database:
build:
context: .
dockerfile: ./database/Dockerfile
depends_on:
- mysql
container_name: slurm-db
hostname: slurm-db
networks:
- slurm
controller:
build:
context: .
dockerfile: ./controller/Dockerfile
depends_on:
- database
- etcd
container_name: slurm-controller
hostname: slurm-controller
networks:
- slurm
environment:
ETCDCTL_API: 3
ETCD_ENDPOINTS: etcd:2379
volumes:
- ./jobs:/data
worker01:
build:
context: .
dockerfile: ./worker/Dockerfile
depends_on:
- controller
container_name: slurm-worker1
hostname: slurm-worker1
networks:
- slurm
worker02:
build:
context: .
dockerfile: ./worker/Dockerfile
depends_on:
- controller
container_name: slurm-worker2
hostname: slurm-worker2
networks:
- slurm
etcd:
image: quay.io/coreos/etcd:v3.3.15
command: etcd --name etcd --data-dir=/etcd-data --initial-cluster-state new --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379 --listen-peer-urls http://0.0.0.0:2380 --initial-cluster 'etcd=http://etcd:2380'
hostname: etcd
container_name: etcd
networks:
- slurm
volumes:
- etcd_data:/etcd-data
expose:
- "2379"
fakebuffernode:
hostname: fakebuffernode
container_name: fakebuffernode
# scale: 1
build:
context: .
dockerfile: ./buffernode/Dockerfile
environment:
DAC_SKIP_ANSIBLE: "True"
ETCDCTL_API: 3
ETCDCTL_ENDPOINTS: etcd:2379
DEVICE_COUNT: 2
DAC_DEVICE_CAPACITY_GB: 10
# total bb capacity = DEVICE_COUNT * DAC_DEVICE_CAPACITY_GB
networks:
- slurm
depends_on:
- etcd
networks:
slurm:
volumes:
var_lib_mysql:
etcd_data: