1 heat_template_version: 2013-05-23
4 This template resides in tripleo-ci for Mitaka CI jobs only.
5 For Newton and beyond, please look in THT.
6 HOT template to create a new neutron network plus a router to the public
7 network, and for deploying a server into the new network. The template also
8 assigns a floating IP address and sets security group rules. ADAPTED FROM
9 https://raw.githubusercontent.com/openstack/heat-templates/master/hot/servers_in_new_neutron_net.yaml
13 description: Name of keypair to assign to servers
14 default: 'pingtest_key'
17 description: Name of image to use for servers
18 default: 'pingtest_image'
23 ID or name of public network for which floating IP addresses will be allocated
26 description: Name of private network to be created
27 default: 'default-net'
30 description: Private network address (CIDR notation)
31 default: '192.168.2.0/24'
34 description: Private network gateway address
35 default: '192.168.2.1'
36 private_net_pool_start:
38 description: Start of private network IP address allocation pool
39 default: '192.168.2.100'
42 default: '192.168.2.200'
43 description: End of private network IP address allocation pool
48 type: OS::Nova::KeyPair
50 save_private_key: true
51 name: {get_param: key_name }
54 type: OS::Neutron::Net
56 name: { get_param: private_net_name }
59 type: OS::Neutron::Subnet
61 network_id: { get_resource: private_net }
62 cidr: { get_param: private_net_cidr }
63 gateway_ip: { get_param: private_net_gateway }
65 - start: { get_param: private_net_pool_start }
66 end: { get_param: private_net_pool_end }
69 type: OS::Neutron::Router
71 external_gateway_info:
72 network: { get_param: public_net_name }
75 type: OS::Neutron::RouterInterface
77 router_id: { get_resource: router }
78 subnet_id: { get_resource: private_subnet }
81 type: OS::Cinder::Volume
84 image: { get_param: image }
88 type: OS::Nova::Server
94 volume_id: { get_resource: volume1 }
95 flavor: { get_resource: test_flavor }
96 key_name: { get_resource: key_pair }
98 - port: { get_resource: server1_port }
101 type: OS::Neutron::Port
103 network_id: { get_resource: private_net }
105 - subnet_id: { get_resource: private_subnet }
106 security_groups: [{ get_resource: server_security_group }]
109 type: OS::Neutron::FloatingIP
110 # TODO: investigate why we need this depends_on and if we could
111 # replace it by router_id with get_resource: router_interface
112 depends_on: router_interface
114 floating_network: { get_param: public_net_name }
115 port_id: { get_resource: server1_port }
117 server_security_group:
118 type: OS::Neutron::SecurityGroup
120 description: Add security group rules for server
121 name: pingtest-security-group
123 - remote_ip_prefix: 0.0.0.0/0
127 - remote_ip_prefix: 0.0.0.0/0
131 type: OS::Nova::Flavor
138 description: IP address of server1 in private network
139 value: { get_attr: [ server1, first_address ] }
141 description: Floating IP address of server1 in public network
142 value: { get_attr: [ server1_floating_ip, floating_ip_address ] }