c24e130618
An example template to create multiple instances. Change-Id: I7b9314be0d11207c152e2fd8bec4aa7f43b82e9f
40 lines
1021 B
YAML
40 lines
1021 B
YAML
heat_template_version: 2013-05-23
|
|
description: >
|
|
Template to create multiple instances.
|
|
|
|
parameters:
|
|
image_id:
|
|
type: string
|
|
description: Image used for servers
|
|
key_name:
|
|
type: string
|
|
description: Name of SSH key to connect to the servers
|
|
instance_type:
|
|
type: string
|
|
description: flavor used by the servers
|
|
default: m1.small
|
|
constraints:
|
|
- custom_constraint: nova.flavor
|
|
num_instances:
|
|
type: number
|
|
description: Number of instances to create
|
|
default: 1
|
|
|
|
resources:
|
|
server_group:
|
|
type: OS::Heat::InstanceGroup
|
|
properties:
|
|
LaunchConfigurationName: { get_resource: server_config }
|
|
AvailabilityZones: []
|
|
Size: { get_param: num_instances }
|
|
server_config:
|
|
type: AWS::AutoScaling::LaunchConfiguration
|
|
properties:
|
|
ImageId: { get_param: image_id }
|
|
InstanceType: { get_param: instance_type}
|
|
KeyName: { get_param: key_name }
|
|
|
|
outputs:
|
|
server_group_addresses:
|
|
value: { get_attr: [server_group, InstanceList] }
|