heat_template_version: 2013-05-23 description: HOT template for two interconnected VMs with floating ips. parameters: image_id: type: string description: Image Name secgroup_id: type: string description : Id of the security groupe public_net: type: string description: public network id resources: private_net: type: OS::Neutron::Net properties: name: private-net private_subnet: type: OS::Neutron::Subnet properties: network_id: { get_resource: private_net } cidr: 172.16.2.0/24 gateway_ip: 172.16.2.1 router1: type: OS::Neutron::Router properties: external_gateway_info: network: { get_param: public_net } router1_interface: type: OS::Neutron::RouterInterface properties: router_id: { get_resource: router1 } subnet_id: { get_resource: private_subnet } server1_port: type: OS::Neutron::Port properties: network_id: { get_resource: private_net } security_groups: [ get_param: secgroup_id ] fixed_ips: - subnet_id: { get_resource: private_subnet } server1_floating_ip: type: OS::Neutron::FloatingIP properties: floating_network_id: { get_param: public_net } port_id: { get_resource: server1_port } server1: type: OS::Nova::Server properties: name: Server1 image: { get_param: image_id } flavor: m1.tiny networks: - port: { get_resource: server1_port } server2_port: type: OS::Neutron::Port properties: network_id: { get_resource: private_net } security_groups: [ get_param: secgroup_id ] fixed_ips: - subnet_id: { get_resource: private_subnet } server2_floating_ip: type: OS::Neutron::FloatingIP properties: floating_network_id: { get_param: public_net } port_id: { get_resource: server2_port } server2: type: OS::Nova::Server properties: name: Server2 image: { get_param: image_id } flavor: m1.tiny networks: - port: { get_resource: server2_port } outputs: server1_private_ip: description: Private IP address of server1 value: { get_attr: [ server1, first_address ] } server1_public_ip: description: Floating IP address of server1 value: { get_attr: [ server1_floating_ip, floating_ip_address ] } server2_private_ip: description: Private IP address of server2 value: { get_attr: [ server2, first_address ] } server2_public_ip: description: Floating IP address of server2 value: { get_attr: [ server2_floating_ip, floating_ip_address ] }