1 heat_template_version: pike
4 HOT template to created resources deployed by scenario001.
8 description: Name of keypair to assign to servers
9 default: 'pingtest_key'
12 description: Name of image to use for servers
13 default: 'pingtest_image'
18 ID or name of public network for which floating IP addresses will be allocated
21 description: Name of private network to be created
22 default: 'default-net'
25 description: Private network address (CIDR notation)
26 default: '192.168.2.0/24'
29 description: Private network gateway address
30 default: '192.168.2.1'
31 private_net_pool_start:
33 description: Start of private network IP address allocation pool
34 default: '192.168.2.100'
37 default: '192.168.2.200'
38 description: End of private network IP address allocation pool
43 type: OS::Nova::KeyPair
45 save_private_key: true
46 name: {get_param: key_name }
49 type: OS::Neutron::Net
51 name: { get_param: private_net_name }
54 type: OS::Neutron::Subnet
56 network_id: { get_resource: private_net }
57 cidr: { get_param: private_net_cidr }
58 gateway_ip: { get_param: private_net_gateway }
60 - start: { get_param: private_net_pool_start }
61 end: { get_param: private_net_pool_end }
64 type: OS::Neutron::Router
66 external_gateway_info:
67 network: { get_param: public_net_name }
70 type: OS::Neutron::RouterInterface
72 router_id: { get_resource: router }
73 subnet_id: { get_resource: private_subnet }
76 type: OS::Cinder::Volume
79 image: { get_param: image }
83 type: OS::Nova::Server
89 volume_id: { get_resource: volume1 }
90 flavor: { get_resource: test_flavor }
91 key_name: { get_resource: key_pair }
93 - port: { get_resource: server1_port }
96 type: OS::Neutron::Port
98 network_id: { get_resource: private_net }
100 - subnet_id: { get_resource: private_subnet }
101 security_groups: [{ get_resource: server_security_group }]
104 type: OS::Neutron::FloatingIP
105 # TODO: investigate why we need this depends_on and if we could
106 # replace it by router_id with get_resource: router_interface
107 depends_on: router_interface
109 floating_network: { get_param: public_net_name }
110 port_id: { get_resource: server1_port }
112 server_security_group:
113 type: OS::Neutron::SecurityGroup
115 description: Add security group rules for server
116 name: pingtest-security-group
118 - remote_ip_prefix: 0.0.0.0/0
122 - remote_ip_prefix: 0.0.0.0/0
126 type: OS::Nova::Flavor
132 type: OS::Aodh::GnocchiResourcesAlarm
134 description: Do stuff with gnocchi
136 aggregation_method: mean
138 evaluation_periods: 1
141 resource_type: instance
142 resource_id: { get_resource: server1 }
143 comparison_operator: gt
146 type: OS::Heat::AutoScalingGroup
151 type: OS::Heat::RandomString
154 type: OS::Heat::ScalingPolicy
156 adjustment_type: change_in_capacity
157 auto_scaling_group_id: {get_resource: asg}
159 scaling_adjustment: 1
162 type: OS::Aodh::Alarm
164 description: Scale-up if the average CPU > 50% for 1 minute
165 meter_name: test_meter
167 comparison_operator: ge
170 evaluation_periods: 1
172 - {get_attr: [scaleup_policy, alarm_url]}
174 metadata.metering.stack_id: {get_param: "OS::stack_id"}
178 description: IP address of server1 in private network
179 value: { get_attr: [ server1, first_address ] }
181 description: Floating IP address of server1 in public network
182 value: { get_attr: [ server1_floating_ip, floating_ip_address ] }
184 value: {get_attr: [asg, current_size]}