-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-scone-avalon.yaml
245 lines (233 loc) · 6.07 KB
/
docker-compose-scone-avalon.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
# Copyright 2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: '3.5'
networks:
avalon-network:
external:
name: avalon-network
services:
avalon-shell:
container_name: avalon-shell
image: avalon-shell-dev
build:
context: .
dockerfile: ./docker/Dockerfile
args:
- DISPLAY=${DISPLAY:-}
- XAUTHORITY=~/.Xauthority
- http_proxy
- https_proxy
- no_proxy
environment:
- DISPLAY
- http_proxy
- https_proxy
- no_proxy
- KME_SESSION=$KME_SESSION_NAME
volumes:
# Below volume mappings are required for DISPLAY settings by heart disease GUI client
- /tmp/.X11-unix:/tmp/.X11-unix
- ~/.Xauthority:/root/.Xauthority
command: |
bash -c "tail -f /dev/null"
stop_signal: SIGKILL
depends_on:
- avalon-listener
networks:
- avalon-network
avalon-lmdb:
container_name: avalon-lmdb
image: avalon-lmdb-dev
build:
context: .
dockerfile: ./shared_kv_storage/Dockerfile
args:
- http_proxy
- https_proxy
- no_proxy
environment:
- http_proxy
- https_proxy
- no_proxy
expose:
# Port is where lmdb server will listen for http request.
# Port should be same as in bind parameter or lmdb_config.toml
- 9090
command: |
bash -c "
kv_storage --bind http://avalon-lmdb:9090
tail -f /dev/null
"
networks:
- avalon-network
avalon-listener:
container_name: avalon-listener
image: avalon-listener-dev
build:
context: .
dockerfile: ./listener/Dockerfile
args:
- http_proxy
- https_proxy
- no_proxy
environment:
- http_proxy
- https_proxy
- no_proxy
expose:
- 1947
# ZMQ socket port.
- 5555
command: |
bash -c "
avalon_listener --bind http://avalon-listener:1947 --lmdb_url http://avalon-lmdb:9090
tail -f /dev/null
"
depends_on:
- avalon-lmdb
networks:
- avalon-network
avalon-enclave-manager:
container_name: avalon-enclave-manager
image: avalon-enclave-manager-scone-dev
build:
context: .
dockerfile: ./avalon-scone/worker_manager/Dockerfile-scone
args:
- http_proxy
- https_proxy
- no_proxy
- ENCLAVE_TYPE=scone
environment:
- http_proxy
- https_proxy
- no_proxy
expose:
# ZMQ socket port to receive work orders from Avalon listener.
- 5555
# ZMQ socket port to communicate with scone python worker
- 7777
command: |
bash -c "
enclave_manager --lmdb_url http://avalon-lmdb:9090
tail -f /dev/null
"
depends_on:
- avalon-lmdb
networks:
- avalon-network
scone-kme:
container_name: scone-kme
image: avalon-scone-kme-dev
devices:
- "/dev/isgx:/dev/isgx"
expose:
- 5000
# The argument $KME_SESSION_NAME is the session of KME on CAS it should be set as env variable for client
command: |
bash -c "
SCONE_MODE=HW SCONE_ALPINE=1 SCONE_VERSION=1 SCONE_HEAP=4G SCONE_ALLOW_DLOPEN=1 SCONE_CONFIG_ID=$KME_SESSION_NAME/certificate-generation python3
"
# command: |
# bash -c "tail -f /dev/null"
stop_signal: SIGKILL
networks:
- avalon-network
scone-worker-1:
container_name: scone-worker-1
image: avalon-scone-worker-dev
environment:
- http_proxy
- https_proxy
- no_proxy
devices:
- "/dev/isgx:/dev/isgx"
expose:
# ZMQ socket port used to communicate with scone python worker.
- 7777
# Need to pass full path of file to python interpreter.
# Pass ZMQ URL to listen for requests. Bind to all available interfaces.
command: |
bash -c "
bash /entrypoint.sh scone-worker-1
"
# command: |
# bash -c "
# wo-processor --bind "tcp://*:7777"
# "
# command: |
# bash -c "tail -f /dev/null"
stop_signal: SIGKILL
depends_on:
- scone-kme
networks:
- avalon-network
scone-worker-2:
container_name: scone-worker-2
image: avalon-scone-worker-dev
environment:
- http_proxy
- https_proxy
- no_proxy
devices:
- "/dev/isgx:/dev/isgx"
expose:
# ZMQ socket port used to communicate with scone python worker.
- 7777
# Need to pass full path of file to python interpreter.
# Pass ZMQ URL to listen for requests. Bind to all available interfaces.
command: |
bash -c "
bash /entrypoint.sh scone-worker-2
"
# command: |
# bash -c "
# wo-processor --bind "tcp://*:7777"
# "
# command: |
# bash -c "tail -f /dev/null"
stop_signal: SIGKILL
depends_on:
- scone-kme
networks:
- avalon-network
scone-worker-3:
container_name: scone-worker-3
image: avalon-scone-worker-dev
environment:
- http_proxy
- https_proxy
- no_proxy
devices:
- "/dev/isgx:/dev/isgx"
expose:
# ZMQ socket port used to communicate with scone python worker.
- 7777
# Need to pass full path of file to python interpreter.
# Pass ZMQ URL to listen for requests. Bind to all available interfaces.
command: |
bash -c "
bash /entrypoint.sh scone-worker-3
"
# command: |
# bash -c "
# wo-processor --bind "tcp://*:7777"
# "
# command: |
# bash -c "tail -f /dev/null"
stop_signal: SIGKILL
depends_on:
- scone-kme
networks:
- avalon-network