-
Notifications
You must be signed in to change notification settings - Fork 0
/
scipion-blueprint.yaml.m4
336 lines (305 loc) · 10.6 KB
/
scipion-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
---
tosca_definitions_version: cloudify_dsl_1_3
description: >
Scipion portal setup via FedCloud OCCI and Puppet.
dnl *** From gromacs-inputs.yaml.m4 take only macros, drop regular texts.
divert(`-1')dnl
include(scipion-inputs.yaml.m4)dnl
divert(`0')dnl
#define(_NODE_SERVER_, ifdef(`_CFM_',`gromacs.nodes.MonitoredServer',`gromacs.nodes.Server'))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(_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
olin_vnc_password:
type: string
cuda_release:
type: string
cuda_version_drivers:
type: string
websockify_ssl_enabled:
type: boolean
websockify_ssl_email:
type: string
onedata_version:
type: string
onedata_host:
type: string
onedata_token:
type: string
onedata_workspace:
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://apt.puppetlabs.com/puppet5-release-trusty.deb'
package: 'puppet-agent'
download: resources/puppet.tar.gz
#TODO
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 }
scipionHostPool:
type: _NODE_WEBSERVER_
instances:
deploy: 1
properties:
fabric_env: *fabric_env_hostpool
puppet_config:
<<: *puppet_config
manifests:
start: manifests/scipion_olin.pp
delete: manifests/scipion_olin.pp
hiera:
westlife::volume::device: /dev/vdc
westlife::volume::fstype: ext4
westlife::volume::mountpoint: /data
westlife::volume::mode: "1777"
westlife::vnc::password: { get_input: olin_vnc_password }
cuda::release: { get_input: cuda_release }
cuda::version_drivers: { get_input: cuda_version_drivers }
websockify::ssl_enabled: { get_input: websockify_ssl_enabled }
websockify::ssl_email: { get_input: websockify_ssl_email }
onedata::version: { get_input: onedata_version }
onedata::host: { get_input: onedata_host }
onedata::token: { get_input: onedata_token }
onedata::workspace: { get_input: onedata_workspace }
relationships:
- type: cloudify.relationships.contained_in
target: olinNodeHostPool
',_PROVISIONER_,`occi',`
### OCCI nodes #############################################################
# olin (frontend)
olinNode:
type: _NODE_SERVER_
properties:
name: "Scipion 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
scipion:
type: _NODE_WEBSERVER_
instances:
deploy: 1
properties:
fabric_env: *fabric_env
puppet_config:
<<: *puppet_config
manifests:
start: manifests/scipion_olin.pp
delete: manifests/scipion_olin_onedata.pp
hiera:
westlife::volume::device: /dev/vdc
westlife::volume::fstype: ext4
westlife::volume::mountpoint: /data
westlife::volume::mode: "1777"
westlife::vnc::password: { get_input: olin_vnc_password }
cuda::release: { get_input: cuda_release }
cuda::version_drivers: { get_input: cuda_version_drivers }
websockify::ssl_enabled: { get_input: websockify_ssl_enabled }
websockify::ssl_email: { get_input: websockify_ssl_email }
onedata::version: { get_input: onedata_version }
onedata::host: { get_input: onedata_host }
onedata::token: { get_input: onedata_token }
onedata::workspace: { get_input: onedata_workspace }
relationships:
- type: cloudify.relationships.contained_in
target: olinNode
- type: cloudify.relationships.depends_on
target: olinStorage
# workerNode:
# type: _NODE_SERVER_
# properties:
# resource_config:
# os_tpl: { get_input: worker_os_tpl }
# resource_tpl: { get_input: worker_resource_tpl }
# availability_zone: { get_input: worker_availability_zone }
# agent_config: *agent_configuration
# cloud_config: *cloud_configuration
# occi_config: *occi_configuration
# fabric_env: *fabric_env
# scipionWorker:
# type: _NODE_WEBSERVER_
# instances:
# deploy: 1
# properties:
# fabric_env:
# <<: *fabric_env
# host_string: { get_attribute: [workerNode, ip] }
# puppet_config:
# manifests:
# start: manifests/scipion_worker.pp
# relationships:
# - type: cloudify.relationships.contained_in
# target: workerNode
',`errprint(Missing definition of _PROVISIONER_ in the inputs
)m4exit(1)')
outputs:
web_endpoint:
description: Scipion portal endpoint
value:
url: { concat: ['http://', { get_attribute: [_NAME_OLINNODE_, ip] }, ':8000'] }
# worker_ip:
# description: Worker IP
# value:
# ip: { get_attribute: [workerNode,ip] }
# vim: set syntax=yaml