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 cidr: { get_param: vlb_private_net_cidr_for_floating }
199 type: OS::Neutron::Port
201 network: { get_resource: vlb_private_network }
202 fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}]
205 type: OS::Neutron::Port
207 network: { get_param: onap_private_net_id }
208 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_1 }}]
210 vlb_private_2_port_for_floating:
211 type: OS::Neutron::Port
213 network: { get_param: onap_private_net_id }
214 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_2_for_floating }}]
217 type: OS::Neutron::FloatingIP
219 floating_network_id: { get_param: public_net_id }
220 port_id: { get_resource: vlb_private_2_port_for_floating }
223 type: OS::Nova::Server
225 image: { get_param: vlb_image_name }
226 flavor: { get_param: vlb_flavor_name }
227 name: { get_param: vlb_name_0 }
228 key_name: { get_resource: my_keypair }
230 - port: { get_resource: vlb_private_2_port_for_floating }
231 - port: { get_resource: vlb_private_0_port }
232 - port: { get_resource: vlb_private_1_port }
233 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
234 user_data_format: RAW
238 __dcae_collector_ip__: { get_param: dcae_collector_ip }
239 __dcae_collector_port__: { get_param: dcae_collector_port }
240 __local_private_ipaddr__: { get_param: vlb_private_ip_0 }
241 __oam_private_ipaddr__: { get_param: vlb_private_ip_1 }
242 __repo_url_blob__ : { get_param: repo_url_blob }
243 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
244 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
245 __install_script_version__ : { get_param: install_script_version }
246 __cloud_env__ : { get_param: cloud_env }
250 # Create configuration files
252 echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
253 echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
254 echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt
255 echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
256 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
257 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
258 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
259 echo "__install_script_version__" > /opt/config/install_script_version.txt
260 echo "__cloud_env__" > /opt/config/cloud_env.txt
262 # Download and run install script
263 curl -k __repo_url_blob__/org.openecomp.demo/vnfs/vlb/__install_script_version__/v_lb_install.sh -o /opt/v_lb_install.sh
265 chmod +x v_lb_install.sh
270 type: OS::Neutron::Port
272 network: { get_resource: vlb_private_network }
273 fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}]
276 type: OS::Neutron::Port
278 network: { get_param: onap_private_net_id }
279 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}]
282 type: OS::Neutron::FloatingIP
284 floating_network_id: { get_param: public_net_id }
285 port_id: { get_resource: vdns_private_1_port }
288 type: OS::Nova::Server
290 image: { get_param: vlb_image_name }
291 flavor: { get_param: vlb_flavor_name }
292 name: { get_param: vdns_name_0 }
293 key_name: { get_resource: my_keypair }
295 - port: { get_resource: vdns_private_1_port }
296 - port: { get_resource: vdns_private_0_port }
297 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
298 user_data_format: RAW
302 __lb_oam_int__ : { get_param: vlb_private_ip_1 }
303 __lb_private_ipaddr__: { get_param: vlb_private_ip_0 }
304 __local_private_ipaddr__: { get_param: vdns_private_ip_0 }
305 __repo_url_blob__ : { get_param: repo_url_blob }
306 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
307 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
308 __install_script_version__ : { get_param: install_script_version }
309 __cloud_env__ : { get_param: cloud_env }
313 # Create configuration files
315 echo "__lb_oam_int__" > /opt/config/lb_oam_int.txt
316 echo "__lb_private_ipaddr__" > /opt/config/lb_private_ipaddr.txt
317 echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt
318 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
319 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
320 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
321 echo "__install_script_version__" > /opt/config/install_script_version.txt
322 echo "__cloud_env__" > /opt/config/cloud_env.txt
324 # Download and run install script
325 curl -k __repo_url_blob__/org.openecomp.demo/vnfs/vlb/__install_script_version__/v_dns_install.sh -o /opt/v_dns_install.sh
327 chmod +x v_dns_install.sh