-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathplugin.yaml
852 lines (803 loc) · 31.5 KB
/
plugin.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
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
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
########
# Copyright (c) 2019 Atos Spain SA. All rights reserved.
#
# This file is part of Croupier.
#
# Croupier is free software: you can redistribute it and/or modify it
# under the terms of the Apache License, Version 2.0 (the License) License.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT, IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
# OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# See README file for full disclaimer information and LICENSE file for full
# license information in the project root.
#
# @author: Javier Carnero
# Atos Research & Innovation, Atos Spain S.A.
# e-mail: [email protected]
# @author: Jesus Gorronogoitia
# Atos Research & Innovation, Atos Spain S.A.
# e-mail: [email protected]
# @author: Jesus Ramos Rivas
# Atos Research & Innovation, Atos Spain S.A.
# e-mail: [email protected]
#
# plugin.yaml
plugins:
croupier:
executor: central_deployment_agent
# URL to archive containing the plugin or name of directory containing
# the plugin if it is included in the blueprint directory under the
# "plugins" directory.
source: https://github.com/ari-apc-lab/croupier/archive/master.zip
install_arguments: -r plugin-requirements.txt
package_name: croupier
package_version: "3.3.0"
data_types:
croupier.datatypes.wm_config:
properties:
infrastructure_interface:
description: Scheduler type.
type: string
required: true
country_tz:
description: Timezone
type: string
required: false
default: 'GMT'
reservation_deletion_path:
description: Path where the executable to delete a reservation is located
type: string
required: false
default: '/opt/cesga/sistemas/reservas/sresdelete'
croupier.datatypes.monitoring_options:
properties:
monitor_period:
description: How often to scrape the WM for metrics
type: integer
required: false
default: 15
deployment_label:
description: Deployment label to apply to the metrics to identify the deployment.
type: string
required: false
hpc_label:
description: HPC label to apply to the metrics to identify the HPC WM
type: string
required: false
only_jobs:
description: Set to true to not monitor the infrastructure metrics (queues/partitions)
type: boolean
required: false
default: false
croupier.datatypes.accounting_options:
properties:
reporting_user:
type: string
required: false
croupier.datatypes.job_deployment_config:
properties:
inputs:
default: []
required: false
bootstrap:
default: ''
required: false
type: string
revert:
default: ''
required: false
type: string
croupier.datatypes.dataset:
properties:
config:
type: croupier.datatypes.dataset_config
required: true
dataset:
type: croupier.datatypes.dataset_dataset
required: true
type:
type: string
required: true
croupier.datatypes.dataset_config:
properties:
api_key:
type: string
croupier.datatypes.dataset_dataset:
properties:
name:
type: string
croupier.datatypes.ecmwf_query:
properties:
area:
type: string
required: true
params:
type: string
required: true
date:
type: string
required: false
default: ""
time:
type: string
required: false
default: ""
collection:
type: string
required: false
default: ""
members:
type: string
required: false
default: ""
ensemble:
type: string
required: false
default: ""
input:
type: string
required: false
default: ""
keep_input:
type: string
required: false
default: ""
algorithm:
type: string
required: false
default: ""
max_step:
type: string
required: false
default: "1"
croupier.datatypes.job.Options:
properties:
commands:
description: 'List of commands to be included in job submission script. It is incompatible with script property'
type: list
required: false #Either commands or script must be present
remote_script:
description: 'Script, present in the HPC workdir, to be launched with job submission. It is incompatible with commands/local_script property'
type: string
required: false #Either commands or script must be present
local_script:
description: 'Script to be uploaded from the blueprint folder and launched with job submission. It is incompatible with commands/remote_script property'
type: string
required: false #Either commands or script must be present
arguments:
description: 'List of arguments to be sent to the remote_script or local_script'
type: list
required: false
nodes:
description: '(SLURM|TORQUE) Controls the minimum/maximum number of nodes allocated to the job'
type: integer
required: false
tasks:
description: '(SLURM) Controls the number of tasks to be created for the job'
type: integer
required: false
tasks_per_node:
description: '(SLURM) Controls the maximum number of tasks per allocated node. (TORQUE) Processors per node'
type: integer
required: false
max_time:
description: 'Walltime (TORQUE) or Maxtime (SLURM) for job'
type: string
required: false
partition:
description: '(SLURM) partition where to submit the job to'
type: string
required: false
queue:
description: '(TORQUE) partition where to submit the job to'
type: string
required: false
scale:
description: 'Specifies the task ids of a job array TORQUE (-t 0-XX), SLURM (--array=0-XX)'
type: integer
required: false
memory:
description: 'Maximum amount of physical memory used by the job TORQUE (-l mem=XX), SLURM (--mem=XX)'
type: integer
required: false
mail_user:
description: 'Declares the list of users to whom mail is sent by the execution server when it sends mail about the job. TORQUE (-M XX), SLURM (--mail-user=XX)'
type: string
required: false
mail_type:
description: 'Defines the set of conditions under which the execution server will send a mail message about the job. TORQUE (-m XX), SLURM (--mail-type=XX)'
type: string
required: false
account:
description: 'Defines the account string associated with the job TORQUE (-A XX), SLURM (--A XX)'
type: string
required: false
stderr_file:
description: 'Defines the path to be used for the standard error stream of the batch job TORQUE|SLURM (-e XX)'
type: string
required: false
stdout_file:
description: 'Defines the path to be used for the standard output stream of the batch job TORQUE|SLURM (-o XX)'
type: string
required: false
group_name:
description: 'FIXME: Not used, but read by TORQUE'
type: string
required: false
scale_max_in_parallel:
description: ''
type: integer
required: false
reservation:
description: 'To launch a job in the context of a reservation SLURM (--reservation=XX)'
type: string
required: false
qos:
description: 'The quality of service associated with a job SLURM (--qos=XX)'
type: string
required: false
# DATA MANAGEMENT
croupier.datatypes.Credentials:
properties:
host:
description: 'Host for which the credentials are for'
type: string
required: false
default: ''
user:
description: 'Account username'
type: string
required: false
default: ''
password:
description: 'Account password'
type: string
required: false
default: ''
auth-header:
type: string
required: false
default: ''
description: 'Auth header for http calls, for example API tokens'
auth-header-label:
type: string
required: false
default: 'Authorization'
description: 'Label to use for authenticating calls to the API'
private_key:
description: 'User private key'
type: string
required: false
default: ''
private_key_password:
description: 'Password for User private key'
type: string
required: false
default: ''
ssh_port:
type: integer
required: false
default: 22
ssh_tunnel:
type: string
required: false
default: ''
ssh_login_shell:
type: string
required: false
default: ''
croupier.datatypes.dm.GridFTPCredentials:
derived_from: croupier.datatypes.Credentials
properties:
cert:
description: "GridFTP user's certificate"
type: string
required: false
default: ''
cert_password:
description: "Password for GripFTP user's certificate"
type: string
required: false
default: ''
croupier.datatypes.dm.HPCWorkspace:
properties:
name:
description: 'workspace name'
type: string
required: true
create:
description: 'whether or not to create a workspace in the HPC where to copy data'
type: boolean
required: false
default: false
lifetime:
description: 'defines the number of days between the creation of the workspace until its automatic deletion.'
type: integer
required: false
default: 1
croupier.datatypes.ckan_dataset:
properties:
name:
type: string
required: false
default: ""
package_id:
type: string
required: false
default: ""
title:
type: string
required: false
default: ""
private:
type: boolean
required: false
default: true
author:
type: string
required: false
default: ""
author_email:
type: string
required: false
default: ""
maintainer:
type: string
required: false
default: ""
maintainer_email:
type: string
required: false
default: ""
license_id:
type: string
required: false
default: ""
notes:
type: string
required: false
default: ""
version:
type: string
required: false
default: ""
tags:
type: list
required: false
default: []
owner_org:
type: string
required: false
default: ""
croupier.datatypes.ckan_resource:
properties:
name:
type: string
required: false
default: ""
url:
type: string
required: false
default: ""
description:
type: string
required: false
default: ""
type:
type: string
required: false
default: ""
format:
type: string
required: false
default: ""
workflows:
run_jobs:
mapping: croupier.croupier_plugin.workflows.run_jobs
croupier_install:
mapping: croupier.croupier_plugin.workflows.croupier_install
croupier_configure:
mapping: croupier.croupier_plugin.workflows.croupier_configure
node_types:
croupier.nodes.InfrastructureInterface:
derived_from: cloudify.nodes.Compute
properties:
config:
description: type
type: croupier.datatypes.wm_config
credentials:
description: SSH configuration
type: croupier.datatypes.Credentials
default: {}
job_prefix:
description: Job name prefix for this HPC
default: "croupier"
type: string
base_dir:
description: Root directory of all executions
default: "$HOME"
type: string
workdir_prefix:
description: Prefix of the working directory instead of blueprint name
default: ""
type: string
monitoring_options:
description: Monitoring options
default: {}
type: croupier.datatypes.monitoring_options
accounting_options:
description: Accounting options
default: {}
type: croupier.datatypes.accounting_options
simulate:
description: Set to true to simulate job without sending it
type: boolean
default: False
skip_cleanup:
description: True to not clean all files at deployment removal
type: boolean
default: False
recurring_workflow:
description: True if the workflow is scheduled to run recurrently
type : boolean
default: False
required: False
internet_access:
description: True if HPC has access to the internet
type: boolean
default: False
required: False
supported_prtocols:
type: list
default: []
description: List of protocols supported for data management
agent_config:
default:
install_method: none
interfaces:
cloudify.interfaces.lifecycle:
configure:
implementation: croupier.croupier_plugin.tasks.configure_execution
inputs:
config:
default: { get_property: [SELF, config] }
credentials:
default: { get_property: [SELF, credentials] }
base_dir:
default: { get_property: [SELF, base_dir] }
workdir_prefix:
default: { get_property: [SELF, workdir_prefix] }
monitoring_options:
default: { get_property: [SELF, monitoring_options] }
accounting_options:
default: { get_property: [SELF, accounting_options] }
recurring_workflow:
default: { get_property: [SELF, recurring_workflow] }
simulate:
default: { get_property: [SELF, simulate] }
delete:
implementation: croupier.croupier_plugin.tasks.cleanup_execution
inputs:
config:
default: { get_property: [SELF, config] }
credentials:
default: { get_property: [SELF, credentials] }
skip:
default: { get_property: [SELF, skip_cleanup] }
simulate:
default: { get_property: [SELF, simulate] }
cloudify.interfaces.monitoring:
start:
implementation: croupier.croupier_plugin.tasks.start_monitoring_hpc
inputs:
config_infra:
default: { get_property: [SELF, config] }
credentials:
default: { get_property: [SELF, credentials] }
monitoring_options:
default: { fet_property: [SELF, monitoring_options]}
simulate:
default: { get_property: [SELF, simulate] }
stop:
implementation: croupier.croupier_plugin.tasks.stop_monitoring_hpc
inputs:
credentials:
default: { get_property: [SELF, credentials] }
simulate:
default: { get_property: [SELF, simulate] }
croupier.nodes.Job:
derived_from: cloudify.nodes.Root
properties:
deployment:
description: Deployment script and inputs
default: {}
type: croupier.datatypes.job_deployment_config
job_options:
description: Job main command and options
type: croupier.datatypes.job.Options
skip_cleanup:
description: True to not clean after execution (debug purposes)
type: boolean
default: False
interfaces:
cloudify.interfaces.lifecycle:
configure:
implementation: croupier.croupier_plugin.tasks.configure_job
inputs:
deployment:
description: Deployment scripts and inputs
default: { get_property: [SELF, deployment] }
skip_cleanup:
default: { get_property: [SELF, skip_cleanup] }
job_options:
default: { get_property: [SELF, job_options] }
max_retries: 0
stop:
implementation: croupier.croupier_plugin.tasks.revert_job
inputs:
deployment:
description: Undeployment script and inputs
default: { get_property: [SELF, deployment] }
skip_cleanup:
default: { get_property: [SELF, skip_cleanup] }
croupier.interfaces.lifecycle:
queue:
implementation: croupier.croupier_plugin.tasks.send_job
inputs:
job_options:
default: { get_property: [SELF, job_options] }
max_retries: 0
publish:
implementation: croupier.croupier_plugin.tasks.publish
cleanup:
implementation: croupier.croupier_plugin.tasks.cleanup_job
inputs:
job_options:
default: { get_property: [SELF, job_options] }
skip:
default: { get_property: [SELF, skip_cleanup] }
cancel:
implementation: croupier.croupier_plugin.tasks.stop_job
inputs:
job_options:
default: { get_property: [SELF, job_options] }
delete_reservation:
implementation: croupier.croupier_plugin.tasks.delete_reservation
croupier.nodes.SingularityJob:
derived_from: croupier.nodes.Job
# DATA MANAGEMENT
croupier.nodes.DataAccessInfrastructure:
derived_from: cloudify.nodes.Root
properties:
endpoint:
description: 'accessible (via protocol) endpoint of infrastructure'
type: string
supported_protocols:
description: 'list of supported interfaces to access the data'
type: list
credentials:
description: 'Credentials to access the data access infrastructure'
type: croupier.datatypes.Credentials
required: false
internet_access:
description: 'Whether of not this DM infrastructure has external access to Internet'
type: boolean
required: false
default: false
croupier.nodes.GridFTPDataAccessInfrastructure:
derived_from: croupier.nodes.DataAccessInfrastructure
properties:
workspace_basepath:
description: 'basepath location for workspace creating'
type: string
required: false
ssh_endpoint:
description: 'ssh endpoint for workspace management'
type: string
required: false
credentials:
description: 'Credentials to access the data access infrastructure'
type: croupier.datatypes.dm.GridFTPCredentials
required: false
croupier.nodes.CKAN_dataset:
derived_from: croupier.nodes.DataAccessInfrastructure
properties:
dataset_info:
type: croupier.datatypes.ckan_dataset
required: true
supported_protocols:
default:
- CKANAPI
croupier.nodes.DataTransfer:
derived_from: cloudify.nodes.Root
properties:
transfer_protocol:
description: 'protocol to transfer data from source to target'
type: string
interfaces:
cloudify.interfaces.lifecycle:
configure:
implementation: croupier.croupier_plugin.tasks.configure_data_transfer
croupier.nodes.DataSource:
derived_from: cloudify.nodes.Root
croupier.nodes.FileDataSource:
derived_from: croupier.nodes.DataSource
properties:
filepath:
description: 'location of data source in filesystem'
type: string
croupier.nodes.WebDataSource:
derived_from: croupier.nodes.DataSource
properties:
resource:
description: 'URI of data source in Web'
type: string
croupier.nodes.CKAN_resource:
derived_from: croupier.nodes.DataSource
properties:
resource:
type: croupier.datatypes.ckan_resource
required: true
croupier.nodes.ECMWFVerticalInterpolation:
derived_from: croupier.nodes.WebDataSource
properties:
credentials:
description: SSH credentials for the ECMWF VM. Fields- host, user, private_key
type: croupier.datatypes.Credentials
keycloak_credentials:
description: login credentials for hidalgo keycloak. Fields- user, pw
type: croupier.datatypes.Credentials
query:
description: ECMWF Query fields.
type: croupier.datatypes.ecmwf_query
server_port:
type: string
default: 9984
cloudify_address:
type: string
default: ''
required: False
resource:
required: false
default: ''
interfaces:
cloudify.interfaces.lifecycle:
configure:
implementation: croupier.croupier_plugin.tasks.ecmwf_vertical_interpolation
max_retries: 0
inputs:
query:
default: { get_property: [ SELF, query ] }
credentials:
default: { get_property: [ SELF, credentials ] }
keycloak_credentials:
default: { get_property: [ SELF, keycloak_credentials ] }
cloudify_address:
default: { get_property: [ SELF, cloudify_address ] }
server_port:
default: { get_property: [ SELF, server_port ] }
croupier.nodes.HPCDataSource:
derived_from: croupier.nodes.FileDataSource
properties:
workspace:
description: 'Workspace where FileDataSource is located'
type: croupier.datatypes.dm.HPCWorkspace
required: false
#VAULT
croupier.nodes.Vault:
derived_from: cloudify.nodes.Root
properties:
token:
type: string
required: true
user:
type: string
required: false
default: ''
address:
type: string
required: false
default: ''
cubbyhole:
type: boolean
required: false
default: false
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: croupier.croupier_plugin.tasks.create_vault
inputs:
address:
default: { get_property: [ SELF,address ] }
croupier.nodes.HPCExporter:
derived_from: cloudify.nodes.Root
properties:
address:
type: string
required: false
default: ''
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: croupier.croupier_plugin.tasks.create_monitor
inputs:
address:
default: { get_property: [SELF,address] }
relationships:
interface_contained_in:
derived_from: cloudify.relationships.contained_in
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
implementation: croupier.croupier_plugin.tasks.preconfigure_interface
inputs:
credentials:
default: { get_property: [SOURCE, credentials] }
simulate:
default: { get_property: [SOURCE, simulate] }
interface_monitored_by:
derived_from: cloudify.relationships.depends_on
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
implementation: croupier.croupier_plugin.tasks.preconfigure_interface_monitor
task_managed_by_interface:
derived_from: cloudify.relationships.contained_in
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
implementation: croupier.croupier_plugin.tasks.preconfigure_task
inputs:
config:
default: { get_property: [TARGET, config] }
credentials:
default: { get_property: [TARGET, credentials] }
job_prefix:
default: { get_property: [TARGET, job_prefix] }
monitoring_options:
default: { get_property: [TARGET, monitoring_options] }
simulate:
default: { get_property: [TARGET, simulate] }
ds_located_at:
derived_from: cloudify.relationships.contained_in
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
implementation: croupier.croupier_plugin.tasks.configure_data_source
job_depends_on:
derived_from: cloudify.relationships.depends_on
from_source:
derived_from: cloudify.relationships.connected_to
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
postconfigure:
implementation: croupier.croupier_plugin.tasks.configure_dt_ds_relationship
to_target:
derived_from: cloudify.relationships.connected_to
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
postconfigure:
implementation: croupier.croupier_plugin.tasks.configure_dt_ds_relationship
input:
derived_from: cloudify.relationships.connected_to
output:
derived_from: cloudify.relationships.connected_to
retrieve_credentials_from_vault:
derived_from: cloudify.relationships.depends_on
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
implementation: croupier.croupier_plugin.tasks.download_vault_credentials
inputs:
token:
default: { get_property: [TARGET, token ] }
user:
default: { get_property: [TARGET, user ] }
cubbyhole:
default: { get_property: [TARGET, cubbyhole ] }