Newer
Older

Andreas Hamacher
committed
---
heat_template_version: 2013-05-23
description: "A simple template to boot a cluster of desktops (LoginNode, ManagementNodes and Desktop Nodes)"
# avz parameters disabled. they are working but I want just more options than monash-02. I would like to have a parameter that says "I don't care"
parameters:
ubuntu_1804_image_id:
type: string
label: Image ID
description: Ubuntu Image
default: 99d9449a-084f-4901-8bd8-c04aebd589ca
centos_7_image_id:
type: string
label: Image ID
description: Centos Image
default: c47c3acb-9657-4243-9e14-e6c676157e3b #with NetworkManager

Andreas Hamacher
committed
ssh_key:
type: string
default: gc_key
avz:
type: string
default: monash-02
project_name:
type: string
NetID:
type: string
default: Classic Provider
Flavour:
type: string

Andreas Hamacher
committed
resources:
SlurmSecGroup:
type: "OS::Neutron::SecurityGroup"
properties:
name: "heatslurmsecgroup"
rules: [ { protocol: tcp,
port_range_min: 12000,
port_range_max: 12999},
{ protocol: tcp,
port_range_min: 6817,
port_range_max: 6819},
{ protocol: tcp,
port_range_min: 1019,
port_range_max: 1019}]
NFSSecGroup:
type: "OS::Neutron::SecurityGroup"
properties:
name: "heatnfssecgroup"
rules: [ { protocol: tcp,
port_range_min: 2049,
port_range_max: 2049},
{ protocol: tcp,
port_range_min: 111,
port_range_max: 111},
{ protocol: udp,
port_range_min: 2049,
port_range_max: 2049},
{ protocol: udp,
port_range_min: 111,

Andreas Hamacher
committed
MySQLSecGroup:
type: "OS::Neutron::SecurityGroup"
properties:
name: "heatmysqlsecgroup"
rules: [ { protocol: tcp,
port_range_min: 3306,
port_range_max: 3306,
remote_security_group: MySQLSecGroup} ]

Andreas Hamacher
committed
SSHMonashSecGroup:
type: "OS::Neutron::SecurityGroup"
properties:
name: "SSHMonashSecGroup"
rules: [ { protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 114.30.64.0/21
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 118.138.0.0/16
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 118.139.0.0/17
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 130.194.0.0/16
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
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 203.0.141.0/24
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 203.6.141.0/24
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 203.23.136.0/24
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 59.191.192.0/20
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 202.158.212.32/27
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 130.194.13.96/27
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 49.127.0.0/16
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 202.58.246.0/24
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 202.94.69.0/24
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 103.35.228.0/22
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 43.246.232.0/22
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 103.35.228.0/22
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 59.191.208.0/20
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 49.127.0.0/16
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 59.191.220.0/22
},
{ protocol: tcp,
port_range_min: 22,
port_range_max: 22,
direction: ingress,
remote_ip_prefix: 43.246.232.0/22
} ]

Andreas Hamacher
committed
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
# SSHInternalSecGroup:
# type: "OS::Neutron::SecurityGroup"
# properties:
# name: "SSHInternalSecGroup"
# rules: [ { protocol: tcp,
# port_range_min: 22,
# port_range_max: 22,
# direction: ingress} ]
#remote_ip_prefix: { get_param: REMOTE_IP }, direction: ingress
webaccess:
type: "OS::Neutron::SecurityGroup"
properties:
name: "webaccess"
rules: [ { protocol: tcp,
port_range_min: 80,
port_range_max: 80},
{ protocol: tcp,
port_range_min: 443,
port_range_max: 443} ]
SQLNode0:
type: "OS::Nova::Server"
properties:
name:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'sql0' ]]
availability_zone: { get_param: avz }

Andreas Hamacher
committed
key_name: { get_param: ssh_key }
security_groups: [ default, { get_resource: SSHMonashSecGroup }, { get_resource: SlurmSecGroup }, { get_resource: MySQLSecGroup }, { get_resource: NFSSecGroup } ]

Andreas Hamacher
committed
metadata:
ansible_host_groups: [ SQLNodes, NFSNodes ]

Andreas Hamacher
committed
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
project_name: { get_param: project_name }
networks:
- network: { get_param: NetID }
NFSVolume:
type: OS::Cinder::Volume
properties:
availability_zone: { get_param: avz }
size: 1
name: nfsvol
NFSVolumeAttachment:
type: "OS::Cinder::VolumeAttachment"
properties:
volume_id: { get_resource: NFSVolume }
instance_uuid: { get_resource: SQLNode0 }
SLURMSTATEVolume:
type: OS::Cinder::Volume
properties:
availability_zone: { get_param: avz }
size: 1
name: slurmstate
SLURMSTATEVolumeAttachment:
type: "OS::Cinder::VolumeAttachment"
properties:
volume_id: { get_resource: SLURMSTATEVolume }
instance_uuid: { get_resource: SQLNode0 }
DBVolume:
type: OS::Cinder::Volume
properties:
availability_zone: { get_param: avz }
size: 10
name: dbvol
DBVolumeAttachment:
type: "OS::Cinder::VolumeAttachment"
properties:
volume_id: { get_resource: DBVolume }
instance_uuid: { get_resource: SQLNode0 }

Andreas Hamacher
committed
type: "OS::Heat::ResourceGroup"
properties:

