b69abfd7cce5ea071172fa14fd481e81f0c16127
[bottlenecks.git] / testsuites / vstf / testcase_cfg / vstf_heat_template.yaml
1 heat_template_version: 2013-05-23
2 description: >
3   This template is used for creating a new environment on the Openstack Release L ,
4   and the deployment will create three virtual machine on the compute node, one manager
5   and two agent vm included. Each vm will has a nic on the controlplane switch and two
6   agent vms will has a additional nic on the dataplane.
7 parameters:
8   #nova keypair-list to query available key pair
9   key_name:
10     type: string
11     description: Name of keypair to assign to servers
12     default: bottlenecks_vstf_keypair
13   #nova image-list to query available images
14   image:
15     type: string
16     description: Name of image to use for servers
17     default: bottlenecks-trusty-server
18   #new addition image for the actual deployment
19   image_vstf_manager:
20     type: string
21     description: Name of image to use for servers
22     default: bottlenecks_vstf_manager
23   image_vstf_tester:
24     type: string
25     description: Name of image to use for servers
26     default: bottlenecks_vstf_tester
27   image_vstf_target:
28     type: string
29     description: Name of image to use for servers
30     default: bottlenecks_vstf_target
31   #nova flavor-list to query available flavors
32   flavor:
33     type: string
34     description: Flavor to use for servers
35     default: m1.large
36   #nova net-list to query available
37   public_net:
38     type: string
39     description: >
40       ID or name of public network for which floating IP addresses will be allocated
41     default: net04_ext
42
43   #private controlplane
44   private_net_name:
45     type: string
46     description: Name of private network to be created
47     default: vstf-private
48   private_net_cidr:
49     type: string
50     description: Private network address (CIDR notation)
51     default: "10.0.11.0/24"
52   private_net_gateway:
53     type: string
54     description: Private network gateway address
55     default: "10.0.11.1"
56   private_net_pool_start:
57     type: string
58     description: Start of private network IP address allocation pool
59     default: "10.0.11.2"
60   private_net_pool_end:
61     type: string
62     description: End of private network IP address allocation pool
63     default: "10.0.11.199"
64
65   #testing dataplane
66   testing_net_name:
67     type: string
68     description: Name of private network to be created
69     default: bottlenecks-testing
70   testing_net_cidr:
71     type: string
72     description: Private network address (CIDR notation)
73     default: "10.0.20.0/24"
74   testing_net_gateway:
75     type: string
76     description: Private network gateway address
77     default: "10.0.20.1"
78   testing_net_pool_start:
79     type: string
80     description: Start of private network IP address allocation pool
81     default: "10.0.20.2"
82   testing_net_pool_end:
83     type: string
84     description: End of private network IP address allocation pool
85     default: "10.0.20.199"
86
87
88 resources:
89   #control plane
90   private_net:
91     type: OS::Neutron::Net
92     properties:
93       name: { get_param: private_net_name }
94   private_subnet:
95     type: OS::Neutron::Subnet
96     properties:
97       network_id: { get_resource: private_net }
98       cidr: { get_param: private_net_cidr }
99       gateway_ip: { get_param: private_net_gateway }
100       allocation_pools:
101         - start: { get_param: private_net_pool_start }
102           end: { get_param: private_net_pool_end }
103
104   #dataplane
105   testing_net:
106     type: OS::Neutron::Net
107     properties:
108       name: { get_param: testing_net_name }
109   testing_subnet:
110     type: OS::Neutron::Subnet
111     properties:
112       network_id: { get_resource: testing_net }
113       cidr: { get_param: testing_net_cidr }
114       gateway_ip: { get_param: testing_net_gateway }
115       allocation_pools:
116         - start: { get_param: testing_net_pool_start }
117           end: { get_param: testing_net_pool_end }
118
119   #router info
120   router:
121     type: OS::Neutron::Router
122     properties:
123       external_gateway_info:
124         network: { get_param: public_net }
125   router_interface:
126     type: OS::Neutron::RouterInterface
127     properties:
128       router_id: { get_resource: router }
129       subnet_id: { get_resource: private_subnet }
130
131   #security_group
132   server_security_group:
133     type: OS::Neutron::SecurityGroup
134     properties:
135       description: vstf group for servers access.
136       name: vstf-security-group
137       rules: [
138         {remote_ip_prefix: 0.0.0.0/0,
139         protocol: tcp,
140         port_range_min: 1,
141         port_range_max: 65535},
142         {remote_ip_prefix: 0.0.0.0/0,
143         protocol: udp,
144         port_range_min: 1,
145         port_range_max: 65535},
146         {remote_ip_prefix: 0.0.0.0/0,
147         protocol: icmp}]
148
149   #nova server vstf manager definition info
150   vstf-manager:
151     type: OS::Nova::Server
152     properties:
153       name: vstf-manager
154       image: { get_param: image_vstf_manager }
155       flavor: { get_param: flavor }
156       key_name: { get_param: key_name }
157       networks:
158         - port: { get_resource: manager_control_port }
159   manager_control_port:
160     type: OS::Neutron::Port
161     properties:
162       network_id: { get_resource: private_net }
163       fixed_ips:
164         - subnet_id: { get_resource: private_subnet }
165       security_groups: [{ get_resource: server_security_group }]
166   manager_control_floating_ip:
167     type: OS::Neutron::FloatingIP
168     properties:
169       floating_network: { get_param: public_net }
170       port_id: { get_resource: manager_control_port }
171
172   #nova server vstf target definition info
173   vstf-target:
174     type: OS::Nova::Server
175     properties:
176       name: vstf-target
177       image: { get_param: image_vstf_target }
178       flavor: { get_param: flavor }
179       key_name: { get_param: key_name }
180       networks:
181         - port: { get_resource: target_control_port }
182         - port: { get_resource: target_testing_port }
183   target_control_port:
184     type: OS::Neutron::Port
185     properties:
186       network_id: { get_resource: private_net }
187       fixed_ips:
188         - subnet_id: { get_resource: private_subnet }
189       security_groups: [{ get_resource: server_security_group }]
190   target_testing_port:
191     type: OS::Neutron::Port
192     properties:
193       network_id: { get_resource: testing_net }
194       fixed_ips:
195         - subnet_id: { get_resource: testing_subnet }
196       security_groups: [{ get_resource: server_security_group }]
197   target_control_floating_ip:
198     type: OS::Neutron::FloatingIP
199     properties:
200       floating_network: { get_param: public_net }
201       port_id: { get_resource: target_control_port }
202
203   #nova server vstf tester definition info
204   vstf-tester:
205     type: OS::Nova::Server
206     properties:
207       name: vstf-tester
208       image: { get_param: image_vstf_tester }
209       flavor: { get_param: flavor }
210       key_name: { get_param: key_name }
211       networks:
212         - port: { get_resource: tester_control_port }
213         - port: { get_resource: tester_testing_port }
214   tester_control_port:
215     type: OS::Neutron::Port
216     properties:
217       network_id: { get_resource: private_net }
218       fixed_ips:
219         - subnet_id: { get_resource: private_subnet }
220       security_groups: [{ get_resource: server_security_group }]
221   tester_testing_port:
222     type: OS::Neutron::Port
223     properties:
224       network_id: { get_resource: testing_net }
225       fixed_ips:
226         - subnet_id: { get_resource: testing_subnet }
227       security_groups: [{ get_resource: server_security_group }]
228   tester_control_floating_ip:
229     type: OS::Neutron::FloatingIP
230     properties:
231       floating_network: { get_param: public_net }
232       port_id: { get_resource: tester_control_port }
233
234 outputs:
235   manager_control_private_ip:
236     description: IP address of manager_control in private network
237     value: { get_attr: [ vstf-manager, first_address ] }
238   manager_control_public_ip:
239     description: Floating IP address of manager_control in public network
240     value: { get_attr: [ manager_control_floating_ip, floating_ip_address ] }
241   target_control_private_ip:
242     description: IP address of manager_control in private network
243     value: { get_attr: [ vstf-target, first_address ] }
244   target_control_public_ip:
245     description: Floating IP address of manager_control in public network
246     value: { get_attr: [ target_control_floating_ip, floating_ip_address ] }
247   tester_control_private_ip:
248     description: IP address of manager_control in private network
249     value: { get_attr: [ vstf-tester, first_address ] }
250   tester_control_public_ip:
251     description: Floating IP address of manager_control in public network
252     value: { get_attr: [ tester_control_floating_ip, floating_ip_address ] }