-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathlifewatch-algaebloom.yaml
135 lines (112 loc) · 4.29 KB
/
lifewatch-algaebloom.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
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 examples for specifying a Chronos Job that runs an application using Onedata storage.
topology_template:
inputs:
# input_onedata_providers:
# type: string
# description: list of favorite Onedata providers to be used to mount the Input Onedata space. If not provided and the flag smart_scheuling is set to true, data locality algo will be applied.
# default: ''
# required: no
#
# output_onedata_providers:
# type: string
# description: list of favorite Onedata providers to be used to mount the Output Onedata space. If not provided and the flag smart_scheuling is set to true, the same provider(s) used to mount the input space will be used.
# default: ''
# required: no
smart_scheduling:
type: boolean
description: Enable data locality
required: yes
default: true
input_space_name:
type: string
description: Onedata space where the application input data are stored
required: yes
input_path:
type: string
description: Path to the input data inside the Input Onedata space
required: yes
output_space_name:
type: string
description: Onedata space where the application output will be stored. It can be the same as the Input Onedata space
required: yes
output_filenames:
type: string
description: csv list of filenames generated by the application run
default: ''
required: yes
input_config_file:
type: string
description: Input file to edit
required: yes
d3d_param:
type: string
description: Param of Delft3d to seep
default: ''
required: yes
d3d_value:
type: string
description: Value of Delft3d Param
default: ''
required: yes
cpus:
type: float
description: Amount of CPUs for this job
required: yes
mem:
type: scalar-unit.size
description: Amount of Memory for this job
required: yes
node_templates:
chronos_job1:
type: tosca.nodes.indigo.Container.Application.Docker.Chronos
properties:
description: 'Execute Application'
command: 'cd $MESOS_SANDBOX && wget https://raw.githubusercontent.com/indigo-dc/algaebloom-barridocker/master/lifewatch_run.sh && /bin/bash lifewatch_run.sh'
uris: []
retries: 3
environment_variables:
D3D_VALUE: { get_input: d3d_value }
INPUT_ONEDATA_TOKEN: { get_attribute : [ input_onedata_space, token ] }
OUTPUT_ONEDATA_TOKEN: { get_attribute : [ output_onedata_space, token ] }
D3D_PARAM: { get_input: d3d_param }
INPUT_CONFIG_FILE: { get_input: input_config_file }
D3D_BIN: '/delft3d_repository'
INPUT_ONEDATA_PROVIDERS: { get_attribute : [ input_onedata_space, selected_provider ] }
OUTPUT_ONEDATA_PROVIDERS: { get_attribute : [ output_onedata_space, selected_provider ] }
INPUT_ONEDATA_SPACE: { get_input: input_space_name }
INPUT_PATH: { get_input: input_path }
OUTPUT_ONEDATA_SPACE: { get_input: output_space_name }
OUTPUT_PATH: 'output_path'
OUTPUT_FILENAMES: { get_input: output_filenames }
artifacts:
image:
file: 'indigodatacloudapps/algaebloom-barridocker'
type: tosca.artifacts.Deployment.Image.Container.Docker
requirements:
- host: docker_runtime
docker_runtime:
type: tosca.nodes.indigo.Container.Runtime.Docker
capabilities:
host:
properties:
num_cpus: { get_input: cpus }
mem_size: { get_input: mem }
volumes: [ '/data:rw' ]
scalable:
properties:
min_instances: 1
max_instances: 1
default_instances: 1
input_onedata_space:
type: tosca.nodes.indigo.OnedataSpace
properties:
space: { get_input: input_space_name }
smartScheduling: { get_input: smart_scheduling }
output_onedata_space:
type: tosca.nodes.indigo.OnedataSpace
properties:
space: { get_input: output_space_name }
smartScheduling: { get_input: smart_scheduling }