Andreas Hamacher
committed
resource_def:
type: My::Server::MgmtNode
properties:
#avz: { get_param: avz }
image: { get_param: centos_7_image_id }
ansible_ssh_user: ec2-user
mynodename:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'mgmt%index%' ]]
ssh_key: { get_param: ssh_key }
security_groups: [ default, { get_resource: SSHMonashSecGroup }, { get_resource: SlurmSecGroup }, { get_resource: NFSSecGroup }, { get_resource: MySQLSecGroup } ]
MgmtNodesU:
type: "OS::Heat::ResourceGroup"
properties:
count: 2
resource_def:
type: My::Server::MgmtNode
properties:
#avz: { get_param: avz }
image: { get_param: ubuntu_1804_image_id }
ansible_ssh_user: ubuntu
mynodename:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'mgmtU%index%' ]]
ssh_key: { get_param: ssh_key }
security_groups: [ default, { get_resource: SSHMonashSecGroup }, { get_resource: SlurmSecGroup }, { get_resource: NFSSecGroup }, { get_resource: MySQLSecGroup } ]

Andreas Hamacher
committed
project_name: { get_param: project_name }

Andreas Hamacher
committed
type: "OS::Heat::ResourceGroup"
properties:
count: 1
resource_def:
type: "OS::Nova::Server"
properties:
#availability_zone: { get_param: avz }

Andreas Hamacher
committed
image: { get_param: centos_7_image_id }
key_name: { get_param: ssh_key }
name:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'login%index%' ]]
security_groups: [ default, { get_resource: SSHMonashSecGroup }, { get_resource: SlurmSecGroup }, { get_resource: NFSSecGroup } ]
metadata:
ansible_host_groups: [ LoginNodes ]
ansible_ssh_user: ec2-user
project_name: { get_param: project_name }
networks:
- network: { get_param: NetID }
LoginNodesU:
type: "OS::Heat::ResourceGroup"
properties:
resource_def:
type: "OS::Nova::Server"
properties:
#availability_zone: { get_param: avz }
image: { get_param: ubuntu_1804_image_id }
key_name: { get_param: ssh_key }
name:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'loginU%index%' ]]
security_groups: [ default, { get_resource: SSHMonashSecGroup }, { get_resource: SlurmSecGroup }, { get_resource: NFSSecGroup } ]
metadata:
ansible_host_groups: [ LoginNodes ]
ansible_ssh_user: ubuntu
project_name: { get_param: project_name }
networks:

Andreas Hamacher
committed
DesktopNodes:
type: "OS::Heat::ResourceGroup"
properties:
count: 0
resource_def:
type: "OS::Nova::Server"
properties:
#availability_zone: { get_param: avz }

Andreas Hamacher
committed
image: { get_param: centos_7_image_id }
key_name: { get_param: ssh_key }
name:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'desktopc%index%' ]]
security_groups: [ default, { get_resource: SSHMonashSecGroup }, { get_resource: SlurmSecGroup }, { get_resource: NFSSecGroup } ]
metadata:
ansible_host_groups: [ DesktopNodes, VisNodes, ComputeNodes ]
ansible_ssh_user: ec2-user
project_name: { get_param: project_name }
networks:
- network: { get_param: NetID }

Andreas Hamacher
committed
type: "OS::Heat::ResourceGroup"
properties:
count: 1
resource_def:
type: "OS::Nova::Server"
properties:
#availability_zone: { get_param: avz }

Andreas Hamacher
committed
key_name: { get_param: ssh_key }
name:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'computec%index%' ]]
security_groups: [ default, { get_resource: SSHMonashSecGroup }, { get_resource: SlurmSecGroup }, { get_resource: NFSSecGroup } ]
metadata:
ansible_host_groups: [ ComputeNodes ]

Andreas Hamacher
committed
project_name: { get_param: project_name }
networks:
- network: { get_param: NetID }
ComputeNodesC:
type: "OS::Heat::ResourceGroup"
properties:
count: 1
resource_def:
type: "OS::Nova::Server"
properties:
#availability_zone: { get_param: avz }
image: { get_param: centos_7_image_id }
key_name: { get_param: ssh_key }
name:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'computec7%index%' ]]
security_groups: [ default, { get_resource: SSHMonashSecGroup }, { get_resource: SlurmSecGroup }, { get_resource: NFSSecGroup } ]
metadata:
ansible_host_groups: [ ComputeNodes ]
ansible_ssh_user: ec2-user
project_name: { get_param: project_name }
networks:
- network: { get_param: NetID }

Andreas Hamacher
committed
UbuntuDesktopNodes:
type: "OS::Heat::ResourceGroup"
properties:

Andreas Hamacher
committed
resource_def:
type: "OS::Nova::Server"
properties:
#availability_zone: { get_param: avz }

Andreas Hamacher
committed
image: { get_param: ubuntu_1804_image_id }
key_name: { get_param: ssh_key }
name:
list_join: [ '-', [ { get_param: "OS::stack_name" }, 'gpudesktopu%index%' ]]

Andreas Hamacher
committed
security_groups: [ default, { get_resource: SSHMonashSecGroup }, { get_resource: SlurmSecGroup }, { get_resource: NFSSecGroup } ]
metadata:
ansible_host_groups: [ DesktopNodes, GPU, ComputeNodes, K1, VisNodes ]

Andreas Hamacher
committed
ansible_ssh_user: ubuntu
project_name: { get_param: project_name }
networks:
- network: { get_param: NetID }
# PySSHauthz:
# type: "OS::Nova::Server"
# properties:
# name:
# list_join: [ '-', [ { get_param: "OS::stack_name" }, 'pysshautz' ]]
# availability_zone: { get_param: avz }

Andreas Hamacher
committed
# image: { get_param: ubuntu_1804_image_id }
# key_name: { get_param: ssh_key }
# security_groups: [ { get_resource: SSHMonashSecGroup }, { get_resource: webaccess } ]
# metadata:
# ansible_host_groups: [ PySSHauthz ]
# ansible_ssh_user: ubuntu
# project_name: { get_param: project_name }
# networks:
# - network: { get_param: NetID }