Fixed the calculation of dropped packets and other changes
[samplevnf.git] / VNFs / DPPD-PROX / helper-scripts / openstackrapid / 3VMsriovrapid.yaml
1 ##
2 ## Copyright (c) 2010-2017 Intel Corporation
3 ##
4 ## Licensed under the Apache License, Version 2.0 (the "License");
5 ## you may not use this file except in compliance with the License.
6 ## You may obtain a copy of the License at
7 ##
8 ##     http://www.apache.org/licenses/LICENSE-2.0
9 ##
10 ## Unless required by applicable law or agreed to in writing, software
11 ## distributed under the License is distributed on an "AS IS" BASIS,
12 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ## See the License for the specific language governing permissions and
14 ## limitations under the License.
15 ##
16
17 heat_template_version: 2016-04-08
18 description: RAPID stack (Rapid Automated Performance Indication for Dataplane)
19 parameters:
20   image:
21     type: string
22     label: Image name or ID
23     description: Image to be used for compute instance
24     default: RapidVM
25   flavor:
26     type: string
27     label: Flavor
28     description: Type of instance (flavor) to be used
29     default: prox_flavor
30   key:
31     type: string
32     label: Key name
33     description: Name of key-pair to be used for compute instance
34     default: prox
35   dataplane_network:
36     type: string
37     label: Private network name or ID
38     description: Network to attach instance to.
39     default: dataplane-network
40   internal_network:
41     type: string
42     label: Private network name or ID
43     description: Network to attach instance to.
44     default: admin_internal_net
45   floating_network:
46     type: string
47     label: Floating network name or ID
48     description: Public Network to attach instance to.
49     default: admin_floating_net
50   vm1_availability_zone:
51     type: string
52     description: The Availability Zone to launch the instance.
53     default: nova
54   vm2_availability_zone:
55     type: string
56     description: The Availability Zone to launch the instance.
57     default: nova
58   vm3_availability_zone:
59     type: string
60     description: The Availability Zone to launch the instance.
61     default: nova
62   vm1_sriov_port:
63     type: string
64     description: The sriov port to be used by VM1
65     default: Port1
66   vm2_sriov_port:
67     type: string
68     description: The sriov port to be used by VM2
69     default: Port2
70   vm3_sriov_port:
71     type: string
72     description: The sriov port to be used by VM3
73     default: Port3
74
75 resources:
76   vm1_admin_port:
77      type: OS::Neutron::Port
78      properties:
79        network: {get_param: internal_network}
80        security_groups:
81          - default
82   vm1_floating_ip:
83      type: OS::Neutron::FloatingIP
84      properties:
85        floating_network: {get_param: floating_network}
86        port_id: {get_resource: vm1_admin_port}
87   vm1:
88     type: OS::Nova::Server
89     properties:
90       availability_zone: { get_param: vm1_availability_zone }
91       user_data:
92         get_file: prox_user_data.sh
93       key_name: { get_param: key }
94       image: { get_param: image }
95       flavor: { get_param: flavor }
96       networks:
97         - port: {get_resource: vm1_admin_port}
98         - port: {get_param: vm1_sriov_port}
99   vm2_admin_port:
100      type: OS::Neutron::Port
101      properties:
102        network: {get_param: internal_network}
103        security_groups:
104          - default
105   vm2_floating_ip:
106      type: OS::Neutron::FloatingIP
107      properties:
108        floating_network: {get_param: floating_network}
109        port_id: {get_resource: vm2_admin_port}
110   vm2:
111     type: OS::Nova::Server
112     properties:
113       availability_zone: { get_param: vm2_availability_zone }
114       user_data:
115         get_file: prox_user_data.sh
116       key_name: { get_param: key }
117       image: { get_param: image }
118       flavor: { get_param: flavor }
119       networks:
120         - port: {get_resource: vm2_admin_port}
121         - port: {get_param: vm2_sriov_port}
122   vm3_admin_port:
123      type: OS::Neutron::Port
124      properties:
125        network: {get_param: internal_network}
126        security_groups:
127          - default
128   vm3_floating_ip:
129      type: OS::Neutron::FloatingIP
130      properties:
131        floating_network: {get_param: floating_network}
132        port_id: {get_resource: vm3_admin_port}
133   vm3:
134     type: OS::Nova::Server
135     properties:
136       availability_zone: { get_param: vm3_availability_zone }
137       user_data:
138         get_file: prox_user_data.sh
139       key_name: { get_param: key }
140       image: { get_param: image }
141       flavor: { get_param: flavor }
142       networks:
143         - port: {get_resource: vm3_admin_port}
144         - port: {get_param: vm3_sriov_port}
145
146 outputs:
147   total_number_of_VMs:
148     description: Number of VMs created by this stack
149     value: 3
150   vm1_private_ip:
151     description: IP address of VM1 admin port
152     value: { get_attr: [vm1_admin_port, fixed_ips, 0, ip_address] }
153   vm1_public_ip:
154     description: Floating IP address of VM1 in public network
155     value: { get_attr: [ vm1_floating_ip, floating_ip_address ] }
156   vm1_dataplane_ip:
157     description: IP address of VM1 dataplane port
158     value: { get_attr: [vm1, networks,{get_param: dataplane_network},0] }
159   vm1_dataplane_mac:
160     description: The MAC address of VM1 dataplane port
161     value: { get_attr: [vm1, addresses, {get_param: dataplane_network}] }
162   vm2_private_ip:
163     description: IP address of VM2 admin port
164     value: { get_attr: [vm2_admin_port, fixed_ips, 0, ip_address] }
165   vm2_public_ip:
166     description: Floating IP address of VM2 in public network
167     value: { get_attr: [ vm2_floating_ip, floating_ip_address ] }
168   vm2_dataplane_ip:
169     description: IP address of VM2 dataplane port
170     value: { get_attr: [vm2, networks,{get_param: dataplane_network},0] }
171   vm2_dataplane_mac:
172     description: The MAC address of VM2 dataplane port
173     value: { get_attr: [vm2, addresses, {get_param: dataplane_network}]}
174   vm3_private_ip:
175     description: IP address of VM3 admin port
176     value: { get_attr: [vm3_admin_port, fixed_ips, 0, ip_address] }
177   vm3_public_ip:
178     description: Floating IP address of VM3 in public network
179     value: { get_attr: [ vm3_floating_ip, floating_ip_address ] }
180   vm3_dataplane_ip:
181     description: IP address of VM3 dataplane port
182     value: { get_attr: [vm3, networks,{get_param: dataplane_network},0] }
183   vm3_dataplane_mac:
184     description: The MAC address of VM3 dataplane port
185     value: { get_attr: [vm3, addresses, {get_param: dataplane_network}]}