-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yaml
251 lines (226 loc) · 8.17 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
# you need a recent version of Docker compose
version: '3.1'
# these variables are set in init.sh (change storage location there)
#
# set TAG to specify docker image version
# set CONFIGDIR to path to config
# set SHOCKDIR for persistent Shock data store , e.g. /var/tmp/Shock
# set DATADIR for persistent data store , e.g. /var/tmp
# set LOGDIR to path to local log dir
# set DOCKER_BINARY to the path of the docker client binary (Linux binary, not OSX/Windows)
# set CWL_DIR for location of demo workflow
services:
# the SHOCK object store
# to make SHOCK data persistent uncomment the lines here and in "mongo" below
shock:
image: mgrast/shock
extra_hosts:
- "skyport.local:${SKYPORT_DOCKER_GATEWAY}"
depends_on:
- mongo
entrypoint:
- /go/bin/shock-server
- --conf
- /shock-config/shock-server.cfg
volumes:
- ${CONFIGDIR}/Shock/shock-server.container.cfg:/shock-config/shock-server.cfg
- ${LOGDIR}/shock:/var/log/shock
# remove the comment below to make SHOCK data persistent
#- ${SHOCKDIR}/data:/usr/local/shock
ports:
- 7445:7445
- 8083:80
# web frontend for the shock browser
shock-browser:
extra_hosts:
- "skyport.local:${SKYPORT_DOCKER_GATEWAY}"
image: mgrast/shock-browser:${TAG}
depends_on:
- shock
- auth-server
volumes:
- ${CONFIGDIR}/ShockBrowser/config.js:/usr/share/nginx/html/js/config.js
# local Oauth2 server for user, password and tokens
# to make Auth data persistent make the MySQL DB persistent
auth-server:
image: mgrast/authserver:develop
extra_hosts:
- "skyport.local:${SKYPORT_DOCKER_GATEWAY}"
environment:
MYSQL_HOST: auth-mysql
MYSQL_DATABASE: DemoAppUsers
MYSQL_USER: authService
MYSQL_PASSWORD: authServicePassword
depends_on:
- auth-mysql
volumes:
#- ${CONFIGDIR}/authServer/httpd.conf:/usr/local/apache2/conf/httpd.conf:ro
- ${CONFIGDIR}/authServer/perl/:/usr/local/lib/site_perl:ro
- ${CONFIGDIR}/authServer/cgi/:/usr/local/apache2/cgi-bin/:ro
#- ${CONFIGDIR}/authServer/dbsetup.demo.mysql:/tmp/dbsetup.demo.mysql:ro
ports:
- 8081:80
# AWE resource manager
# uncomment AWEDIR to make data and logs persistent (also requires AWE-mongo for full persistence)
awe-server:
image: mgrast/awe:${TAG}
extra_hosts:
- "skyport.local:${SKYPORT_DOCKER_GATEWAY}"
entrypoint:
- /go/bin/awe-server
- --conf=/awe-config/awe-server.cfg
depends_on:
- awe-mongo
- auth-server
ports:
- 8001
- 8081
volumes:
- ${CONFIGDIR}/AWE/awe-server.conf:/awe-config/awe-server.cfg:ro
- ${CONFIGDIR}/authServer/httpd.conf:/usr/local/apache2/conf/httpd.conf:ro
#- ${AWEDIR}:/mnt/data/awe/
# the AWE worker that will execute the workflow steps
# the data and logs for the awe worker are persistent in this configuration
awe-worker:
image: mgrast/awe-worker:${TAG}
# worker needs to wait for AWE-server to start up
extra_hosts:
- "skyport.local:${SKYPORT_DOCKER_GATEWAY}"
entrypoint:
- ash
- -c
- 'while [ $$(nc -z awe-server 8001 ; echo $$?) != 0 ] ; do echo "wait..." ; sleep 2 ; done ;
/go/bin/awe-worker
--name compose_worker-1
--data=${DATADIR}/awe-worker/data
--logs=/mnt/data/logs
--workpath=${DATADIR}/awe-worker/work
--serverurl=http://awe-server:8001
--group=docker
--supported_apps=*
--auto_clean_dir=false
--debuglevel=0'
depends_on:
- awe-server
restart: on-failure
volumes:
- /tmp:/tmp
- ${CONFIGDIR}/AWE/awe-worker.cfg:/awe-config/awe-worker.cfg:ro
- ${DATADIR}/awe-worker:${DATADIR}/awe-worker
- ${LOGDIR}/awe-worker/:/mnt/data/logs
# mount the binary we have downloaded with the init.sh command
- ${DOCKER_BINARY}:/usr/local/bin/docker
# mount the docker socker to allow container to execute docker commands (for CWL runner)
- /var/run/docker.sock:/var/run/docker.sock
awe-monitor:
image: mgrast/awe-monitor
extra_hosts:
- "skyport.local:${SKYPORT_DOCKER_GATEWAY}"
environment:
AUTH_URL: "http://skyport.local:8001/auth/cgi-bin"
APPLICATION_NAME: AWE
APPLICATION_URL: "http://skyport.local:8001/awe/monitor/"
APPLICATION_SECRET: "abXYffLyDabuyxXN8vstbsaMdNwpMKfk"
command: ['httpd', '-DFOREGROUND','-C' , 'Define servername http://skyport.local:8001/awe/monitor']
depends_on:
- awe-server
volumes:
- ${CONFIGDIR}/awe-monitor/config.js:/usr/local/apache2/htdocs/js/config.js
ports:
- 80
# api for submission of demo workflow (part of demo-app)
demo-app-api:
image: mgrast/demo-app-api:latest
extra_hosts:
- "skyport.local:${SKYPORT_DOCKER_GATEWAY}"
environment:
CWL_DIR:
AWE_SERVER_URL:
SHOCK_SERVER_URL:
SKYPORT_DOCKER_GATEWAY:
ports:
- 5000:5000
depends_on:
- awe-server
- shock
volumes:
- /tmp/:/host_tmp
- ${DOCKER_BINARY}:/usr/local/bin/docker
- /var/run/docker.sock:/var/run/docker.sock
# UI for demo-app
demo-app-web:
image: mgrast/demo-app:latest
extra_hosts:
- "skyport.local:${SKYPORT_DOCKER_GATEWAY}"
environment:
CWL_DIR: ${CWL_DIR}
depends_on:
- demo-app-api
volumes:
- ${CONFIGDIR}/DemoApp/index.html:/usr/share/nginx/html/index.html:ro
- ${DOCKER_BINARY}:/usr/local/bin/docker
- /var/run/docker.sock:/var/run/docker.sock
# nginx integrates various containers and exposes required ports
nginx:
image: nginx:1.13-alpine
extra_hosts:
- "skyport.local:${SKYPORT_DOCKER_GATEWAY}"
depends_on:
- shock
- shock-browser
- adminer
- auth-server
- awe-server
- awe-monitor
- demo-app-api
- demo-app-web
ports:
- ${NGINX_PORT}:80
volumes:
- ${CONFIGDIR}/nginx/skyport-demo.conf:/etc/nginx/conf.d/default.conf:ro
- ${CONFIGDIR}/nginx/:/usr/share/nginx/html/
- ${DOCSDIR}:/usr/share/nginx/html/docs/:ro
- ${LOGDIR}/nginx/:/var/log/nginx/
# a graphical front end for MySQL useful for debugging
adminer:
image: adminer
extra_hosts:
- "skyport.local:${SKYPORT_DOCKER_GATEWAY}"
ports:
- 8080:8080
# mongoDB for the SHOCK service, provides metadata storage
mongo:
image: mongo:3.6
ports:
- 27017
# uncomment the next two lines to make SHOCK mongo data persistent
# volumes:
# - ${SHOCKDIR}/db:/data/db
# the MySQL server is a component of the auth server
#
auth-mysql:
image: mysql:5.7
command: ['--explicit_defaults_for_timestamp', '--init-file', '/tmp/dbsetup.demo.mysql']
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: DemoAppUsers
MYSQL_USER: authService
MYSQL_PASSWORD: authServicePassword
volumes:
- auth-mysql:/var/lib/mysql
- ${CONFIGDIR}/authServer/dbsetup.demo.mysql:/tmp/dbsetup.demo.mysql
#- ${AUTHDB}:/var/lib/mysql
# we use a volume (see below) to make data persistent between runs
# -
# the mongo database stores the awe server information during the run
#
# mount a volume in the mongo server to make data persistent between runs
awe-mongo:
image: mongo:3.6
ports:
- 27017
# to make the AWE jobs persistent between runs uncomment the lines below
#volumes:
# - ${SHOCKDIR}/db:/data/db
volumes:
auth-mysql: