1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_infra
4 template_version: "1.0"
6 description: vCPE_infra
13 # substitution_mappings:
14 # node_type: onap.vcpe_infra
16 # virtual_link: [ Cp_vaaa_public, virtual_link ] # expose as external CP
17 # virtual_link: [ Cp_vaaa_onap_private, virtual_link ] # expose as external CP
18 # virtual_link: [ Cp_vdns_public, virtual_link ]
19 # virtual_link: [ Cp_vdns_onap_private, virtual_link ]
20 # virtual_link: [ Cp_vdhcp_public, virtual_link ]
21 # virtual_link: [ Cp_vdhcp_onap_private, virtual_link ]
22 # virtual_link: [ Cp_vweb_public, virtual_link ]
23 # virtual_link: [ Cp_vweb_onap_private, virtual_link ]
28 description: image name for vcpe in openstack glance
32 description: public network id used during onap installation
36 description: onap OAM network id
38 onap_private_net_cidr:
40 description: oanp OAM network cidr
44 description: message router ip that for vDHCP configuration
48 description: IP port of the Message Router that for vDHCP configuration
52 description: dcae collector ip
56 description: dcae collector port
60 description: Root URL for the Nexus repository for Maven artifacts
61 default: https://nexus.onap.org
62 demo_artifacts_version:
64 description: artifacts version used in demo vnfs
66 install_script_version:
68 description: install script version number
69 default: 1.2.0-SNAPSHOT
72 description: cloud environment(openstack or rackspace)
76 description: ssh public key
77 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
80 description: cpe signal net name
81 default: zdfw1cpe01_private
84 description: cpe signal net cidr
88 description: cpe public net name
89 default: zdfw1cpe01_public
92 description: cpe public net cidr
96 description: vdu vdhcp_0 name
97 default: zdcpe1cpe01dhcp01
100 description: ip of vdhcp port to cpe signal net
104 description: ip of vdhcp port to onap oam net
108 description: vdu vaaa_0 name
109 default: zdcpe1cpe01aaa01
112 description: ip of vaaa port to cpe signal net
116 description: ip of vaaa port to onap oam net
120 description: vdu vdns_0 name
121 default: zdcpe1cpe01dns01
124 description: ip of vdns port to cpe public net
128 description: ip of vdns port to onap oam net
132 description: vdu vweb_0 name
133 default: zdcpe1cpe01web01
136 description: ip of vweb port to cpe public net
140 description: ip of vweb port to onap oam net
144 description: The VNF ID is provided by ONAP
145 default: vCPE_Infrastructure_demo_app
148 description: The vCPE Module ID is provided by ONAP
149 default: vCPE_Intrastructure
153 type: tosca.nodes.nfv.VNF
155 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
157 product_name: vcpe_infra
158 software_version: '1.0'
159 descriptor_version: '1.0'
161 flavour_description: simple
167 # type: tosca.nodes.nfv.VnfVirtualLink
170 # layer_protocol: ipv4
172 # max_bit_rate_requirements:
175 # min_bit_rate_requirements:
178 # networkName: { get_input: public_net_id }
182 # type: tosca.nodes.nfv.VnfVirtualLink
185 # layer_protocol: ipv4
187 # max_bit_rate_requirements:
190 # min_bit_rate_requirements:
193 # networkName: { get_input: onap_private_net_id }
194 # cidr: { get_input: onap_private_net_cidr }
198 type: tosca.nodes.nfv.VnfVirtualLink
203 max_bit_rate_requirements:
206 min_bit_rate_requirements:
209 networkName: { get_input: cpe_signal_net_id}
210 cidr: { get_input: cpe_signal_net_cidr }
215 type: tosca.nodes.nfv.VnfVirtualLink
220 max_bit_rate_requirements:
223 min_bit_rate_requirements:
226 networkName: { get_input: cpe_public_net_id}
227 cidr: { get_input: cpe_public_net_cidr }
232 type: tosca.nodes.nfv.VduCp
234 layer_protocol: [ipv4]
237 - asscociated_layer_protocol: ipv4
239 address_type: ip_address
241 ip_address_assignment: false
242 floating_ip_activated: false
244 - virtual_binding: VDU_vaaa_0
245 # - virtual_link: VL_public
247 Cp_vaaa_onap_private:
248 type: tosca.nodes.nfv.VduCp
250 layer_protocol: [ipv4]
253 - asscociated_layer_protocol: ipv4
255 address_type: ip_address
257 ip_address_assignment: false
258 floating_ip_activated: false
260 - { get_input: vaaa_private_ip_1 }
262 - virtual_binding: VDU_vaaa_0
263 # - virtual_link: VL_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_0 }
280 - virtual_binding: VDU_vaaa_0
281 - virtual_link: VL_cpe_signal
283 VirtualStorage_root_all:
284 # this indicate the VDU root storage size
285 type: tosca.nodes.nfv.Vdu.VirtualStorage
287 type_of_storage: root
288 size_of_storage: 40 GB
291 type: tosca.nodes.nfv.Vdu.Compute
293 name: { get_input: vaaa_name_0 }
295 configurable_properties:
296 additional_vnfc_configurable_properties: {}
298 min_number_of_instances: 1
299 max_number_of_instances: 1
301 inject_files: #TODO SDC Bug
302 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
303 dest_path: /home/ubuntu/.ssh/authorized_keys
305 vnf_id: { get_input: vnf_id }
306 vf_module_id: { get_input: vf_module_id }
307 dcae_collector_ip: { get_input: dcae_collector_ip }
308 dcae_collector_port: { get_input: dcae_collector_port }
309 cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
310 oam_ipaddr: { get_input: vaaa_private_ip_1 }
311 oam_cidr: { get_input: onap_private_net_cidr }
312 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
313 demo_artifacts_version: { get_input: demo_artifacts_version }
314 install_script_version: { get_input: install_script_version }
315 cloud_env: { get_input: cloud_env }
316 nexus_artifact_repo: { get_input: nexus_artifact_repo }
319 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
320 apt-get -y install jq
323 echo $METADATA | jq -r ".meta.$1"
326 # Create configuration files
328 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
329 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
330 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
331 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
332 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
333 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
334 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
335 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
336 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
337 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
339 # Download and run install script
340 apt-get -y install unzip
341 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
342 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
343 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
344 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
345 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
347 chmod +x v_aaa_install.sh
352 #TODO add local disk size
354 virtual_mem_size: 4096 MB
358 - virtual_storage: VirtualStorage_root_all
360 sw_image: #TODO need to put glance image name here
361 #file: { get_input: vcpe_image_name }
362 file: ../Artifacts/Deployment/OTHER/image
363 type: tosca.artifacts.nfv.SwImage
367 type: tosca.nodes.nfv.VduCp
369 layer_protocol: [ipv4]
372 - asscociated_layer_protocol: ipv4
374 address_type: ip_address
376 ip_address_assignment: false
377 floating_ip_activated: false
379 - virtual_binding: VDU_vdns_0
380 # - virtual_link: VL_public
382 Cp_vdns_onap_private:
383 type: tosca.nodes.nfv.VduCp
385 layer_protocol: [ipv4]
388 - asscociated_layer_protocol: ipv4
390 address_type: ip_address
392 ip_address_assignment: false
393 floating_ip_activated: false
395 - { get_input: vdns_private_ip_1 }
397 - virtual_binding: VDU_vdns_0
398 #- virtual_link: VL_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_0 }
415 - virtual_binding: VDU_vdns_0
416 - virtual_link: VL_cpe_public
419 type: tosca.nodes.nfv.Vdu.Compute
421 name: { get_input: vdns_name_0 }
423 configurable_properties:
424 additional_vnfc_configurable_properties: {}
426 min_number_of_instances: 1
427 max_number_of_instances: 1
429 inject_files: # TODO SDC Bug
430 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
431 dest_path: /home/ubuntu/.ssh/authorized_keys
433 vnf_id: { get_input: vnf_id }
434 vf_module_id: { get_input: vf_module_id }
435 oam_ipaddr: { get_input: vdns_private_ip_1 }
436 cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
437 oam_cidr: { get_input: onap_private_net_cidr }
438 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
439 demo_artifacts_version: { get_input: demo_artifacts_version }
440 install_script_version: { get_input: install_script_version }
441 cloud_env: { get_input: cloud_env }
442 nexus_artifact_repo: { get_input: nexus_artifact_repo }
445 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
446 apt-get -y install jq
449 echo $METADATA | jq -r ".meta.$1"
452 # Create configuration files
454 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
455 echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
456 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
457 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
458 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
459 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
460 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
461 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
463 # Download and run install script
464 apt-get -y install unzip
465 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
466 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
467 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
468 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
469 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
471 chmod +x v_dns_install.sh
476 #TODO add local disk size
478 virtual_mem_size: 4096 MB
482 - virtual_storage: VirtualStorage_root_all
484 sw_image: #TODO need to put glance image name here
485 #file: { get_input: vcpe_image_name }
486 file: ../Artifacts/Deployment/OTHER/image
487 type: tosca.artifacts.nfv.SwImage
491 type: tosca.nodes.nfv.VduCp
493 layer_protocol: [ipv4]
496 - asscociated_layer_protocol: ipv4
498 address_type: ip_address
500 ip_address_assignment: false
501 floating_ip_activated: false
503 - virtual_binding: VDU_vdhcp_0
504 # - virtual_link: VL_public
506 Cp_vdhcp_onap_private:
507 type: tosca.nodes.nfv.VduCp
509 layer_protocol: [ipv4]
512 - asscociated_layer_protocol: ipv4
514 address_type: ip_address
516 ip_address_assignment: false
517 floating_ip_activated: false
519 - { get_input: vdhcp_private_ip_1 }
521 - virtual_binding: VDU_vdhcp_0
522 # - virtual_link: VL_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_0 }
539 - virtual_binding: VDU_vdhcp_0
540 - virtual_link: VL_cpe_signal
543 type: tosca.nodes.nfv.Vdu.Compute
545 name: { get_input: vdhcp_name_0 }
547 configurable_properties:
548 additional_vnfc_configurable_properties: {}
550 min_number_of_instances: 1
551 max_number_of_instances: 1
553 inject_files: #SDC Bug
554 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
555 dest_path: /home/ubuntu/.ssh/authorized_keys
557 vnf_id: { get_input: vnf_id }
558 vf_module_id: { get_input: vf_module_id }
559 oam_ipaddr: { get_input: vdhcp_private_ip_1 }
560 cpe_signal_ipaddr: { get_input: vdhcp_private_ip_0 }
561 oam_cidr: { get_input: onap_private_net_cidr }
562 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
563 mr_ip_addr: { get_input: mr_ip_addr }
564 mr_ip_port: { get_input: mr_ip_port }
565 demo_artifacts_version: { get_input: demo_artifacts_version }
566 install_script_version: { get_input: install_script_version }
567 cloud_env: { get_input: cloud_env }
568 nexus_artifact_repo: { get_input: nexus_artifact_repo }
571 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
572 apt-get -y install jq
575 echo $METADATA | jq -r ".meta.$1"
578 # Create configuration files
580 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
581 echo "$(get_metadata cpe_signal_ipaddr)" > /opt/config/cpe_signal_ipaddr.txt
582 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
583 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
584 echo "$(get_metadata mr_ip_addr)" > /opt/config/mr_ip_addr.txt
585 echo "$(get_metadata mr_ip_port)" > /opt/config/mr_ip_port.txt
586 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
587 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
588 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
589 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
591 # Download and run install script
592 apt-get -y install unzip
593 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
594 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
595 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
596 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
597 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dhcp_install.sh
599 chmod +x v_dhcp_install.sh
604 #TODO add local disk size
606 virtual_mem_size: 4096 MB
610 - virtual_storage: VirtualStorage_root_all
612 sw_image: #TODO need to put glance image name here
613 #file: { get_input: vcpe_image_name }
614 file: ../Artifacts/Deployment/OTHER/image
615 type: tosca.artifacts.nfv.SwImage
619 type: tosca.nodes.nfv.VduCp
621 layer_protocol: [ipv4]
624 - asscociated_layer_protocol: ipv4
626 address_type: ip_address
628 ip_address_assignment: false
629 floating_ip_activated: false
631 - virtual_binding: VDU_vweb_0
632 # - virtual_link: VL_public
634 Cp_vweb_onap_private:
635 type: tosca.nodes.nfv.VduCp
637 layer_protocol: [ipv4]
640 - asscociated_layer_protocol: ipv4
642 address_type: ip_address
644 ip_address_assignment: false
645 floating_ip_activated: false
647 - { get_input: vweb_private_ip_1 }
649 - virtual_binding: VDU_vweb_0
650 # - virtual_link: VL_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_0 }
667 - virtual_binding: VDU_vweb_0
668 - virtual_link: VL_cpe_public
671 type: tosca.nodes.nfv.Vdu.Compute
673 name: { get_input: vweb_name_0 }
675 configurable_properties:
676 additional_vnfc_configurable_properties: {}
678 min_number_of_instances: 1
679 max_number_of_instances: 1
681 inject_files: # TODO SDC bug
682 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
683 dest_path: /home/ubuntu/.ssh/authorized_keys
685 vnf_id: { get_input: vnf_id }
686 vf_module_id: { get_input: vf_module_id }
687 oam_ipaddr: { get_input: vweb_private_ip_1 }
688 cpe_public_ipaddr: { get_input: vweb_private_ip_0 }
689 oam_cidr: { get_input: onap_private_net_cidr }
690 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
691 demo_artifacts_version: { get_input: demo_artifacts_version }
692 install_script_version: { get_input: install_script_version }
693 cloud_env: { get_input: cloud_env }
694 nexus_artifact_repo: { get_input: nexus_artifact_repo }
697 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
698 apt-get -y install jq
701 echo $METADATA | jq -r ".meta.$1"
704 # Create configuration files
706 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
707 echo "$(get_metadata cpe_public_ipaddr)" > /opt/config/cpe_public_ipaddr.txt
708 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
709 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
710 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
711 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
712 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
713 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
715 # Download and run install script
716 apt-get -y install unzip
717 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
718 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
719 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
720 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
721 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_web_install.sh
723 chmod +x v_web_install.sh
728 #TODO add local disk size
730 virtual_mem_size: 4096 MB
734 - virtual_storage: VirtualStorage_root_all
736 sw_image: #TODO need to put glance image name here
737 #file: { get_input: vcpe_image_name }
738 file: ../Artifacts/Deployment/OTHER/image
739 type: tosca.artifacts.nfv.SwImage