-
Notifications
You must be signed in to change notification settings - Fork 9
/
slurm_cluster.yaml
145 lines (123 loc) · 3.45 KB
/
slurm_cluster.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
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: >
Deploy a Virtual Slurm Cluster. It will launch
a single front-end and a set of worker nodes
metadata:
display_name: SLURM cluster
icon: https://github.com/indigo-dc/tosca-types/raw/master/images/slurm.png
topology_template:
inputs:
wn_num:
type: integer
description: Number of WNs in the cluster
default: 1
required: yes
fe_cpus:
type: integer
description: Numer of CPUs for the front-end node
default: 1
required: yes
fe_mem:
type: scalar-unit.size
description: Amount of Memory for the front-end node
default: 1 GB
required: yes
wn_cpus:
type: integer
description: Numer of CPUs for the WNs
default: 1
required: yes
wn_mem:
type: scalar-unit.size
description: Amount of Memory for the WNs
default: 1 GB
required: yes
network_type:
type: string
required: no
default: private
constraints:
- valid_values: [ private, isolated ]
node_templates:
pub_network:
type: tosca.nodes.network.Network
properties:
network_type: public
priv_network:
type: tosca.nodes.network.Network
properties:
network_type: { get_input: network_type }
fe_pub_port:
type: tosca.nodes.network.Port
properties:
order: 1
requirements:
- binding: fe_server
- link: pub_network
fe_priv_port:
type: tosca.nodes.network.Port
properties:
order: 0
requirements:
- binding: fe_server
- link: priv_network
wn_priv_port:
type: tosca.nodes.network.Port
properties:
order: 0
requirements:
- binding: wn_server
- link: priv_network
front_end:
type: tosca.nodes.indigo.LRMS.FrontEnd.Slurm
properties:
wn_ips: { get_attribute: [ wn_server, private_address ] }
requirements:
- host: fe_server
fe_server:
type: tosca.nodes.indigo.Compute
capabilities:
endpoint:
properties:
dns_name: slurmserver
host:
properties:
num_cpus: { get_input: fe_cpus }
mem_size: { get_input: fe_mem }
os:
properties:
distribution: ubuntu
type: linux
version: 16.04
wn_node:
type: tosca.nodes.indigo.LRMS.WorkerNode.Slurm
properties:
front_end_ip: { get_attribute: [ fe_server, private_address, 0 ] }
public_front_end_ip: { get_attribute: [ fe_server, public_address, 0 ] }
requirements:
- host: wn_server
- dependency: front_end
wn_server:
type: tosca.nodes.indigo.Compute
capabilities:
scalable:
properties:
count: { get_input: wn_num }
host:
properties:
num_cpus: { get_input: wn_cpus }
mem_size: { get_input: wn_mem }
os:
properties:
distribution: ubuntu
type: linux
version: 16.04
outputs:
cluster_ip:
value: { get_attribute: [ fe_server, public_address, 0 ] }
cluster_creds:
value: { get_attribute: [ fe_server, endpoint, credential, 0 ] }
wn_ips:
value: { get_attribute: [ wn_server, private_address ] }