1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_infra
4 template_version: "1.0"
6 description: vCPE_infra
16 description: image name for vcpe in openstack glance
20 description: public network id used during onap installation
24 description: onap OAM network id
26 onap_private_net_cidr:
28 description: oanp OAM network cidr
32 description: message router ip that for vDHCP configuration
36 # label: Message Router Port
37 description: IP port of the Message Router that for vDHCP configuration
41 description: dcae collector ip
45 description: dcae collector port
49 description: Root URL for the Nexus repository for Maven artifacts
50 default: https://nexus.onap.org
51 demo_artifacts_version:
53 description: artifacts version used in demo vnfs
55 install_script_version:
57 description: install script version number
58 default: 1.2.0-SNAPSHOT
61 description: cloud environment(openstack or rackspace)
65 description: ssh public key
66 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
69 description: cpe signal net name
70 default: zdfw1cpe01_private
73 description: cpe signal net cidr
77 description: cpe public net name
78 default: zdfw1cpe01_public
81 description: cpe public net cidr
85 description: vdu vdhcp_0 name
86 default: zdcpe1cpe01dhcp01
89 description: ip of vdhcp port to cpe signal net
93 description: ip of vdhcp port to onap oam net
97 description: vdu vaaa_0 name
98 default: zdcpe1cpe01aaa01
101 description: ip of vaaa port to cpe signal net
105 description: ip of vaaa port to onap oam net
109 description: vdu vdns_0 name
110 default: zdcpe1cpe01dns01
113 description: ip of vdns port to cpe public net
117 description: ip of vdns port to onap oam net
121 description: vdu vweb_0 name
122 default: zdcpe1cpe01web01
125 description: ip of vweb port to cpe public net
129 description: ip of vweb port to onap oam net
133 description: The VNF ID is provided by ONAP
134 default: vCPE_Infrastructure_demo_app
137 description: The vCPE Module ID is provided by ONAP
138 default: vCPE_Intrastructure
140 substitution_mappings:
141 node_type: tosca.nodes.nfv.VNF
143 descriptor_id: b1bb0ce7-1111-4fa7-95ed-4840d70a1177
145 product_name: vcpe_infra
146 software_version: '1.0'
147 descriptor_version: '1.0'
149 flavour_description: simple
150 vnfm_info: [ 'gvnfm' ]
153 - virtual_link: [ Cp_vaaa_public, virtual_link ] # expose as external CP
154 - virtual_link: [ Cp_vaaa_onap_private, virtual_link ] # expose as external CP
155 - virtual_link: [ Cp_vdns_public, virtual_link ]
156 - virtual_link: [ Cp_vdns_onap_private, virtual_link ]
157 - virtual_link: [ Cp_vdhcp_public, virtual_link ]
158 - virtual_link: [ Cp_vdhcp_onap_private, virtual_link ]
159 - virtual_link: [ Cp_vweb_public, virtual_link ]
160 - virtual_link: [ Cp_vweb_onap_private, virtual_link ]
165 # type: tosca.nodes.nfv.VnfVirtualLink
168 # layer_protocol: ipv4
170 # max_bit_rate_requirements:
173 # min_bit_rate_requirements:
176 # networkName: { get_input: public_net_id }
180 # type: tosca.nodes.nfv.VnfVirtualLink
183 # layer_protocol: ipv4
185 # max_bit_rate_requirements:
188 # min_bit_rate_requirements:
191 # networkName: { get_input: onap_private_net_id }
192 # cidr: { get_input: onap_private_net_cidr }
196 type: tosca.nodes.nfv.VnfVirtualLink
201 max_bit_rate_requirements:
204 min_bit_rate_requirements:
207 networkName: { get_input: cpe_signal_net_id}
208 cidr: { get_input: cpe_signal_net_cidr }
213 type: tosca.nodes.nfv.VnfVirtualLink
218 max_bit_rate_requirements:
221 min_bit_rate_requirements:
224 networkName: { get_input: cpe_public_net_id}
225 cidr: { get_input: cpe_public_net_cidr }
230 type: tosca.nodes.nfv.VduCp
232 layer_protocol: [ipv4]
235 - asscociated_layer_protocol: ipv4
237 address_type: ip_address
239 ip_address_assignment: false
240 floating_ip_activated: false
242 - virtual_binding: VDU_vaaa_0
243 # - virtual_link: VL_public
245 Cp_vaaa_onap_private:
246 type: tosca.nodes.nfv.VduCp
248 layer_protocol: [ipv4]
251 - asscociated_layer_protocol: ipv4
253 address_type: ip_address
255 ip_address_assignment: false
256 floating_ip_activated: false
258 - { get_input: vaaa_private_ip_1 }
260 - virtual_binding: VDU_vaaa_0
261 # - virtual_link: VL_onap_private
264 type: tosca.nodes.nfv.VduCp
266 layer_protocol: [ipv4]
269 - asscociated_layer_protocol: ipv4
271 address_type: ip_address
273 ip_address_assignment: false
274 floating_ip_activated: false
276 - { get_input: vaaa_private_ip_0 }
278 - virtual_binding: VDU_vaaa_0
279 - virtual_link: VL_cpe_signal
281 VirtualStorage_root_all:
282 # this indicate the VDU root storage size
283 type: tosca.nodes.nfv.Vdu.VirtualStorage
285 type_of_storage: root
286 size_of_storage: 40 GB
289 type: tosca.nodes.nfv.Vdu.Compute
291 name: { get_input: vaaa_name_0 }
293 configurable_properties:
294 additional_vnfc_configurable_properties: {}
296 min_number_of_instances: 1
297 max_number_of_instances: 1
299 inject_files: #TODO SDC Bug
300 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
301 dest_path: /home/ubuntu/.ssh/authorized_keys
303 vnf_id: { get_input: vnf_id }
304 vf_module_id: { get_input: vf_module_id }
305 dcae_collector_ip: { get_input: dcae_collector_ip }
306 dcae_collector_port: { get_input: dcae_collector_port }
307 cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
308 oam_ipaddr: { get_input: vaaa_private_ip_1 }
309 oam_cidr: { get_input: onap_private_net_cidr }
310 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
311 demo_artifacts_version: { get_input: demo_artifacts_version }
312 install_script_version: { get_input: install_script_version }
313 cloud_env: { get_input: cloud_env }
314 nexus_artifact_repo: { get_input: nexus_artifact_repo }
317 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
318 apt-get -y install jq
321 echo $METADATA | jq -r ".meta.$1"
324 # Create configuration files
326 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
327 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
328 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
329 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
330 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
331 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
332 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
333 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
334 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
335 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
337 # Download and run install script
338 apt-get -y install unzip
339 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
340 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
341 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
342 curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
343 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
345 chmod +x v_aaa_install.sh
350 #TODO add local disk size
352 virtual_mem_size: 4096 MB
356 - virtual_storage: VirtualStorage_root_all
358 sw_image: #TODO need to put glance image name here
359 #file: { get_input: vcpe_image_name }
360 file: ../Artifacts/images/ubuntu_16.04
361 type: tosca.artifacts.nfv.SwImage
365 type: tosca.nodes.nfv.VduCp
367 layer_protocol: [ipv4]
370 - asscociated_layer_protocol: ipv4
372 address_type: ip_address
374 ip_address_assignment: false
375 floating_ip_activated: false
377 - virtual_binding: VDU_vdns_0
378 # - virtual_link: VL_public
380 Cp_vdns_onap_private:
381 type: tosca.nodes.nfv.VduCp
383 layer_protocol: [ipv4]
386 - asscociated_layer_protocol: ipv4
388 address_type: ip_address
390 ip_address_assignment: false
391 floating_ip_activated: false
393 - { get_input: vdns_private_ip_1 }
395 - virtual_binding: VDU_vdns_0
396 #- virtual_link: VL_onap_private
399 type: tosca.nodes.nfv.VduCp
401 layer_protocol: [ipv4]
404 - asscociated_layer_protocol: ipv4
406 address_type: ip_address
408 ip_address_assignment: false
409 floating_ip_activated: false
411 - { get_input: vdns_private_ip_0 }
413 - virtual_binding: VDU_vdns_0
414 - virtual_link: VL_cpe_public
417 type: tosca.nodes.nfv.Vdu.Compute
419 name: { get_input: vdns_name_0 }
421 configurable_properties:
422 additional_vnfc_configurable_properties: {}
424 min_number_of_instances: 1
425 max_number_of_instances: 1
427 inject_files: # TODO SDC Bug
428 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
429 dest_path: /home/ubuntu/.ssh/authorized_keys
431 vnf_id: { get_input: vnf_id }
432 vf_module_id: { get_input: vf_module_id }
433 oam_ipaddr: { get_input: vdns_private_ip_1 }
434 cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
435 oam_cidr: { get_input: onap_private_net_cidr }
436 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
437 demo_artifacts_version: { get_input: demo_artifacts_version }
438 install_script_version: { get_input: install_script_version }
439 cloud_env: { get_input: cloud_env }
440 nexus_artifact_repo: { get_input: nexus_artifact_repo }
443 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
444 apt-get -y install jq
447 echo $METADATA | jq -r ".meta.$1"
450 # Create configuration files
452 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
453 echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
454 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
455 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
456 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
457 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
458 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
459 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
461 # Download and run install script
462 apt-get -y install unzip
463 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
464 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
465 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
466 curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
467 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
469 chmod +x v_dns_install.sh
474 #TODO add local disk size
476 virtual_mem_size: 4096 MB
480 - virtual_storage: VirtualStorage_root_all
482 sw_image: #TODO need to put glance image name here
483 #file: { get_input: vcpe_image_name }
484 file: ../Artifacts/images/ubuntu_16.04
485 type: tosca.artifacts.nfv.SwImage
489 type: tosca.nodes.nfv.VduCp
491 layer_protocol: [ipv4]
494 - asscociated_layer_protocol: ipv4
496 address_type: ip_address
498 ip_address_assignment: false
499 floating_ip_activated: false
501 - virtual_binding: VDU_vdhcp_0
502 # - virtual_link: VL_public
504 Cp_vdhcp_onap_private:
505 type: tosca.nodes.nfv.VduCp
507 layer_protocol: [ipv4]
510 - asscociated_layer_protocol: ipv4
512 address_type: ip_address
514 ip_address_assignment: false
515 floating_ip_activated: false
517 - { get_input: vdhcp_private_ip_1 }
519 - virtual_binding: VDU_vdhcp_0
520 # - virtual_link: VL_onap_private
523 type: tosca.nodes.nfv.VduCp
525 layer_protocol: [ipv4]
528 - asscociated_layer_protocol: ipv4
530 address_type: ip_address
532 ip_address_assignment: false
533 floating_ip_activated: false
535 - { get_input: vdhcp_private_ip_0 }
537 - virtual_binding: VDU_vdhcp_0
538 - virtual_link: VL_cpe_signal
541 type: tosca.nodes.nfv.Vdu.Compute
543 name: { get_input: vdhcp_name_0 }
545 configurable_properties:
546 additional_vnfc_configurable_properties: {}
548 min_number_of_instances: 1
549 max_number_of_instances: 1
551 inject_files: #SDC Bug
552 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
553 dest_path: /home/ubuntu/.ssh/authorized_keys
555 vnf_id: { get_input: vnf_id }
556 vf_module_id: { get_input: vf_module_id }
557 oam_ipaddr: { get_input: vdhcp_private_ip_1 }
558 cpe_signal_ipaddr: { get_input: vdhcp_private_ip_0 }
559 oam_cidr: { get_input: onap_private_net_cidr }
560 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
561 mr_ip_addr: { get_input: mr_ip_addr }
562 mr_ip_port: { get_input: mr_ip_port }
563 demo_artifacts_version: { get_input: demo_artifacts_version }
564 install_script_version: { get_input: install_script_version }
565 cloud_env: { get_input: cloud_env }
566 nexus_artifact_repo: { get_input: nexus_artifact_repo }
569 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
570 apt-get -y install jq
573 echo $METADATA | jq -r ".meta.$1"
576 # Create configuration files
578 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
579 echo "$(get_metadata cpe_signal_ipaddr)" > /opt/config/cpe_signal_ipaddr.txt
580 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
581 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
582 echo "$(get_metadata mr_ip_addr)" > /opt/config/mr_ip_addr.txt
583 echo "$(get_metadata mr_ip_port)" > /opt/config/mr_ip_port.txt
584 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
585 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
586 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
587 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
589 # Download and run install script
590 apt-get -y install unzip
591 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
592 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
593 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
594 curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
595 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dhcp_install.sh
597 chmod +x v_dhcp_install.sh
602 #TODO add local disk size
604 virtual_mem_size: 4096 MB
608 - virtual_storage: VirtualStorage_root_all
610 sw_image: #TODO need to put glance image name here
611 #file: { get_input: vcpe_image_name }
612 file: ../Artifacts/images/ubuntu_16.04
613 type: tosca.artifacts.nfv.SwImage
617 type: tosca.nodes.nfv.VduCp
619 layer_protocol: [ipv4]
622 - asscociated_layer_protocol: ipv4
624 address_type: ip_address
626 ip_address_assignment: false
627 floating_ip_activated: false
629 - virtual_binding: VDU_vweb_0
630 # - virtual_link: VL_public
632 Cp_vweb_onap_private:
633 type: tosca.nodes.nfv.VduCp
635 layer_protocol: [ipv4]
638 - asscociated_layer_protocol: ipv4
640 address_type: ip_address
642 ip_address_assignment: false
643 floating_ip_activated: false
645 - { get_input: vweb_private_ip_1 }
647 - virtual_binding: VDU_vweb_0
648 # - virtual_link: VL_onap_private
651 type: tosca.nodes.nfv.VduCp
653 layer_protocol: [ipv4]
656 - asscociated_layer_protocol: ipv4
658 address_type: ip_address
660 ip_address_assignment: false
661 floating_ip_activated: false
663 - { get_input: vweb_private_ip_0 }
665 - virtual_binding: VDU_vweb_0
666 - virtual_link: VL_cpe_public
669 type: tosca.nodes.nfv.Vdu.Compute
671 name: { get_input: vweb_name_0 }
673 configurable_properties:
674 additional_vnfc_configurable_properties: {}
676 min_number_of_instances: 1
677 max_number_of_instances: 1
679 inject_files: # TODO SDC bug
680 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
681 dest_path: /home/ubuntu/.ssh/authorized_keys
683 vnf_id: { get_input: vnf_id }
684 vf_module_id: { get_input: vf_module_id }
685 oam_ipaddr: { get_input: vweb_private_ip_1 }
686 cpe_public_ipaddr: { get_input: vweb_private_ip_0 }
687 oam_cidr: { get_input: onap_private_net_cidr }
688 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
689 demo_artifacts_version: { get_input: demo_artifacts_version }
690 install_script_version: { get_input: install_script_version }
691 cloud_env: { get_input: cloud_env }
692 nexus_artifact_repo: { get_input: nexus_artifact_repo }
695 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
696 apt-get -y install jq
699 echo $METADATA | jq -r ".meta.$1"
702 # Create configuration files
704 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
705 echo "$(get_metadata cpe_public_ipaddr)" > /opt/config/cpe_public_ipaddr.txt
706 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
707 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
708 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
709 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
710 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
711 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
713 # Download and run install script
714 apt-get -y install unzip
715 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
716 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
717 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
718 curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
719 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_web_install.sh
721 chmod +x v_web_install.sh
726 #TODO add local disk size
728 virtual_mem_size: 4096 MB
732 - virtual_storage: VirtualStorage_root_all
734 sw_image: #TODO need to put glance image name here
735 #file: { get_input: vcpe_image_name }
736 file: ../Artifacts/images/ubuntu_16.04
737 type: tosca.artifacts.nfv.SwImage