ac8502c45d
Added trivial templates that can be used to exercise basic scaling group functionality: the mechanics of the scaling actions. These examples are deliberately spare, to minimize dependencies. Change-Id: Iddd63acc629d617f861215c12e20d250c53edd11 Partial-Bug: 1305425
68 lines
1.9 KiB
YAML
68 lines
1.9 KiB
YAML
heat_template_version: 2013-05-23
|
|
|
|
description: >
|
|
A HOT template that holds a VM instance with an attached
|
|
Cinder volume. The VM does nothing, it is only created.
|
|
|
|
parameters:
|
|
key_name:
|
|
type: string
|
|
description: Name of an existing key pair to use for the instance
|
|
constraints:
|
|
- custom_constraint: nova.keypair
|
|
description: Must name a public key (pair) known to Nova
|
|
flavor:
|
|
type: string
|
|
description: Flavor for the instance to be created
|
|
default: m1.small
|
|
constraints:
|
|
- custom_constraint: nova.flavor
|
|
description: Must be a flavor known to Nova
|
|
image:
|
|
type: string
|
|
description: >
|
|
Name or ID of the image to use for the instance.
|
|
You can get the default from
|
|
http://cloud.fedoraproject.org/fedora-20.x86_64.qcow2
|
|
There is also
|
|
http://cloud.fedoraproject.org/fedora-20.i386.qcow2
|
|
Any image should work since this template
|
|
does not ask the VM to do anything.
|
|
constraints:
|
|
- custom_constraint: glance.image
|
|
description: Must identify an image known to Glance
|
|
network:
|
|
type: string
|
|
description: The network for the VM
|
|
default: private
|
|
vol_size:
|
|
type: number
|
|
description: The size of the Cinder volume
|
|
default: 1
|
|
|
|
resources:
|
|
my_instance:
|
|
type: OS::Nova::Server
|
|
properties:
|
|
key_name: { get_param: key_name }
|
|
image: { get_param: image }
|
|
flavor: { get_param: flavor }
|
|
networks: [{network: {get_param: network} }]
|
|
|
|
my_vol:
|
|
type: OS::Cinder::Volume
|
|
properties:
|
|
size: { get_param: vol_size }
|
|
|
|
vol_att:
|
|
type: OS::Cinder::VolumeAttachment
|
|
properties:
|
|
instance_uuid: { get_resource: my_instance }
|
|
volume_id: { get_resource: my_vol }
|
|
mountpoint: /dev/vdb
|
|
|
|
outputs:
|
|
instance_networks:
|
|
description: The IP addresses of the deployed instance
|
|
value: { get_attr: [my_instance, networks] }
|