-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgromacs-blueprint.yaml.m4
622 lines (581 loc) · 21.1 KB
/
gromacs-blueprint.yaml.m4
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
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
---
tosca_definitions_version: cloudify_dsl_1_3
description: >
Gromacs portal setup via FedCloud OCCI and Puppet.
dnl *** From gromacs-inputs.yaml.m4 take only macros, drop regular texts.
divert(`-1')dnl
include(gromacs-inputs.yaml.m4)dnl
divert(`0')dnl
define(_NODE_SERVER_, ifdef(`_CFM_',`gromacs.nodes.MonitoredServer',`gromacs.nodes.Server'))dnl
define(_NODE_HOSTPOOLSERVER_, ifdef(`_CFM_',`gromacs.nodes.MonitoredHostPoolServer',`gromacs.nodes.HostPoolServer'))dnl
define(_NODE_TORQUESERVER_, ifdef(`_CFM_',`gromacs.nodes.MonitoredTorqueServer',`gromacs.nodes.TorqueServer'))dnl
define(_NODE_WEBSERVER_, ifdef(`_CFM_',`gromacs.nodes.MonitoredWebServer', `gromacs.nodes.WebServer'))dnl
define(_NODE_SWCOMPONENT_, ifdef(`_CFM_',`gromacs.nodes.MonitoredSoftwareComponent', `gromacs.nodes.SoftwareComponent'))dnl
define(_NAME_OLINNODE_, ifelse(_PROVISIONER_,`hostpool',`olinNodeHostPool',`olinNode'))dnl
define(_NAME_WORKERNODE_, ifelse(_PROVISIONER_,`hostpool',`workerNodeHostPool',`workerNode'))dnl
define(_NAME_TORQUESERVER_, ifelse(_PROVISIONER_,`hostpool',`torqueServerHostPool',`torqueServer'))dnl
# Note: plugin/version installation for CFM handled
# in Makefile by target "cfm-plugins"
imports:
- http://www.getcloudify.org/spec/cloudify/4.3/types.yaml
- http://www.getcloudify.org/spec/diamond-plugin/1.3.1/plugin.yaml
- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-host-pool-plugin/1.5/plugin.yaml
- https://raw.githubusercontent.com/ICS-MU/westlife-cloudify-occi-plugin/0.0.15/plugin.yaml
- https://raw.githubusercontent.com/ICS-MU/westlife-cloudify-fabric-plugin/1.5.1.1/plugin.yaml
- https://raw.githubusercontent.com/ICS-MU/westlife-cloudify-westlife-workflows/master/plugin.yaml
- types/puppet.yaml
- types/server.yaml
- types/softwarecomponent.yaml
- types/torqueserver.yaml
- types/webserver.yaml
inputs:
# OCCI
occi_endpoint:
default: ''
type: string
occi_auth:
default: ''
type: string
occi_username:
default: ''
type: string
occi_password:
default: ''
type: string
occi_user_cred:
default: ''
type: string
occi_ca_path:
default: ''
type: string
occi_voms:
default: False
type: boolean
# Host pool
hostpool_service_url:
default: ''
type: string
hostpool_username:
default: 'root'
type: string
hostpool_private_key:
default: ''
type: string
# contextualization
cc_username:
default: cfy
type: string
cc_public_key:
type: string
cc_private_key:
type: string
cc_data:
default: {}
# VM parameters
olin_occi_os_tpl:
type: string
olin_occi_resource_tpl:
type: string
olin_occi_availability_zone:
type: string
olin_occi_network:
type: string
olin_occi_network_pool:
type: string
olin_occi_scratch_size:
type: integer
olin_hostpool_tags:
default: []
worker_occi_os_tpl:
type: string
worker_occi_resource_tpl:
type: string
worker_occi_availability_zone:
type: string
worker_occi_network:
type: string
worker_occi_network_pool:
type: string
worker_occi_scratch_size:
type: integer
worker_hostpool_tags:
default: []
# Application parameters
cuda_release:
type: string
gromacs_portal_servername:
type: string
gromacs_portal_ssl_enabled:
type: boolean
gromacs_portal_gromacs_cpu_nr:
type: integer
gromacs_portal_admin_email:
type: string
gromacs_portal_gromacs_cpu_nr:
type: integer
gromacs_portal_user_storetime:
type: integer
gromacs_portal_user_maxjob:
type: integer
gromacs_portal_user_simtime:
type: float
gromacs_portal_dyndns_enabled:
type: boolean
gromacs_portal_dyndns_hostname:
type: string
gromacs_portal_dyndns_server:
type: string
gromacs_portal_dyndns_login:
type: string
gromacs_portal_dyndns_password:
type: string
gromacs_portal_dyndns_ssl:
type: string
gromacs_portal_auth_enabled:
type: boolean
gromacs_portal_auth_service_key_b64:
type: string
gromacs_portal_auth_service_cert_b64:
type: string
gromacs_portal_auth_service_meta_b64:
type: string
gromacs_user_public_key:
type: string
gromacs_user_private_key_b64:
type: string
dsl_definitions:
occi_configuration: &occi_configuration
endpoint: { get_input: occi_endpoint }
auth: { get_input: occi_auth }
username: { get_input: occi_username }
password: { get_input: occi_password }
user_cred: { get_input: occi_user_cred }
ca_path: { get_input: occi_ca_path }
voms: { get_input: occi_voms }
cloud_configuration: &cloud_configuration
username: { get_input: cc_username }
public_key: { get_input: cc_public_key }
data: { get_input: cc_data }
fabric_env: &fabric_env
user: { get_input: cc_username }
key: { get_input: cc_private_key }
fabric_env_hostpool: &fabric_env_hostpool
user: { get_input: hostpool_username }
key: { get_input: hostpool_private_key }
agent_configuration: &agent_configuration
install_method: remote
user: { get_input: cc_username }
key: { get_input: cc_private_key }
agent_configuration_hostpool: &agent_configuration_hostpool
install_method: remote
user: { get_input: hostpool_username }
key: { get_input: hostpool_private_key }
puppet_config: &puppet_config
repo: 'https://yum.puppetlabs.com/puppet5/puppet5-release-el-7.noarch.rpm'
package: 'puppet-agent'
download: resources/puppet.tar.gz
plugin_resources: &plugin_resources
description: >
Holds any archives that should be uploaded to the manager.
default:
- 'https://github.com/ICS-MU/westlife-cloudify-occi-plugin/releases/download/0.0.14/cloudify_occi_plugin-0.0.14-py27-none-linux_x86_64.wgn'
node_templates:
ifelse(_PROVISIONER_,`hostpool',`
### Predeployed nodes #######################################################
# predeployed olin (frontend)
olinNodeHostPool:
type: _NODE_HOSTPOOLSERVER_
properties:
agent_config: *agent_configuration_hostpool
fabric_env: *fabric_env_hostpool
hostpool_service_url: { get_input: hostpool_service_url }
filters:
tags: { get_input: olin_hostpool_tags }
gromacsPortalHostPool:
type: _NODE_WEBSERVER_
instances:
deploy: 1
properties:
fabric_env: *fabric_env_hostpool
puppet_config:
<<: *puppet_config
manifests:
start: manifests/gromacs_portal.pp
delete: manifests/gromacs_portal.pp
hiera:
gromacs::portal::servername: { get_input: gromacs_portal_servername }
gromacs::portal::ssl_enabled: { get_input: gromacs_portal_ssl_enabled }
gromacs::portal::admin_email: { get_input: gromacs_portal_admin_email }
gromacs::portal::gromacs_cpu_nr: { get_input: gromacs_portal_gromacs_cpu_nr }
gromacs::portal::user_storetime: { get_input: gromacs_portal_user_storetime }
gromacs::portal::user_maxjob: { get_input: gromacs_portal_user_maxjob }
gromacs::portal::user_simtime: { get_input: gromacs_portal_user_simtime }
gromacs::portal::auth_enabled: { get_input: gromacs_portal_auth_enabled }
gromacs::portal::auth_service_key_b64: { get_input: gromacs_portal_auth_service_key_b64 }
gromacs::portal::auth_service_cert_b64: { get_input: gromacs_portal_auth_service_cert_b64 }
gromacs::portal::auth_service_meta_b64: { get_input: gromacs_portal_auth_service_meta_b64 }
gromacs::portal::dyndns_enabled: { get_input: gromacs_portal_dyndns_enabled }
gromacs::portal::dyndns_hostname: { get_input: gromacs_portal_dyndns_hostname }
gromacs::portal::dyndns_server: { get_input: gromacs_portal_dyndns_server }
gromacs::portal::dyndns_login: { get_input: gromacs_portal_dyndns_login }
gromacs::portal::dyndns_password: { get_input: gromacs_portal_dyndns_password }
gromacs::portal::dyndns_ssl: { get_input: gromacs_portal_dyndns_ssl }
gromacs::user::public_key: { get_input: gromacs_user_public_key }
gromacs::user::private_key_b64: { get_input: gromacs_user_private_key_b64 }
westlife::postfix::root_recipient: { get_input: gromacs_portal_admin_email }
westlife::postfix::gromacs_recipient: { get_input: gromacs_portal_admin_email }
#westlife::volume::device: /dev/vdc
westlife::volume::fstype: ext4
westlife::volume::mountpoint: /data
westlife::volume::mode: "1777"
relationships:
- type: cloudify.relationships.contained_in
target: olinNodeHostPool
- type: gromacs.relationships.puppet.connected_to
target: torqueServerHostPool
torqueServerHostPool:
type: _NODE_TORQUESERVER_
instances:
deploy: 1
properties:
fabric_env: *fabric_env_hostpool
puppet_config:
<<: *puppet_config
manifests:
start: manifests/torque_server.pp
delete: manifests/torque_server.pp
relationships:
- type: cloudify.relationships.contained_in
target: olinNodeHostPool
# predeployed worker node
workerNodeHostPool:
type: _NODE_HOSTPOOLSERVER_
properties:
agent_config: *agent_configuration_hostpool
fabric_env: *fabric_env_hostpool
hostpool_service_url: { get_input: hostpool_service_url }
filters:
tags: { get_input: worker_hostpool_tags }
torqueMomHostPool:
type: _NODE_SWCOMPONENT_
instances:
deploy: 1
properties:
fabric_env: *fabric_env_hostpool
puppet_config:
<<: *puppet_config
manifests:
start: manifests/torque_mom.pp
delete: manifests/torque_mom.pp
hiera:
westlife::volume::mountpoint: /scratch
westlife::volume::mode: "1777"
relationships:
- type: cloudify.relationships.contained_in
target: workerNodeHostPool
- type: cloudify.relationships.depends_on
target: gromacsHostPool
- type: gromacs.relationships.puppet.connected_to
target: torqueServerHostPool
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
postconfigure:
inputs:
manifest: manifests/torque_mom.pp # nastaveni jmena/np mom na serveru
unlink:
inputs:
manifest: manifests/torque_mom.pp # zruseni np mom na serveru
target_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
inputs:
manifest: manifests/torque_server.pp # nastaveni ::torque_sever_name
establish:
inputs:
manifest: manifests/torque_server.pp # rekonfigurace serveru
unlink:
inputs:
manifest: manifests/torque_server.pp # rekonfigurace serveru
gromacsHostPool:
type: _NODE_SWCOMPONENT_
instances:
deploy: 1
properties:
fabric_env: *fabric_env_hostpool
puppet_config:
<<: *puppet_config
manifests:
start: manifests/gromacs.pp
delete: manifests/gromacs.pp
hiera:
cuda::release: { get_input: cuda_release }
gromacs::user::public_key: { get_input: gromacs_user_public_key }
gromacs::user::private_key_b64: { get_input: gromacs_user_private_key_b64 }
relationships:
- type: cloudify.relationships.contained_in
target: workerNodeHostPool
',_PROVISIONER_,`occi',`
### OCCI nodes #############################################################
# olin (frontend)
olinNode:
type: _NODE_SERVER_
properties:
name: "Gromacs all-in-one server node"
resource_config:
os_tpl: { get_input: olin_occi_os_tpl }
resource_tpl: { get_input: olin_occi_resource_tpl }
availability_zone: { get_input: olin_occi_availability_zone }
network: { get_input: olin_occi_network }
network_pool: { get_input: olin_occi_network_pool }
agent_config: *agent_configuration
cloud_config: *cloud_configuration
occi_config: *occi_configuration
fabric_env: *fabric_env
olinStorage:
type: cloudify.occi.nodes.Volume
properties:
size: { get_input: olin_occi_scratch_size }
availability_zone: { get_input: olin_occi_availability_zone }
occi_config: *occi_configuration
interfaces:
cloudify.interfaces.lifecycle:
delete:
inputs:
wait_finish: false
relationships:
- type: cloudify.occi.relationships.volume_contained_in_server
target: olinNode
target_interfaces:
cloudify.interfaces.relationship_lifecycle:
unlink:
inputs:
skip_action: true
gromacsPortal:
type: _NODE_WEBSERVER_
instances:
deploy: 1
properties:
fabric_env: *fabric_env
puppet_config:
<<: *puppet_config
manifests:
start: manifests/gromacs_portal.pp
hiera:
gromacs::portal::servername: { get_input: gromacs_portal_servername }
gromacs::portal::ssl_enabled: { get_input: gromacs_portal_ssl_enabled }
gromacs::portal::admin_email: { get_input: gromacs_portal_admin_email }
gromacs::portal::gromacs_cpu_nr: { get_input: gromacs_portal_gromacs_cpu_nr }
gromacs::portal::user_storetime: { get_input: gromacs_portal_user_storetime }
gromacs::portal::user_maxjob: { get_input: gromacs_portal_user_maxjob }
gromacs::portal::user_simtime: { get_input: gromacs_portal_user_simtime }
gromacs::portal::auth_enabled: { get_input: gromacs_portal_auth_enabled }
gromacs::portal::auth_service_key_b64: { get_input: gromacs_portal_auth_service_key_b64 }
gromacs::portal::auth_service_cert_b64: { get_input: gromacs_portal_auth_service_cert_b64 }
gromacs::portal::auth_service_meta_b64: { get_input: gromacs_portal_auth_service_meta_b64 }
gromacs::portal::dyndns_enabled: { get_input: gromacs_portal_dyndns_enabled }
gromacs::portal::dyndns_hostname: { get_input: gromacs_portal_dyndns_hostname }
gromacs::portal::dyndns_server: { get_input: gromacs_portal_dyndns_server }
gromacs::portal::dyndns_login: { get_input: gromacs_portal_dyndns_login }
gromacs::portal::dyndns_password: { get_input: gromacs_portal_dyndns_password }
gromacs::portal::dyndns_ssl: { get_input: gromacs_portal_dyndns_ssl }
gromacs::user::public_key: { get_input: gromacs_user_public_key }
gromacs::user::private_key_b64: { get_input: gromacs_user_private_key_b64 }
westlife::postfix::root_recipient: { get_input: gromacs_portal_admin_email }
westlife::postfix::gromacs_recipient: { get_input: gromacs_portal_admin_email }
westlife::volume::device: /dev/vdc
westlife::volume::fstype: ext4
westlife::volume::mountpoint: /data
westlife::volume::mode: "1777"
relationships:
- type: cloudify.relationships.contained_in
target: olinNode
- type: gromacs.relationships.puppet.connected_to
target: torqueServer
- type: cloudify.relationships.depends_on
target: olinStorage
torqueServer:
type: _NODE_TORQUESERVER_
instances:
deploy: 1
properties:
fabric_env: *fabric_env
puppet_config:
<<: *puppet_config
manifests:
start: manifests/torque_server.pp
relationships:
- type: cloudify.relationships.contained_in
target: olinNode
- type: cloudify.relationships.depends_on
target: olinStorage
# worker node running on cloud (OCCI)
workerNode:
type: _NODE_SERVER_
properties:
name: "Gromacs worker node"
resource_config:
os_tpl: { get_input: worker_occi_os_tpl }
resource_tpl: { get_input: worker_occi_resource_tpl }
availability_zone: { get_input: worker_occi_availability_zone }
network: { get_input: worker_occi_network }
network_pool: { get_input: worker_occi_network_pool }
agent_config: *agent_configuration
cloud_config: *cloud_configuration
occi_config: *occi_configuration
fabric_env: *fabric_env
workerScratch:
type: cloudify.occi.nodes.Volume
properties:
size: { get_input: worker_occi_scratch_size }
availability_zone: { get_input: worker_occi_availability_zone }
occi_config: *occi_configuration
interfaces:
cloudify.interfaces.lifecycle:
delete:
inputs:
wait_finish: false
relationships:
- type: cloudify.occi.relationships.volume_contained_in_server
target: workerNode
target_interfaces:
cloudify.interfaces.relationship_lifecycle:
unlink:
inputs:
skip_action: true
torqueMom:
type: _NODE_SWCOMPONENT_
instances:
deploy: 1
properties:
fabric_env: *fabric_env
puppet_config:
<<: *puppet_config
manifests:
start: manifests/torque_mom.pp
hiera:
westlife::volume::device: /dev/vdc
westlife::volume::fstype: ext4
westlife::volume::mountpoint: /scratch
westlife::volume::mode: "1777"
relationships:
- type: cloudify.relationships.contained_in
target: workerNode
- type: cloudify.relationships.depends_on
target: workerScratch
- type: cloudify.relationships.depends_on
target: gromacs
- type: gromacs.relationships.puppet.connected_to
target: torqueServer
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
postconfigure:
inputs:
manifest: manifests/torque_mom.pp # nastaveni jmena/np mom na serveru
unlink:
inputs:
manifest: manifests/torque_mom.pp # zruseni np mom na serveru
target_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
inputs:
manifest: manifests/torque_server.pp # nastaveni ::torque_sever_name
establish:
inputs:
manifest: manifests/torque_server.pp # rekonfigurace serveru
unlink:
inputs:
manifest: manifests/torque_server.pp # rekonfigurace serveru
gromacs:
type: _NODE_SWCOMPONENT_
instances:
deploy: 1
properties:
fabric_env: *fabric_env
puppet_config:
<<: *puppet_config
manifests:
start: manifests/gromacs.pp
hiera:
cuda::release: { get_input: cuda_release }
gromacs::user::public_key: { get_input: gromacs_user_public_key }
gromacs::user::private_key_b64: { get_input: gromacs_user_private_key_b64 }
relationships:
- type: cloudify.relationships.contained_in
target: workerNode
- type: cloudify.relationships.depends_on
target: workerScratch
',`errprint(Missing definition of _PROVISIONER_ in the inputs
)m4exit(1)')
groups:
workerNodes:
members: [_NAME_WORKERNODE_]
healWorkerNodes:
members: [_NAME_WORKERNODE_]
#members: [workerNodes]
policies:
simple_autoheal_policy:
type: cloudify.policies.types.host_failure
properties:
service:
- .*_NAME_WORKERNODE_.*.cpu.total.system
interval_between_workflows: 1800
triggers:
auto_heal_trigger:
type: cloudify.policies.triggers.execute_workflow
parameters:
workflow: heal
workflow_parameters:
node_instance_id: { 'get_property': [ SELF, node_id ] }
diagnose_value: { 'get_property': [ SELF, diagnose ] }
scaleWorkerNodes:
members: [_NAME_TORQUESERVER_]
policies:
out:
type: cloudify.policies.types.threshold
properties:
stability_time: 600
upper_bound: true
threshold: 2
service: '.*torque.jobs.queued$'
interval_between_workflows: 1800
triggers:
execute_scale_workflow:
type: cloudify.policies.triggers.execute_workflow
parameters:
workflow: scale_min_max
workflow_parameters:
delta: 1
scalable_entity_name: workerNodes
scale_compute: true
max_instances: _WORKERS_MAX_
in:
type: cloudify.policies.types.threshold
properties:
stability_time: 600
upper_bound: false
threshold: 0
service: '.*torque.nodes.busy$'
interval_between_workflows: 1800
triggers:
execute_scale_workflow:
type: cloudify.policies.triggers.execute_workflow
parameters:
workflow: scale_min_max
workflow_parameters:
delta: -1
scalable_entity_name: workerNodes
scale_compute: true
min_instances: _WORKERS_MIN_
policies:
scaleWorkerNodes:
type: cloudify.policies.scaling
targets: [workerNodes]
properties:
default_instances: _WORKERS_
min_instances: _WORKERS_MIN_
max_instances: _WORKERS_MAX_
outputs:
web_endpoint:
description: Gromacs portal endpoint
value: { concat: ['http://', { get_attribute: [_NAME_OLINNODE_, ip] }] }
# vim: set syntax=yaml