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