2018-07-30 15:03:58 +02:00
|
|
|
---
|
|
|
|
heat_template_version: 2015-04-30
|
|
|
|
|
|
|
|
description: Simple Example template to deploy a virtual compute cluster.
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
image_name:
|
|
|
|
type: string
|
|
|
|
label: Image Name
|
|
|
|
description: Name of image to be used for compute instance
|
|
|
|
public_net:
|
|
|
|
type: string
|
|
|
|
label: Public Net Name
|
|
|
|
description: Public network used for router.
|
|
|
|
ssh_key:
|
|
|
|
type: string
|
|
|
|
label: ssh key name.
|
|
|
|
description: ssh public key name. (Must be uploaded to openstack first)
|
2018-07-31 13:36:31 +02:00
|
|
|
compute_flavor:
|
|
|
|
type: string
|
|
|
|
label: Flavor for compute nodes,
|
|
|
|
description: Flavor with which to start compute nodes.
|
2018-07-31 14:36:15 +02:00
|
|
|
aux_flavor:
|
2018-07-31 13:36:31 +02:00
|
|
|
type: string
|
|
|
|
label: Flavor for auxiliary nodes.
|
|
|
|
description: Flavor with which to start auxiliary nodes. (for now only the interface machine)
|
|
|
|
cidr:
|
|
|
|
type: string
|
|
|
|
label: Cidr for internal subnet
|
|
|
|
description: Cidr for the subnet of the internal user network.
|
2018-07-31 14:36:15 +02:00
|
|
|
internal_net_name:
|
|
|
|
type: string
|
|
|
|
label: Name for the internal network
|
|
|
|
description: Name for the internal network of this cluster.
|
2018-07-31 13:36:31 +02:00
|
|
|
volume_size:
|
|
|
|
type: string
|
|
|
|
label: Size (GB)
|
|
|
|
description: Size (GB) of the volume for each compute node
|
2018-07-30 15:03:58 +02:00
|
|
|
|
2018-07-31 14:36:15 +02:00
|
|
|
|
2018-07-30 15:03:58 +02:00
|
|
|
resources:
|
|
|
|
internal_net:
|
|
|
|
type: OS::Neutron::Net
|
2018-07-31 14:36:15 +02:00
|
|
|
properties:
|
2018-07-31 15:11:36 +02:00
|
|
|
name: {get_param: internal_net_name}
|
2018-07-30 15:03:58 +02:00
|
|
|
|
|
|
|
internal_subnet:
|
|
|
|
type: OS::Neutron::Subnet
|
|
|
|
properties:
|
2018-07-31 15:11:36 +02:00
|
|
|
network_id: {get_resource: internal_net}
|
|
|
|
cidr: {get_param: cidr}
|
|
|
|
dns_nameservers: ["129.125.4.6", "129.125.36.10"]
|
2018-07-30 15:03:58 +02:00
|
|
|
ip_version: 4
|
|
|
|
|
|
|
|
internal_router:
|
|
|
|
type: OS::Neutron::Router
|
|
|
|
properties:
|
2018-07-31 15:11:36 +02:00
|
|
|
external_gateway_info: {network: {get_param: public_net}}
|
2018-07-30 15:03:58 +02:00
|
|
|
|
|
|
|
internal_interface:
|
|
|
|
type: OS::Neutron::RouterInterface
|
|
|
|
properties:
|
2018-07-31 15:11:36 +02:00
|
|
|
router_id: {get_resource: internal_router}
|
|
|
|
subnet: {get_resource: internal_subnet}
|
|
|
|
|
|
|
|
public_port:
|
|
|
|
type: OS::Neutron::Port
|
|
|
|
properties:
|
|
|
|
network_id: {get_resource: internal_net}
|
|
|
|
fixed_ips:
|
|
|
|
- subnet_id: {get_resource: internal_subnet}
|
|
|
|
security_groups:
|
|
|
|
- default
|
|
|
|
|
|
|
|
floating_ip:
|
|
|
|
type: OS::Neutron::FloatingIP
|
|
|
|
properties:
|
|
|
|
floating_network_id: {get_param: public_net}
|
|
|
|
port_id: {get_resource: public_port}
|
2018-07-30 15:03:58 +02:00
|
|
|
|
|
|
|
interface: # User-interface for cluster-operation
|
|
|
|
type: OS::Nova::Server
|
|
|
|
properties:
|
|
|
|
key_name: {get_param: ssh_key}
|
|
|
|
image: {get_param: image_name}
|
2018-07-31 13:36:31 +02:00
|
|
|
flavor: {get_param: aux_flavor}
|
2018-07-30 15:03:58 +02:00
|
|
|
networks:
|
2018-07-31 15:11:36 +02:00
|
|
|
- port: {get_resource: public_port}
|
2018-07-30 15:03:58 +02:00
|
|
|
|
|
|
|
admin: # Machine to run slurm and other admin tools on.
|
|
|
|
type: OS::Nova::Server
|
|
|
|
properties:
|
|
|
|
key_name: {get_param: ssh_key}
|
|
|
|
image: {get_param: image_name}
|
2018-07-31 13:36:31 +02:00
|
|
|
flavor: {get_param: aux_flavor}
|
2018-07-30 15:03:58 +02:00
|
|
|
networks:
|
2018-07-31 14:36:15 +02:00
|
|
|
- network: {get_resource: internal_net}
|
2018-07-30 15:03:58 +02:00
|
|
|
|
|
|
|
vcompute01-volume:
|
|
|
|
type: OS::Cinder::Volume
|
|
|
|
properties:
|
2018-07-31 14:36:15 +02:00
|
|
|
size: {get_param: volume_size}
|
2018-07-30 15:03:58 +02:00
|
|
|
|
|
|
|
vcompute01:
|
|
|
|
type: OS::Nova::Server
|
|
|
|
properties:
|
|
|
|
key_name: adminkey
|
|
|
|
image: {get_param: image_name}
|
2018-07-31 13:36:31 +02:00
|
|
|
flavor: {get_param: compute_flavor}
|
2018-07-30 15:03:58 +02:00
|
|
|
networks:
|
2018-07-31 14:36:15 +02:00
|
|
|
- network: {get_resource: internal_net}
|
2018-07-30 15:03:58 +02:00
|
|
|
|
|
|
|
volume_attachment:
|
|
|
|
type: OS::Cinder::VolumeAttachment
|
|
|
|
properties:
|
|
|
|
volume_id: {get_resource: vcompute01-volume}
|
|
|
|
instance_uuid: {get_resource: vcompute01}
|
|
|
|
|
|
|
|
vcompute02-volume:
|
|
|
|
type: OS::Cinder::Volume
|
|
|
|
properties:
|
2018-07-31 14:36:15 +02:00
|
|
|
size: {get_param: volume_size}
|
2018-07-30 15:03:58 +02:00
|
|
|
|
|
|
|
vcompute02:
|
|
|
|
type: OS::Nova::Server
|
|
|
|
properties:
|
|
|
|
key_name: adminkey
|
|
|
|
image: {get_param: image_name}
|
2018-07-31 13:36:31 +02:00
|
|
|
flavor: {get_param: compute_flavor}
|
2018-07-30 15:03:58 +02:00
|
|
|
networks:
|
2018-07-31 14:36:15 +02:00
|
|
|
- network: {get_resource: internal_net}
|
2018-07-30 15:03:58 +02:00
|
|
|
|
|
|
|
volume_attachment:
|
|
|
|
type: OS::Cinder::VolumeAttachment
|
|
|
|
properties:
|
|
|
|
volume_id: {get_resource: vcompute02-volume}
|
|
|
|
instance_uuid: {get_resource: vcompute02}
|