Template for small cluster with its own network.
This commit is contained in:
parent
a66adc2524
commit
4885b488fd
|
@ -0,0 +1,99 @@
|
|||
---
|
||||
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)
|
||||
|
||||
resources:
|
||||
internal_net:
|
||||
type: OS::Neutron::Net
|
||||
|
||||
internal_subnet:
|
||||
type: OS::Neutron::Subnet
|
||||
properties:
|
||||
network_id: { get_resource: internal_net }
|
||||
cidr: "192.168.104.0/24"
|
||||
dns_nameservers: [ "129.125.4.6", "129.125.36.10" ]
|
||||
ip_version: 4
|
||||
|
||||
internal_router:
|
||||
type: OS::Neutron::Router
|
||||
properties:
|
||||
external_gateway_info: { network: public }
|
||||
|
||||
internal_interface:
|
||||
type: OS::Neutron::RouterInterface
|
||||
properties:
|
||||
router_id: { get_resource: internal_router }
|
||||
subnet: { get_resource: internal_subnet }
|
||||
|
||||
interface: # User-interface for cluster-operation
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
key_name: {get_param: ssh_key}
|
||||
image: {get_param: image_name}
|
||||
flavor: auxiliary
|
||||
networks:
|
||||
- network: internal_net
|
||||
|
||||
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}
|
||||
flavor: auxiliary
|
||||
networks:
|
||||
- network: internal_net
|
||||
|
||||
vcompute01-volume:
|
||||
type: OS::Cinder::Volume
|
||||
properties:
|
||||
size: 100
|
||||
|
||||
vcompute01:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
key_name: adminkey
|
||||
image: {get_param: image_name}
|
||||
flavor: Compute
|
||||
networks:
|
||||
- network: internal_net
|
||||
|
||||
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:
|
||||
size: 100
|
||||
|
||||
vcompute02:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
key_name: adminkey
|
||||
image: {get_param: image_name}
|
||||
flavor: Compute
|
||||
networks:
|
||||
- network: internal_net
|
||||
|
||||
volume_attachment:
|
||||
type: OS::Cinder::VolumeAttachment
|
||||
properties:
|
||||
volume_id: {get_resource: vcompute02-volume}
|
||||
instance_uuid: {get_resource: vcompute02}
|
Loading…
Reference in New Issue