1 ##########################################################################
3 #==================LICENSE_START==========================================
6 # Copyright © 2017 AT&T Intellectual Property. All rights reserved.
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #==================LICENSE_END============================================
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 ##########################################################################
25 heat_template_version: 2013-05-23
27 description: Heat template to deploy vLoadBalancer/vDNS demo app for ONAP
38 label: Image name or ID
39 description: Image to be used for compute instance
43 description: Type of instance (flavor) to be used
46 label: Public network name or ID
47 description: Public network that enables remote connection to VNF
50 label: vLoadBalancer private network name or ID
51 description: Private network that connects vLoadBalancer with vDNSs
52 vlb_private_net_id_for_floating:
54 label: vLoadBalancer private network name or ID
55 description: Private network that connects vLoadBalancer with the public OpenStack network using floating IP
58 label: ECOMP management network name or ID
59 description: Private network that connects ONAP component and the VNF
60 onap_private_subnet_id:
62 label: ECOMP management sub-network name or ID
63 description: Private sub-network that connects ONAP component and the VNF
66 label: vLoadBalancer private network CIDR
67 description: The CIDR of the vLoadBalancer private network
68 vlb_private_net_cidr_for_floating:
70 label: vLoadBalancer private network CIDR
71 description: The CIDR of the vLoadBalancer private network that connects vLoadBalancer with the public OpenStack network using floating IP
72 onap_private_net_cidr:
74 label: ONAP private network CIDR
75 description: The CIDR of the protected private network
78 label: vLoadBalancer private IP address towards the private network
79 description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs
82 label: vLoadBalancer private IP address towards the ONAP management network
83 description: Private IP address that is assigned to the vLoadBalancer to communicate with ONAP components
84 vlb_private_ip_2_for_floating:
86 label: vLoadBalancer private IP address towards the OpenStack public network via floating IP
87 description: vLoadBalancer private IP address towards the OpenStack public network via floating IP
90 label: vDNS private IP address towards the private network
91 description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer
94 label: vDNS private IP address towards the ONAP management network
95 description: Private IP address that is assigned to the vDNS to communicate with ONAP components
98 label: vLoadBalancer name
99 description: Name of the vLoadBalancer
103 description: Name of the vDNS
107 description: The VNF ID is provided by ONAP
110 label: vFirewall module ID
111 description: The vLoadBalancer Module ID is provided by ONAP
114 label: DCAE collector IP address
115 description: IP address of the DCAE collector
118 label: DCAE collector port
119 description: Port of the DCAE collector
123 description: Public/Private key pair name
127 description: Public key to be installed on the compute instance
130 label: Repository URL
131 description: URL of the repository that hosts the demo packages
134 label: Repository URL
135 description: URL of the repository that hosts the demo packages
136 demo_artifacts_version:
138 label: Artifacts version used in demo vnfs
139 description: Artifacts (jar, tar.gz) version used in demo vnfs
140 install_script_version:
142 label: Installation script version number
143 description: Version number of the scripts that install the vFW demo app
146 label: Cloud environment
147 description: Cloud environment (e.g., openstack, rackspace)
158 type: OS::Heat::RandomString
163 type: OS::Nova::KeyPair
169 base: { get_param: key_name }
170 rand: { get_resource: random-str }
171 public_key: { get_param: pub_key }
172 save_private_key: false
175 type: OS::Neutron::Net
177 name: { get_param: vlb_private_net_id }
180 type: OS::Neutron::Subnet
182 name: { get_param: vlb_private_net_id }
183 network_id: { get_resource: vlb_private_network }
184 cidr: { get_param: vlb_private_net_cidr }
186 # vlb_private_network_for_floating:
187 # type: OS::Neutron::Net
189 # name: { get_param: vlb_private_net_id_for_floating }
191 # vlb_private_subnet_for_floating:
192 # type: OS::Neutron::Subnet
194 # name: { get_param: vlb_private_net_id_for_floating }
195 # network_id: { get_resource: vlb_private_network_for_floating }
196 # network_id: { get_param: onap_private_net_id }
197 # cidr: { get_param: vlb_private_net_cidr_for_floating }
200 # type: OS::Neutron::RouterInterface
202 # router_id: d6f7a5c3-8bae-4171-aebd-c53a8c85b2ee
203 # subnet_id: { get_resource: vlb_private_subnet_for_floating }
206 type: OS::Neutron::Port
208 network: { get_resource: vlb_private_network }
209 fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}]
212 type: OS::Neutron::Port
214 network: { get_param: onap_private_net_id }
215 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_1 }}]
217 # vlb_private_2_port_for_floating:
218 # type: OS::Neutron::Port
220 # network: { get_param: onap_private_net_id }
221 # fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_2_for_floating }}]
224 type: OS::Neutron::FloatingIP
226 floating_network_id: { get_param: public_net_id }
227 port_id: { get_resource: vlb_private_1_port }
228 # port_id: { get_resource: vlb_private_2_port_for_floating }
231 type: OS::Nova::Server
233 image: { get_param: vlb_image_name }
234 flavor: { get_param: vlb_flavor_name }
235 name: { get_param: vlb_name_0 }
236 key_name: { get_resource: my_keypair }
238 - port: { get_resource: vlb_private_2_port_for_floating }
239 - port: { get_resource: vlb_private_0_port }
240 - port: { get_resource: vlb_private_1_port }
241 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
242 user_data_format: RAW
246 __dcae_collector_ip__: { get_param: dcae_collector_ip }
247 __dcae_collector_port__: { get_param: dcae_collector_port }
248 __local_public_ipaddr__: { get_attr: [vlb_floating_ip, floating_ip_address] }
249 __local_private_ipaddr__: { get_param: vlb_private_ip_0 }
250 __oam_private_ipaddr__: { get_param: vlb_private_ip_1 }
251 __repo_url_blob__ : { get_param: repo_url_blob }
252 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
253 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
254 __install_script_version__ : { get_param: install_script_version }
255 __cloud_env__ : { get_param: cloud_env }
259 # Create configuration files
261 echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
262 echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
263 echo "__local_public_ipaddr__" > /opt/config/local_public_ipaddr.txt
264 echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt
265 echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
266 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
267 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
268 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
269 echo "__install_script_version__" > /opt/config/install_script_version.txt
270 echo "__cloud_env__" > /opt/config/cloud_env.txt
272 # Download and run install script
273 curl -k __repo_url_blob__/org.openecomp.demo/vnfs/vlb/__install_script_version__/v_lb_install.sh -o /opt/v_lb_install.sh
275 chmod +x v_lb_install.sh
280 type: OS::Neutron::Port
282 network: { get_resource: vlb_private_network }
283 fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}]
286 type: OS::Neutron::Port
288 network: { get_param: onap_private_net_id }
289 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}]
292 type: OS::Neutron::FloatingIP
294 floating_network_id: { get_param: public_net_id }
295 port_id: { get_resource: vdns_private_1_port }
298 type: OS::Nova::Server
300 image: { get_param: vlb_image_name }
301 flavor: { get_param: vlb_flavor_name }
302 name: { get_param: vdns_name_0 }
303 key_name: { get_resource: my_keypair }
305 - port: { get_resource: vdns_private_1_port }
306 - port: { get_resource: vdns_private_0_port }
307 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
308 user_data_format: RAW
312 __lb_oam_int__ : { get_param: vlb_private_ip_1 }
313 __lb_private_ipaddr__: { get_param: vlb_private_ip_0 }
314 __local_private_ipaddr__: { get_param: vdns_private_ip_0 }
315 __repo_url_blob__ : { get_param: repo_url_blob }
316 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
317 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
318 __install_script_version__ : { get_param: install_script_version }
319 __cloud_env__ : { get_param: cloud_env }
323 # Create configuration files
325 echo "__lb_oam_int__" > /opt/config/lb_oam_int.txt
326 echo "__lb_private_ipaddr__" > /opt/config/lb_private_ipaddr.txt
327 echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt
328 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
329 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
330 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
331 echo "__install_script_version__" > /opt/config/install_script_version.txt
332 echo "__cloud_env__" > /opt/config/cloud_env.txt
334 # Download and run install script
335 curl -k __repo_url_blob__/org.openecomp.demo/vnfs/vlb/__install_script_version__/v_dns_install.sh -o /opt/v_dns_install.sh
337 chmod +x v_dns_install.sh