-
Notifications
You must be signed in to change notification settings - Fork 9
/
dariah_repository.yaml
326 lines (282 loc) · 8.72 KB
/
dariah_repository.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
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- indigo_custom_types: https://raw.githubusercontent.com/indigo-dc/tosca-types/master/custom_types.yaml
description: TOSCA template for deploying the Dariah Repository on top of a Mesos cluster using Marathon
topology_template:
inputs:
marathon_password:
type: string
description: Admin password for accessing Marathon HTTP service
default: 's3cret'
required: yes
storage_size:
type: scalar-unit.size
description: Amount of total disk resource
default: 50 GB
required: yes
cache_cpus:
type: float
description: Number of CPUs for cache (redis) container
required: no
default: 1.0
cache_mem:
type: integer
description: RAM in MB for cache container
required: no
default: 1024
cache_image:
type: string
description: docker image for cache container
required: no
default: 'redis'
db_cpus:
type: float
description: Number of CPUs for DB (postgres) container
required: no
default: 1.0
db_mem:
type: integer
description: RAM in MB for DB container
required: no
default: 1024
db_image:
type: string
description: docker image for DB container
required: no
default: 'postgres'
es_cpus:
type: float
description: Number of CPUs for elasticsearch container
required: no
default: 1.0
es_mem:
type: integer
description: RAM in MB for elasticsearch container
required: no
default: 1024
es_image:
type: string
description: docker image for elasticsearch container
required: no
default: 'indigodatacloudapps/dariah-repository:elasticsearch'
mq_cpus:
type: float
description: Number of CPUs for rabbitmq container
required: no
default: 1.0
mq_mem:
type: integer
description: RAM in MB for rabbitmq container
required: no
default: 1024
mq_image:
type: string
description: docker image for rabbitmq container
required: no
default: 'rabbitmq:3-management'
statsd_cpus:
type: float
description: Number of CPUs for statsd container
required: no
default: 1.0
statsd_mem:
type: integer
description: RAM in MB for statsd container
required: no
default: 1024
statsd_image:
type: string
description: docker image for statsd container
required: no
default: 'indigodatacloudapps/dariah-repository:statsd'
web_cpus:
type: float
description: Number of CPUs for web container
required: no
default: 1.0
web_mem:
type: integer
description: RAM in MB for web container
required: no
default: 1024
web_image:
type: string
description: docker image for web container
required: no
default: 'indigodatacloudapps/dariah-repository:web'
worker_cpus:
type: float
description: Number of CPUs for celery worker container
required: no
default: 1.0
worker_mem:
type: integer
description: RAM in MB for celery worker container
required: no
default: 1024
worker_image:
type: string
description: docker image for celery worker container
required: no
default: 'indigodatacloudapps/dariah-repository:web'
slave_num:
type: integer
description: Number of slave nodes in the cluster
default: 4
required: yes
slave_cpus:
type: integer
description: Numer of CPUs for the slave node
default: 2
required: yes
slave_mem:
type: scalar-unit.size
description: Amount of Memory for the slave node
default: 4 GB
required: yes
master_cpus:
type: integer
description: Numer of CPUs for the master node
default: 2
required: yes
master_mem:
type: scalar-unit.size
description: Amount of Memory for the master node
default: 4 GB
required: yes
node_templates:
dariah_repository:
type: tosca.nodes.indigo.DariahRepository
properties:
marathon_password: { get_input: marathon_password }
cache_cpus: { get_input: cache_cpus }
cache_mem: { get_input: cache_mem }
cache_image: { get_input: cache_image }
db_cpus: { get_input: db_cpus }
db_mem: { get_input: db_mem }
db_image: { get_input: db_image }
es_cpus: { get_input: es_cpus }
es_mem: { get_input: es_mem }
es_image: { get_input: es_image }
mq_cpus: { get_input: mq_cpus }
mq_mem: { get_input: mq_mem }
mq_image: { get_input: mq_image }
statsd_cpus: { get_input: statsd_cpus }
statsd_mem: { get_input: statsd_mem }
statsd_image: { get_input: statsd_image }
web_cpus: { get_input: web_cpus }
web_mem: { get_input: web_mem }
web_image: { get_input: web_image }
worker_cpus: { get_input: worker_cpus }
worker_mem: { get_input: worker_mem }
worker_image: { get_input: worker_image }
requirements:
- host: mesos_master
mesos_master:
type: tosca.nodes.indigo.MesosMaster
properties:
marathon_password: { get_input: marathon_password }
enable_chronos: false
wn_ips: { get_attribute: [ mesos_slave_server, public_address ] }
mesos_masters_list: { get_attribute: [ HOST, public_address ] }
enable_nfs_share: true
requirements:
- host: mesos_master_server
mesos_slave:
type: tosca.nodes.indigo.MesosSlave
properties:
master_ips: { get_attribute: [ mesos_master_server, public_address ] }
front_end_ip: { get_attribute: [ mesos_master_server, public_address, 0 ] }
enable_nfs_share: true
requirements:
- host: mesos_slave_server
mesos_load_balancer:
type: tosca.nodes.indigo.MesosLoadBalancer
properties:
master_ips: { get_attribute: [ mesos_master_server, public_address ] }
marathon_password: { get_input: marathon_password }
requirements:
- host: mesos_lb_server
mesos_master_server:
type: tosca.nodes.indigo.Compute
capabilities:
endpoint:
properties:
dns_name: mesosserverpublic
network_name: PUBLIC
ports:
mesos_port:
protocol: tcp
source: 5050
marathon_port:
protocol: tcp
source: 8443
scalable:
properties:
count: 1
host:
properties:
num_cpus: { get_input: master_cpus }
mem_size: { get_input: master_mem }
os:
properties:
image: linux-ubuntu-14.04-vmi
requirements:
# contextually this can only be a relationship type
- local_storage:
# capability is provided by Compute Node Type
capability: tosca.capabilities.Attachment
node: block_device
relationship:
type: tosca.relationships.AttachesTo
properties:
location: /data
device: vdb
block_device:
type: tosca.nodes.BlockStorage
properties:
size: { get_input: storage_size }
mesos_slave_server:
type: tosca.nodes.indigo.Compute
capabilities:
scalable:
properties:
count: { get_input: slave_num }
host:
properties:
num_cpus: { get_input: slave_cpus }
mem_size: { get_input: slave_mem }
os:
properties:
image: linux-ubuntu-14.04-vmi
mesos_lb_server:
type: tosca.nodes.indigo.Compute
capabilities:
endpoint:
properties:
network_name: PUBLIC
ports:
all_tcp:
protocol: tcp
source_range: [ 1, 65535 ]
scalable:
properties:
count: 1
host:
properties:
num_cpus: 2
mem_size: 2 GB
os:
properties:
image: linux-ubuntu-14.04-vmi
outputs:
mesos_lb_ips:
value: { get_attribute: [ mesos_lb_server, public_address ] }
mesos_master_ips:
value: { get_attribute: [ mesos_master_server, public_address ] }
zenodo_http_endpoint:
value: { concat: [ 'http://', get_attribute: [ mesos_lb_server, public_address, 0 ], ':5000' ] }
zenodo_https_endpoint:
value: { concat: [ 'https://', get_attribute: [ mesos_lb_server, public_address, 0 ] ] }
marathon_endpoint:
value: { concat: [ 'https://', get_attribute: [ mesos_master_server, public_address, 0 ], ':8443' ] }