791daca910
Adding output section to templates to make most use of the template. Change-Id: I77f175b682fd0a5d074735eab3e60ad91fbdb67c
76 lines
1.7 KiB
YAML
76 lines
1.7 KiB
YAML
heat_template_version: 2013-05-23
|
|
description: >
|
|
This template demonstrates how to use OS::Heat::StructuredDeployment
|
|
to override substitute get_input placeholders defined in
|
|
OS::Heat::StructuredConfig config.
|
|
|
|
As there is no hook on the server to act on the configuration data,
|
|
these deployment resource will perform no actual configuration.
|
|
parameters:
|
|
key_name:
|
|
type: string
|
|
flavor:
|
|
type: string
|
|
image:
|
|
type: string
|
|
default: fedora-software-config
|
|
|
|
resources:
|
|
the_sg:
|
|
type: OS::Neutron::SecurityGroup
|
|
properties:
|
|
name: the_sg
|
|
description: Ping and SSH
|
|
rules:
|
|
- protocol: icmp
|
|
- protocol: tcp
|
|
port_range_min: 22
|
|
port_range_max: 22
|
|
|
|
config:
|
|
type: OS::Heat::StructuredConfig
|
|
properties:
|
|
config:
|
|
config_value_foo: {get_input: foo}
|
|
config_value_bar: {get_input: bar}
|
|
|
|
deployment:
|
|
type: OS::Heat::StructuredDeployment
|
|
properties:
|
|
signal_transport: NO_SIGNAL
|
|
config:
|
|
get_resource: config
|
|
server:
|
|
get_resource: server
|
|
input_values:
|
|
foo: fooooo
|
|
bar: baaaaa
|
|
|
|
other_deployment:
|
|
type: OS::Heat::StructuredDeployment
|
|
properties:
|
|
signal_transport: NO_SIGNAL
|
|
config:
|
|
get_resource: config
|
|
server:
|
|
get_resource: server
|
|
input_values:
|
|
foo: fu
|
|
bar: barmy
|
|
|
|
server:
|
|
type: OS::Nova::Server
|
|
properties:
|
|
image: {get_param: image}
|
|
flavor: {get_param: flavor}
|
|
key_name: {get_param: key_name}
|
|
security_groups:
|
|
- {get_resource: the_sg}
|
|
user_data_format: SOFTWARE_CONFIG
|
|
|
|
|
|
outputs:
|
|
server_ip:
|
|
description: IP Address of server.
|
|
value: { get_attr: [server, first_address] }
|