1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_infra
4 template_version: "1.0"
6 description: vCPE_infra
13 derived_from: tosca.nodes.nfv.VNF
35 substitution_mappings:
36 node_type: onap.vcpe_infra
38 descriptor_id: b1bb0ce7-1111-4fa7-95ed-4840d70a1177
40 product_name: vcpe_infra
41 software_version: '1.0'
42 descriptor_version: '1.0'
44 flavour_description: simple
47 virtual_link: [ Cp_vaaa_public, virtual_link ] # expose as external CP
48 virtual_link: [ Cp_vaaa_onap_private, virtual_link ] # expose as external CP
49 virtual_link: [ Cp_vdns_public, virtual_link ]
50 virtual_link: [ Cp_vdns_onap_private, virtual_link ]
51 virtual_link: [ Cp_vdhcp_public, virtual_link ]
52 virtual_link: [ Cp_vdhcp_onap_private, virtual_link ]
53 virtual_link: [ Cp_vweb_public, virtual_link ]
54 virtual_link: [ Cp_vweb_onap_private, virtual_link ]
59 description: image name for vcpe in openstack glance
63 description: public network id used during onap installation
67 description: onap OAM network id
69 onap_private_net_cidr:
71 description: oanp OAM network cidr
75 description: message router ip that for vDHCP configuration
79 label: Message Router Port
80 description: IP port of the Message Router that for vDHCP configuration
83 description: dcae collector ip
87 description: dcae collector port
91 description: Root URL for the Nexus repository for Maven artifacts
92 default: https://nexus.onap.org
93 demo_artifacts_version:
95 description: artifacts version used in demo vnfs
97 install_script_version:
99 description: install script version number
100 default: 1.2.0-SNAPSHOT
103 description: cloud environment(openstack or rackspace)
107 description: ssh public key
108 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
111 description: cpe signal net name
112 default: zdfw1cpe01_private
115 description: cpe signal net cidr
119 description: cpe public net name
120 default: zdfw1cpe01_public
123 description: cpe public net cidr
127 description: vdu vdhcp_0 name
128 default: zdcpe1cpe01dhcp01
131 description: ip of vdhcp port to cpe signal net
135 description: ip of vdhcp port to onap oam net
139 description: vdu vaaa_0 name
140 default: zdcpe1cpe01aaa01
143 description: ip of vaaa port to cpe signal net
147 description: ip of vaaa port to onap oam net
151 description: vdu vdns_0 name
152 default: zdcpe1cpe01dns01
155 description: ip of vdns port to cpe public net
159 description: ip of vdns port to onap oam net
163 description: vdu vweb_0 name
164 default: zdcpe1cpe01web01
167 description: ip of vweb port to cpe public net
171 description: ip of vweb port to onap oam net
175 description: The VNF ID is provided by ONAP
176 default: vCPE_Infrastructure_demo_app
179 description: The vCPE Module ID is provided by ONAP
180 default: vCPE_Intrastructure
185 # type: tosca.nodes.nfv.VnfVirtualLink
188 # layer_protocol: ipv4
190 # max_bit_rate_requirements:
193 # min_bit_rate_requirements:
196 # networkName: { get_input: public_net_id }
200 # type: tosca.nodes.nfv.VnfVirtualLink
203 # layer_protocol: ipv4
205 # max_bit_rate_requirements:
208 # min_bit_rate_requirements:
211 # networkName: { get_input: onap_private_net_id }
212 # cidr: { get_input: onap_private_net_cidr }
216 type: tosca.nodes.nfv.VnfVirtualLink
221 max_bit_rate_requirements:
224 min_bit_rate_requirements:
227 networkName: { get_input: cpe_signal_net_id}
228 cidr: { get_input: cpe_signal_net_cidr }
233 type: tosca.nodes.nfv.VnfVirtualLink
238 max_bit_rate_requirements:
241 min_bit_rate_requirements:
244 networkName: { get_input: cpe_public_net_id}
245 cidr: { get_input: cpe_public_net_cidr }
250 type: tosca.nodes.nfv.VduCp
252 layer_protocol: [ipv4]
255 - asscociated_layer_protocol: ipv4
257 address_type: ip_address
259 ip_address_assignment: false
260 floating_ip_activated: false
262 - virtual_binding: VDU_vaaa_0
263 # - virtual_link: VL_public
265 Cp_vaaa_onap_private:
266 type: tosca.nodes.nfv.VduCp
268 layer_protocol: [ipv4]
271 - asscociated_layer_protocol: ipv4
273 address_type: ip_address
275 ip_address_assignment: false
276 floating_ip_activated: false
278 - { get_input: vaaa_private_ip_1 }
280 - virtual_binding: VDU_vaaa_0
281 # - virtual_link: VL_onap_private
284 type: tosca.nodes.nfv.VduCp
286 layer_protocol: [ipv4]
289 - asscociated_layer_protocol: ipv4
291 address_type: ip_address
293 ip_address_assignment: false
294 floating_ip_activated: false
296 - { get_input: vaaa_private_ip_0 }
298 - virtual_binding: VDU_vaaa_0
299 - virtual_link: VL_cpe_signal
301 VirtualStorage_root_all:
302 # this indicate the VDU root storage size
303 type: tosca.nodes.nfv.Vdu.VirtualStorage
305 type_of_storage: root
306 size_of_storage: 40 GB
309 type: tosca.nodes.nfv.Vdu.Compute
311 name: { get_input: vaaa_name_0 }
313 configurable_properties:
314 additional_vnfc_configurable_properties: {}
316 min_number_of_instances: 1
317 max_number_of_instances: 1
319 inject_files: #TODO SDC Bug
320 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
321 dest_path: /home/ubuntu/.ssh/authorized_keys
323 vnf_id: { get_input: vnf_id }
324 vf_module_id: { get_input: vf_module_id }
325 dcae_collector_ip: { get_input: dcae_collector_ip }
326 dcae_collector_port: { get_input: dcae_collector_port }
327 cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
328 oam_ipaddr: { get_input: vaaa_private_ip_1 }
329 oam_cidr: { get_input: onap_private_net_cidr }
330 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
331 demo_artifacts_version: { get_input: demo_artifacts_version }
332 install_script_version: { get_input: install_script_version }
333 cloud_env: { get_input: cloud_env }
334 nexus_artifact_repo: { get_input: nexus_artifact_repo }
337 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
338 apt-get -y install jq
341 echo $METADATA | jq -r ".meta.$1"
344 # Create configuration files
346 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
347 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
348 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
349 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
350 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
351 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
352 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
353 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
354 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
355 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
357 # Download and run install script
358 apt-get -y install unzip
359 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
360 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
361 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
362 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
363 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
365 chmod +x v_aaa_install.sh
370 #TODO add local disk size
372 virtual_mem_size: 4096 MB
376 - virtual_storage: VirtualStorage_root_all
378 sw_image: #TODO need to put glance image name here
379 #file: { get_input: vcpe_image_name }
380 file: ../Artifacts/images/ubuntu_16.04
381 type: tosca.artifacts.nfv.SwImage
385 type: tosca.nodes.nfv.VduCp
387 layer_protocol: [ipv4]
390 - asscociated_layer_protocol: ipv4
392 address_type: ip_address
394 ip_address_assignment: false
395 floating_ip_activated: false
397 - virtual_binding: VDU_vdns_0
398 # - virtual_link: VL_public
400 Cp_vdns_onap_private:
401 type: tosca.nodes.nfv.VduCp
403 layer_protocol: [ipv4]
406 - asscociated_layer_protocol: ipv4
408 address_type: ip_address
410 ip_address_assignment: false
411 floating_ip_activated: false
413 - { get_input: vdns_private_ip_1 }
415 - virtual_binding: VDU_vdns_0
416 #- virtual_link: VL_onap_private
419 type: tosca.nodes.nfv.VduCp
421 layer_protocol: [ipv4]
424 - asscociated_layer_protocol: ipv4
426 address_type: ip_address
428 ip_address_assignment: false
429 floating_ip_activated: false
431 - { get_input: vdns_private_ip_0 }
433 - virtual_binding: VDU_vdns_0
434 - virtual_link: VL_cpe_public
437 type: tosca.nodes.nfv.Vdu.Compute
439 name: { get_input: vdns_name_0 }
441 configurable_properties:
442 additional_vnfc_configurable_properties: {}
444 min_number_of_instances: 1
445 max_number_of_instances: 1
447 inject_files: # TODO SDC Bug
448 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
449 dest_path: /home/ubuntu/.ssh/authorized_keys
451 vnf_id: { get_input: vnf_id }
452 vf_module_id: { get_input: vf_module_id }
453 oam_ipaddr: { get_input: vdns_private_ip_1 }
454 cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
455 oam_cidr: { get_input: onap_private_net_cidr }
456 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
457 demo_artifacts_version: { get_input: demo_artifacts_version }
458 install_script_version: { get_input: install_script_version }
459 cloud_env: { get_input: cloud_env }
460 nexus_artifact_repo: { get_input: nexus_artifact_repo }
463 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
464 apt-get -y install jq
467 echo $METADATA | jq -r ".meta.$1"
470 # Create configuration files
472 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
473 echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
474 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
475 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
476 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
477 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
478 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
479 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
481 # Download and run install script
482 apt-get -y install unzip
483 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
484 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
485 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
486 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
487 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
489 chmod +x v_dns_install.sh
494 #TODO add local disk size
496 virtual_mem_size: 4096 MB
500 - virtual_storage: VirtualStorage_root_all
502 sw_image: #TODO need to put glance image name here
503 #file: { get_input: vcpe_image_name }
504 file: ../Artifacts/images/ubuntu_16.04
505 type: tosca.artifacts.nfv.SwImage
509 type: tosca.nodes.nfv.VduCp
511 layer_protocol: [ipv4]
514 - asscociated_layer_protocol: ipv4
516 address_type: ip_address
518 ip_address_assignment: false
519 floating_ip_activated: false
521 - virtual_binding: VDU_vdhcp_0
522 # - virtual_link: VL_public
524 Cp_vdhcp_onap_private:
525 type: tosca.nodes.nfv.VduCp
527 layer_protocol: [ipv4]
530 - asscociated_layer_protocol: ipv4
532 address_type: ip_address
534 ip_address_assignment: false
535 floating_ip_activated: false
537 - { get_input: vdhcp_private_ip_1 }
539 - virtual_binding: VDU_vdhcp_0
540 # - virtual_link: VL_onap_private
543 type: tosca.nodes.nfv.VduCp
545 layer_protocol: [ipv4]
548 - asscociated_layer_protocol: ipv4
550 address_type: ip_address
552 ip_address_assignment: false
553 floating_ip_activated: false
555 - { get_input: vdhcp_private_ip_0 }
557 - virtual_binding: VDU_vdhcp_0
558 - virtual_link: VL_cpe_signal
561 type: tosca.nodes.nfv.Vdu.Compute
563 name: { get_input: vdhcp_name_0 }
565 configurable_properties:
566 additional_vnfc_configurable_properties: {}
568 min_number_of_instances: 1
569 max_number_of_instances: 1
571 inject_files: #SDC Bug
572 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
573 dest_path: /home/ubuntu/.ssh/authorized_keys
575 vnf_id: { get_input: vnf_id }
576 vf_module_id: { get_input: vf_module_id }
577 oam_ipaddr: { get_input: vdhcp_private_ip_1 }
578 cpe_signal_ipaddr: { get_input: vdhcp_private_ip_0 }
579 oam_cidr: { get_input: onap_private_net_cidr }
580 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
581 mr_ip_addr: { get_input: mr_ip_addr }
582 mr_ip_port: { get_input: mr_ip_port }
583 demo_artifacts_version: { get_input: demo_artifacts_version }
584 install_script_version: { get_input: install_script_version }
585 cloud_env: { get_input: cloud_env }
586 nexus_artifact_repo: { get_input: nexus_artifact_repo }
589 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
590 apt-get -y install jq
593 echo $METADATA | jq -r ".meta.$1"
596 # Create configuration files
598 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
599 echo "$(get_metadata cpe_signal_ipaddr)" > /opt/config/cpe_signal_ipaddr.txt
600 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
601 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
602 echo "$(get_metadata mr_ip_addr)" > /opt/config/mr_ip_addr.txt
603 echo "$(get_metadata mr_ip_port)" > /opt/config/mr_ip_port.txt
604 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
605 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
606 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
607 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
609 # Download and run install script
610 apt-get -y install unzip
611 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
612 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
613 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
614 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
615 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dhcp_install.sh
617 chmod +x v_dhcp_install.sh
622 #TODO add local disk size
624 virtual_mem_size: 4096 MB
628 - virtual_storage: VirtualStorage_root_all
630 sw_image: #TODO need to put glance image name here
631 #file: { get_input: vcpe_image_name }
632 file: ../Artifacts/images/ubuntu_16.04
633 type: tosca.artifacts.nfv.SwImage
637 type: tosca.nodes.nfv.VduCp
639 layer_protocol: [ipv4]
642 - asscociated_layer_protocol: ipv4
644 address_type: ip_address
646 ip_address_assignment: false
647 floating_ip_activated: false
649 - virtual_binding: VDU_vweb_0
650 # - virtual_link: VL_public
652 Cp_vweb_onap_private:
653 type: tosca.nodes.nfv.VduCp
655 layer_protocol: [ipv4]
658 - asscociated_layer_protocol: ipv4
660 address_type: ip_address
662 ip_address_assignment: false
663 floating_ip_activated: false
665 - { get_input: vweb_private_ip_1 }
667 - virtual_binding: VDU_vweb_0
668 # - virtual_link: VL_onap_private
671 type: tosca.nodes.nfv.VduCp
673 layer_protocol: [ipv4]
676 - asscociated_layer_protocol: ipv4
678 address_type: ip_address
680 ip_address_assignment: false
681 floating_ip_activated: false
683 - { get_input: vweb_private_ip_0 }
685 - virtual_binding: VDU_vweb_0
686 - virtual_link: VL_cpe_public
689 type: tosca.nodes.nfv.Vdu.Compute
691 name: { get_input: vweb_name_0 }
693 configurable_properties:
694 additional_vnfc_configurable_properties: {}
696 min_number_of_instances: 1
697 max_number_of_instances: 1
699 inject_files: # TODO SDC bug
700 source_path: ../Artifacts/keys/authorized_keys #SSH authorized_keys
701 dest_path: /home/ubuntu/.ssh/authorized_keys
703 vnf_id: { get_input: vnf_id }
704 vf_module_id: { get_input: vf_module_id }
705 oam_ipaddr: { get_input: vweb_private_ip_1 }
706 cpe_public_ipaddr: { get_input: vweb_private_ip_0 }
707 oam_cidr: { get_input: onap_private_net_cidr }
708 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
709 demo_artifacts_version: { get_input: demo_artifacts_version }
710 install_script_version: { get_input: install_script_version }
711 cloud_env: { get_input: cloud_env }
712 nexus_artifact_repo: { get_input: nexus_artifact_repo }
715 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
716 apt-get -y install jq
719 echo $METADATA | jq -r ".meta.$1"
722 # Create configuration files
724 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
725 echo "$(get_metadata cpe_public_ipaddr)" > /opt/config/cpe_public_ipaddr.txt
726 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
727 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
728 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
729 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
730 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
731 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
733 # Download and run install script
734 apt-get -y install unzip
735 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
736 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
737 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
738 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
739 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_web_install.sh
741 chmod +x v_web_install.sh
746 #TODO add local disk size
748 virtual_mem_size: 4096 MB
752 - virtual_storage: VirtualStorage_root_all
754 sw_image: #TODO need to put glance image name here
755 #file: { get_input: vcpe_image_name }
756 file: ../Artifacts/images/ubuntu_16.04
757 type: tosca.artifacts.nfv.SwImage