Adding Security gateway testing
[samplevnf.git] / VNFs / DPPD-PROX / helper-scripts / openstackrapid / sriovrapid.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   availability_zone:
51     type: string
52     description: The Availability Zone to launch the instance.
53     default: nova
54   vm1_sriov_port:
55     type: string
56     description: The sriov port to be used by VM1
57     default: Port1
58   vm2_sriov_port:
59     type: string
60     description: The sriov port to be used by VM2
61     default: Port2
62 #  vm3_sriov_port:
63 #    type: string
64 #    description: The sriov port to be used by VM3
65 #    default: Port3
66
67 resources:
68   vm1_admin_port:
69      type: OS::Neutron::Port
70      properties:
71        network: {get_param: internal_network}
72        security_groups:
73          - default
74   vm1_floating_ip:
75      type: OS::Neutron::FloatingIP
76      properties:
77        floating_network: {get_param: floating_network}
78        port_id: {get_resource: vm1_admin_port}
79   vm1:
80     type: OS::Nova::Server
81     properties:
82       availability_zone: { get_param: availability_zone }
83       user_data:
84         get_file: prox_user_data.sh
85       key_name: { get_param: key }
86       image: { get_param: image }
87       flavor: { get_param: flavor }
88       networks:
89         - port: {get_resource: vm1_admin_port}
90         - port: {get_param: vm1_sriov_port}
91   vm2_admin_port:
92      type: OS::Neutron::Port
93      properties:
94        network: {get_param: internal_network}
95        security_groups:
96          - default
97   vm2_floating_ip:
98      type: OS::Neutron::FloatingIP
99      properties:
100        floating_network: {get_param: floating_network}
101        port_id: {get_resource: vm2_admin_port}
102   vm2:
103     type: OS::Nova::Server
104     properties:
105       availability_zone: { get_param: availability_zone }
106       user_data:
107         get_file: prox_user_data.sh
108       key_name: { get_param: key }
109       image: { get_param: image }
110       flavor: { get_param: flavor }
111       networks:
112         - port: {get_resource: vm2_admin_port}
113         - port: {get_param: vm2_sriov_port}
114 #  vm3_admin_port:
115 #     type: OS::Neutron::Port
116 #     properties:
117 #       network: {get_param: internal_network}
118 #       security_groups:
119 #         - default
120 #  vm3_floating_ip:
121 #     type: OS::Neutron::FloatingIP
122 #     properties:
123 #       floating_network: {get_param: floating_network}
124 #       port_id: {get_resource: vm3_admin_port}
125 #  vm3:
126 #    type: OS::Nova::Server
127 #    properties:
128 #      availability_zone: { get_param: availability_zone }
129 #      user_data:
130 #        get_file: prox_user_data.sh
131 #      key_name: { get_param: key }
132 #      image: { get_param: image }
133 #      flavor: { get_param: flavor }
134 #      networks:
135 #        - port: {get_resource: vm3_admin_port}
136 #        - port: {get_param: vm3_sriov_port}
137
138 outputs:
139   total_number_of_VMs:
140     description: Number of VMs created by this stack
141     value: 2
142   vm1_private_ip:
143     description: IP address of VM1 admin port
144     value: { get_attr: [vm1_admin_port, fixed_ips, 0, ip_address] }
145   vm1_public_ip:
146     description: Floating IP address of VM1 in public network
147     value: { get_attr: [ vm1_floating_ip, floating_ip_address ] }
148   vm1_dataplane_ip:
149     description: IP address of VM1 dataplane port
150     value: { get_attr: [vm1, networks,{get_param: dataplane_network},0] }
151   vm1_dataplane_mac:
152     description: The MAC address of VM1 dataplane port
153     value: { get_attr: [vm1, addresses, {get_param: dataplane_network}] }
154   vm2_private_ip:
155     description: IP address of VM2 admin port
156     value: { get_attr: [vm2_admin_port, fixed_ips, 0, ip_address] }
157   vm2_public_ip:
158     description: Floating IP address of VM2 in public network
159     value: { get_attr: [ vm2_floating_ip, floating_ip_address ] }
160   vm2_dataplane_ip:
161     description: IP address of VM2 dataplane port
162     value: { get_attr: [vm2, networks,{get_param: dataplane_network},0] }
163   vm2_dataplane_mac:
164     description: The MAC address of VM2 dataplane port
165     value: { get_attr: [vm2, addresses, {get_param: dataplane_network}]}
166 #  vm3_private_ip:
167 #    description: IP address of VM3 admin port
168 #    value: { get_attr: [vm3_admin_port, fixed_ips, 0, ip_address] }
169 #  vm3_public_ip:
170 #    description: Floating IP address of VM32 in public network
171 #    value: { get_attr: [ vm3_floating_ip, floating_ip_address ] }
172 #  vm3_dataplane_ip:
173 #    description: IP address of VM3 dataplane port
174 #    value: { get_attr: [vm3, networks,{get_param: dataplane_network},0] }
175 #  vm3_dataplane_mac:
176 #    description: The MAC address of VM3 dataplane port
177 #    value: { get_attr: [vm3, addresses, {get_param: dataplane_network}]}