1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_infra
4 template_version: "1.0"
6 VNFD_SCHEMA_VERSION: "2.5.1+1"
7 description: vCPE_infra
14 # substitution_mappings:
15 # node_type: onap.vcpe_infra
17 # virtual_link: [ Cp_vaaa_public, virtual_link ] # expose as external CP
18 # virtual_link: [ Cp_vaaa_onap_private, virtual_link ] # expose as external CP
19 # virtual_link: [ Cp_vdns_public, virtual_link ]
20 # virtual_link: [ Cp_vdns_onap_private, virtual_link ]
21 # virtual_link: [ Cp_vdhcp_public, virtual_link ]
22 # virtual_link: [ Cp_vdhcp_onap_private, virtual_link ]
23 # virtual_link: [ Cp_vweb_public, virtual_link ]
24 # virtual_link: [ Cp_vweb_onap_private, virtual_link ]
29 description: image name for vcpe in openstack glance
33 description: public network id used during onap installation
37 description: onap OAM network id
39 onap_private_net_cidr:
41 description: oanp OAM network cidr
45 description: message router ip that for vDHCP configuration
49 description: IP port of the Message Router that for vDHCP configuration
53 description: dcae collector ip
57 description: dcae collector port
61 description: Root URL for the Nexus repository for Maven artifacts
62 default: https://nexus.onap.org
63 demo_artifacts_version:
65 description: artifacts version used in demo vnfs
67 install_script_version:
69 description: install script version number
70 default: 1.2.0-SNAPSHOT
73 description: cloud environment(openstack or rackspace)
77 description: ssh public key
78 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
81 description: cpe signal net name
82 default: zdfw1cpe01_private
85 description: cpe signal net cidr
89 description: cpe public net name
90 default: zdfw1cpe01_public
93 description: cpe public net cidr
97 description: vdu vdhcp_0 name
98 default: zdcpe1cpe01dhcp01
101 description: ip of vdhcp port to cpe signal net
105 description: ip of vdhcp port to onap oam net
109 description: vdu vaaa_0 name
110 default: zdcpe1cpe01aaa01
113 description: ip of vaaa port to cpe signal net
117 description: ip of vaaa port to onap oam net
121 description: vdu vdns_0 name
122 default: zdcpe1cpe01dns01
125 description: ip of vdns port to cpe public net
129 description: ip of vdns port to onap oam net
133 description: vdu vweb_0 name
134 default: zdcpe1cpe01web01
137 description: ip of vweb port to cpe public net
141 description: ip of vweb port to onap oam net
145 description: The VNF ID is provided by ONAP
146 default: vCPE_Infrastructure_demo_app
149 description: The vCPE Module ID is provided by ONAP
150 default: vCPE_Intrastructure
154 type: tosca.nodes.nfv.VNF
156 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
158 product_name: vcpe_infra
159 software_version: '1.0'
160 descriptor_version: '1.0'
162 flavour_description: simple
168 # type: tosca.nodes.nfv.VnfVirtualLink
171 # layer_protocols: [ipv4]
173 # max_bitrate_requirements:
176 # min_bitrate_requirements:
179 # virtual_link_protocol_data:
180 # - associated_layer_protocol: ipv4
183 # name: { get_input: public_net_id }
187 # type: tosca.nodes.nfv.VnfVirtualLink
190 # layer_protocols: [ipv4]
192 # max_bitrate_requirements:
195 # min_bitrate_requirements:
198 # virtual_link_protocol_data:
199 # - associated_layer_protocol: ipv4
202 # name: { get_input: onap_private_net_id }
203 # cidr: { get_input: onap_private_net_cidr }
207 type: tosca.nodes.nfv.VnfVirtualLink
210 layer_protocols: [ipv4]
212 max_bitrate_requirements:
215 min_bitrate_requirements:
218 virtual_link_protocol_data:
219 - associated_layer_protocol: ipv4
222 name: { get_input: cpe_signal_net_id}
223 cidr: { get_input: cpe_signal_net_cidr }
228 type: tosca.nodes.nfv.VnfVirtualLink
231 layer_protocols: [ipv4]
233 max_bitrate_requirements:
236 min_bitrate_requirements:
239 virtual_link_protocol_data:
240 - associated_layer_protocol: ipv4
243 name: { get_input: cpe_public_net_id}
244 cidr: { get_input: cpe_public_net_cidr }
249 type: tosca.nodes.nfv.VduCp
251 layer_protocols: [ipv4]
254 - associated_layer_protocol: ipv4
256 - address_type: ip_address
258 ip_address_assignment: false
259 floating_ip_activated: false
261 - virtual_binding: VDU_vaaa_0
262 # - virtual_link: VL_public
264 Cp_vaaa_onap_private:
265 type: tosca.nodes.nfv.VduCp
267 layer_protocols: [ipv4]
270 - associated_layer_protocol: ipv4
272 - address_type: ip_address
274 ip_address_assignment: false
275 floating_ip_activated: false
277 - { get_input: vaaa_private_ip_1 }
279 - virtual_binding: VDU_vaaa_0
280 # - virtual_link: VL_onap_private
283 type: tosca.nodes.nfv.VduCp
285 layer_protocols: [ipv4]
288 - associated_layer_protocol: ipv4
290 - address_type: ip_address
292 ip_address_assignment: false
293 floating_ip_activated: false
295 - { get_input: vaaa_private_ip_0 }
297 - virtual_binding: VDU_vaaa_0
298 - virtual_link: VL_cpe_signal
301 type: tosca.nodes.nfv.Vdu.Compute
303 name: { get_input: vaaa_name_0 }
306 min_number_of_instances: 1
307 max_number_of_instances: 1
309 inject_files: #TODO SDC Bug
310 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
311 dest_path: /home/ubuntu/.ssh/authorized_keys
313 vnf_id: { get_input: vnf_id }
314 vf_module_id: { get_input: vf_module_id }
315 dcae_collector_ip: { get_input: dcae_collector_ip }
316 dcae_collector_port: { get_input: dcae_collector_port }
317 cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
318 oam_ipaddr: { get_input: vaaa_private_ip_1 }
319 oam_cidr: { get_input: onap_private_net_cidr }
320 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
321 demo_artifacts_version: { get_input: demo_artifacts_version }
322 install_script_version: { get_input: install_script_version }
323 cloud_env: { get_input: cloud_env }
324 nexus_artifact_repo: { get_input: nexus_artifact_repo }
327 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
328 apt-get -y install jq
331 echo $METADATA | jq -r ".meta.$1"
334 # Create configuration files
336 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
337 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
338 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
339 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
340 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
341 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
342 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
343 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
344 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
345 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
347 # Download and run install script
348 apt-get -y install unzip
349 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
350 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
351 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
352 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
353 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
355 chmod +x v_aaa_install.sh
361 virtual_mem_size: 4096 MB
364 virtual_local_storage:
365 - size_of_storage: 40 GB
367 sw_image: #TODO need to put glance image name here
368 #file: { get_input: vcpe_image_name }
369 file: ../Artifacts/Deployment/OTHER/image
370 type: tosca.artifacts.nfv.SwImage
374 type: tosca.nodes.nfv.VduCp
376 layer_protocols: [ipv4]
379 - associated_layer_protocol: ipv4
381 - address_type: ip_address
383 ip_address_assignment: false
384 floating_ip_activated: false
386 - virtual_binding: VDU_vdns_0
387 # - virtual_link: VL_public
389 Cp_vdns_onap_private:
390 type: tosca.nodes.nfv.VduCp
392 layer_protocols: [ipv4]
395 - associated_layer_protocol: ipv4
397 - address_type: ip_address
399 ip_address_assignment: false
400 floating_ip_activated: false
402 - { get_input: vdns_private_ip_1 }
404 - virtual_binding: VDU_vdns_0
405 #- virtual_link: VL_onap_private
408 type: tosca.nodes.nfv.VduCp
410 layer_protocols: [ipv4]
413 - associated_layer_protocol: ipv4
415 - address_type: ip_address
417 ip_address_assignment: false
418 floating_ip_activated: false
420 - { get_input: vdns_private_ip_0 }
422 - virtual_binding: VDU_vdns_0
423 - virtual_link: VL_cpe_public
426 type: tosca.nodes.nfv.Vdu.Compute
428 name: { get_input: vdns_name_0 }
431 min_number_of_instances: 1
432 max_number_of_instances: 1
434 inject_files: # TODO SDC Bug
435 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
436 dest_path: /home/ubuntu/.ssh/authorized_keys
438 vnf_id: { get_input: vnf_id }
439 vf_module_id: { get_input: vf_module_id }
440 oam_ipaddr: { get_input: vdns_private_ip_1 }
441 cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
442 oam_cidr: { get_input: onap_private_net_cidr }
443 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
444 demo_artifacts_version: { get_input: demo_artifacts_version }
445 install_script_version: { get_input: install_script_version }
446 cloud_env: { get_input: cloud_env }
447 nexus_artifact_repo: { get_input: nexus_artifact_repo }
450 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
451 apt-get -y install jq
454 echo $METADATA | jq -r ".meta.$1"
457 # Create configuration files
459 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
460 echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
461 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
462 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
463 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
464 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
465 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
466 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
468 # Download and run install script
469 apt-get -y install unzip
470 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
471 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
472 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
473 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
474 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
476 chmod +x v_dns_install.sh
482 virtual_mem_size: 4096 MB
485 virtual_local_storage:
486 - size_of_storage: 40 GB
488 sw_image: #TODO need to put glance image name here
489 #file: { get_input: vcpe_image_name }
490 file: ../Artifacts/Deployment/OTHER/image
491 type: tosca.artifacts.nfv.SwImage
495 type: tosca.nodes.nfv.VduCp
497 layer_protocols: [ipv4]
500 - associated_layer_protocol: ipv4
502 - address_type: ip_address
504 ip_address_assignment: false
505 floating_ip_activated: false
507 - virtual_binding: VDU_vdhcp_0
508 # - virtual_link: VL_public
510 Cp_vdhcp_onap_private:
511 type: tosca.nodes.nfv.VduCp
513 layer_protocols: [ipv4]
516 - associated_layer_protocol: ipv4
518 - address_type: ip_address
520 ip_address_assignment: false
521 floating_ip_activated: false
523 - { get_input: vdhcp_private_ip_1 }
525 - virtual_binding: VDU_vdhcp_0
526 # - virtual_link: VL_onap_private
529 type: tosca.nodes.nfv.VduCp
531 layer_protocols: [ipv4]
534 - associated_layer_protocol: ipv4
536 - address_type: ip_address
538 ip_address_assignment: false
539 floating_ip_activated: false
541 - { get_input: vdhcp_private_ip_0 }
543 - virtual_binding: VDU_vdhcp_0
544 - virtual_link: VL_cpe_signal
547 type: tosca.nodes.nfv.Vdu.Compute
549 name: { get_input: vdhcp_name_0 }
552 min_number_of_instances: 1
553 max_number_of_instances: 1
555 inject_files: #SDC Bug
556 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
557 dest_path: /home/ubuntu/.ssh/authorized_keys
559 vnf_id: { get_input: vnf_id }
560 vf_module_id: { get_input: vf_module_id }
561 oam_ipaddr: { get_input: vdhcp_private_ip_1 }
562 cpe_signal_ipaddr: { get_input: vdhcp_private_ip_0 }
563 oam_cidr: { get_input: onap_private_net_cidr }
564 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
565 mr_ip_addr: { get_input: mr_ip_addr }
566 mr_ip_port: { get_input: mr_ip_port }
567 demo_artifacts_version: { get_input: demo_artifacts_version }
568 install_script_version: { get_input: install_script_version }
569 cloud_env: { get_input: cloud_env }
570 nexus_artifact_repo: { get_input: nexus_artifact_repo }
573 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
574 apt-get -y install jq
577 echo $METADATA | jq -r ".meta.$1"
580 # Create configuration files
582 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
583 echo "$(get_metadata cpe_signal_ipaddr)" > /opt/config/cpe_signal_ipaddr.txt
584 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
585 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
586 echo "$(get_metadata mr_ip_addr)" > /opt/config/mr_ip_addr.txt
587 echo "$(get_metadata mr_ip_port)" > /opt/config/mr_ip_port.txt
588 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
589 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
590 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
591 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
593 # Download and run install script
594 apt-get -y install unzip
595 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
596 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
597 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
598 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
599 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dhcp_install.sh
601 chmod +x v_dhcp_install.sh
607 virtual_mem_size: 4096 MB
610 virtual_local_storage:
611 - size_of_storage: 40 GB
613 sw_image: #TODO need to put glance image name here
614 #file: { get_input: vcpe_image_name }
615 file: ../Artifacts/Deployment/OTHER/image
616 type: tosca.artifacts.nfv.SwImage
620 type: tosca.nodes.nfv.VduCp
622 layer_protocols: [ipv4]
625 - associated_layer_protocol: ipv4
627 - address_type: ip_address
629 ip_address_assignment: false
630 floating_ip_activated: false
632 - virtual_binding: VDU_vweb_0
633 # - virtual_link: VL_public
635 Cp_vweb_onap_private:
636 type: tosca.nodes.nfv.VduCp
638 layer_protocols: [ipv4]
641 - associated_layer_protocol: ipv4
643 - address_type: ip_address
645 ip_address_assignment: false
646 floating_ip_activated: false
648 - { get_input: vweb_private_ip_1 }
650 - virtual_binding: VDU_vweb_0
651 # - virtual_link: VL_onap_private
654 type: tosca.nodes.nfv.VduCp
656 layer_protocols: [ipv4]
659 - associated_layer_protocol: ipv4
661 - address_type: ip_address
663 ip_address_assignment: false
664 floating_ip_activated: false
666 - { get_input: vweb_private_ip_0 }
668 - virtual_binding: VDU_vweb_0
669 - virtual_link: VL_cpe_public
672 type: tosca.nodes.nfv.Vdu.Compute
674 name: { get_input: vweb_name_0 }
677 min_number_of_instances: 1
678 max_number_of_instances: 1
680 inject_files: # TODO SDC bug
681 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
682 dest_path: /home/ubuntu/.ssh/authorized_keys
684 vnf_id: { get_input: vnf_id }
685 vf_module_id: { get_input: vf_module_id }
686 oam_ipaddr: { get_input: vweb_private_ip_1 }
687 cpe_public_ipaddr: { get_input: vweb_private_ip_0 }
688 oam_cidr: { get_input: onap_private_net_cidr }
689 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
690 demo_artifacts_version: { get_input: demo_artifacts_version }
691 install_script_version: { get_input: install_script_version }
692 cloud_env: { get_input: cloud_env }
693 nexus_artifact_repo: { get_input: nexus_artifact_repo }
696 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
697 apt-get -y install jq
700 echo $METADATA | jq -r ".meta.$1"
703 # Create configuration files
705 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
706 echo "$(get_metadata cpe_public_ipaddr)" > /opt/config/cpe_public_ipaddr.txt
707 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
708 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
709 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
710 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
711 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
712 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
714 # Download and run install script
715 apt-get -y install unzip
716 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
717 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
718 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
719 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
720 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_web_install.sh
722 chmod +x v_web_install.sh
728 virtual_mem_size: 4096 MB
731 virtual_local_storage:
732 - size_of_storage: 40 GB
734 sw_image: #TODO need to put glance image name here
735 #file: { get_input: vcpe_image_name }
736 file: ../Artifacts/Deployment/OTHER/image
737 type: tosca.artifacts.nfv.SwImage