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
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_protocols: [ipv4]
172 # max_bitrate_requirements:
175 # min_bitrate_requirements:
178 # virtual_link_protocol_data:
179 # - associated_layer_protocol: ipv4
182 # name: { get_input: public_net_id }
186 # type: tosca.nodes.nfv.VnfVirtualLink
189 # layer_protocols: [ipv4]
191 # max_bitrate_requirements:
194 # min_bitrate_requirements:
197 # virtual_link_protocol_data:
198 # - associated_layer_protocol: ipv4
201 # name: { get_input: onap_private_net_id }
202 # cidr: { get_input: onap_private_net_cidr }
206 type: tosca.nodes.nfv.VnfVirtualLink
209 layer_protocols: [ipv4]
211 max_bitrate_requirements:
214 min_bitrate_requirements:
217 virtual_link_protocol_data:
218 - associated_layer_protocol: ipv4
221 name: { get_input: cpe_signal_net_id}
222 cidr: { get_input: cpe_signal_net_cidr }
227 type: tosca.nodes.nfv.VnfVirtualLink
230 layer_protocols: [ipv4]
232 max_bitrate_requirements:
235 min_bitrate_requirements:
238 virtual_link_protocol_data:
239 - associated_layer_protocol: ipv4
242 name: { get_input: cpe_public_net_id}
243 cidr: { get_input: cpe_public_net_cidr }
248 type: tosca.nodes.nfv.VduCp
250 layer_protocols: [ipv4]
253 - associated_layer_protocol: ipv4
255 - address_type: ip_address
257 ip_address_assignment: false
258 floating_ip_activated: false
260 - virtual_binding: VDU_vaaa_0
261 # - virtual_link: VL_public
263 Cp_vaaa_onap_private:
264 type: tosca.nodes.nfv.VduCp
266 layer_protocols: [ipv4]
269 - associated_layer_protocol: ipv4
271 - address_type: ip_address
273 ip_address_assignment: false
274 floating_ip_activated: false
276 - { get_input: vaaa_private_ip_1 }
278 - virtual_binding: VDU_vaaa_0
279 # - virtual_link: VL_onap_private
282 type: tosca.nodes.nfv.VduCp
284 layer_protocols: [ipv4]
287 - associated_layer_protocol: ipv4
289 - address_type: ip_address
291 ip_address_assignment: false
292 floating_ip_activated: false
294 - { get_input: vaaa_private_ip_0 }
296 - virtual_binding: VDU_vaaa_0
297 - virtual_link: VL_cpe_signal
300 type: tosca.nodes.nfv.Vdu.Compute
302 name: { get_input: vaaa_name_0 }
305 min_number_of_instances: 1
306 max_number_of_instances: 1
308 inject_files: #TODO SDC Bug
309 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
310 dest_path: /home/ubuntu/.ssh/authorized_keys
312 vnf_id: { get_input: vnf_id }
313 vf_module_id: { get_input: vf_module_id }
314 dcae_collector_ip: { get_input: dcae_collector_ip }
315 dcae_collector_port: { get_input: dcae_collector_port }
316 cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
317 oam_ipaddr: { get_input: vaaa_private_ip_1 }
318 oam_cidr: { get_input: onap_private_net_cidr }
319 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
320 demo_artifacts_version: { get_input: demo_artifacts_version }
321 install_script_version: { get_input: install_script_version }
322 cloud_env: { get_input: cloud_env }
323 nexus_artifact_repo: { get_input: nexus_artifact_repo }
326 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
327 apt-get -y install jq
330 echo $METADATA | jq -r ".meta.$1"
333 # Create configuration files
335 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
336 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
337 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
338 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
339 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
340 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
341 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
342 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
343 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
344 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
346 # Download and run install script
347 apt-get -y install unzip
348 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
349 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
350 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
351 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
352 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
354 chmod +x v_aaa_install.sh
360 virtual_mem_size: 4096 MB
363 virtual_local_storage:
364 - size_of_storage: 40 GB
366 sw_image: #TODO need to put glance image name here
367 #file: { get_input: vcpe_image_name }
368 file: ../Artifacts/Deployment/OTHER/image
369 type: tosca.artifacts.nfv.SwImage
373 type: tosca.nodes.nfv.VduCp
375 layer_protocols: [ipv4]
378 - associated_layer_protocol: ipv4
380 - address_type: ip_address
382 ip_address_assignment: false
383 floating_ip_activated: false
385 - virtual_binding: VDU_vdns_0
386 # - virtual_link: VL_public
388 Cp_vdns_onap_private:
389 type: tosca.nodes.nfv.VduCp
391 layer_protocols: [ipv4]
394 - associated_layer_protocol: ipv4
396 - address_type: ip_address
398 ip_address_assignment: false
399 floating_ip_activated: false
401 - { get_input: vdns_private_ip_1 }
403 - virtual_binding: VDU_vdns_0
404 #- virtual_link: VL_onap_private
407 type: tosca.nodes.nfv.VduCp
409 layer_protocols: [ipv4]
412 - associated_layer_protocol: ipv4
414 - address_type: ip_address
416 ip_address_assignment: false
417 floating_ip_activated: false
419 - { get_input: vdns_private_ip_0 }
421 - virtual_binding: VDU_vdns_0
422 - virtual_link: VL_cpe_public
425 type: tosca.nodes.nfv.Vdu.Compute
427 name: { get_input: vdns_name_0 }
430 min_number_of_instances: 1
431 max_number_of_instances: 1
433 inject_files: # TODO SDC Bug
434 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
435 dest_path: /home/ubuntu/.ssh/authorized_keys
437 vnf_id: { get_input: vnf_id }
438 vf_module_id: { get_input: vf_module_id }
439 oam_ipaddr: { get_input: vdns_private_ip_1 }
440 cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
441 oam_cidr: { get_input: onap_private_net_cidr }
442 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
443 demo_artifacts_version: { get_input: demo_artifacts_version }
444 install_script_version: { get_input: install_script_version }
445 cloud_env: { get_input: cloud_env }
446 nexus_artifact_repo: { get_input: nexus_artifact_repo }
449 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
450 apt-get -y install jq
453 echo $METADATA | jq -r ".meta.$1"
456 # Create configuration files
458 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
459 echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
460 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
461 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
462 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
463 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
464 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
465 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
467 # Download and run install script
468 apt-get -y install unzip
469 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
470 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
471 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
472 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
473 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
475 chmod +x v_dns_install.sh
481 virtual_mem_size: 4096 MB
484 virtual_local_storage:
485 - size_of_storage: 40 GB
487 sw_image: #TODO need to put glance image name here
488 #file: { get_input: vcpe_image_name }
489 file: ../Artifacts/Deployment/OTHER/image
490 type: tosca.artifacts.nfv.SwImage
494 type: tosca.nodes.nfv.VduCp
496 layer_protocols: [ipv4]
499 - associated_layer_protocol: ipv4
501 - address_type: ip_address
503 ip_address_assignment: false
504 floating_ip_activated: false
506 - virtual_binding: VDU_vdhcp_0
507 # - virtual_link: VL_public
509 Cp_vdhcp_onap_private:
510 type: tosca.nodes.nfv.VduCp
512 layer_protocols: [ipv4]
515 - associated_layer_protocol: ipv4
517 - address_type: ip_address
519 ip_address_assignment: false
520 floating_ip_activated: false
522 - { get_input: vdhcp_private_ip_1 }
524 - virtual_binding: VDU_vdhcp_0
525 # - virtual_link: VL_onap_private
528 type: tosca.nodes.nfv.VduCp
530 layer_protocols: [ipv4]
533 - associated_layer_protocol: ipv4
535 - address_type: ip_address
537 ip_address_assignment: false
538 floating_ip_activated: false
540 - { get_input: vdhcp_private_ip_0 }
542 - virtual_binding: VDU_vdhcp_0
543 - virtual_link: VL_cpe_signal
546 type: tosca.nodes.nfv.Vdu.Compute
548 name: { get_input: vdhcp_name_0 }
551 min_number_of_instances: 1
552 max_number_of_instances: 1
554 inject_files: #SDC Bug
555 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
556 dest_path: /home/ubuntu/.ssh/authorized_keys
558 vnf_id: { get_input: vnf_id }
559 vf_module_id: { get_input: vf_module_id }
560 oam_ipaddr: { get_input: vdhcp_private_ip_1 }
561 cpe_signal_ipaddr: { get_input: vdhcp_private_ip_0 }
562 oam_cidr: { get_input: onap_private_net_cidr }
563 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
564 mr_ip_addr: { get_input: mr_ip_addr }
565 mr_ip_port: { get_input: mr_ip_port }
566 demo_artifacts_version: { get_input: demo_artifacts_version }
567 install_script_version: { get_input: install_script_version }
568 cloud_env: { get_input: cloud_env }
569 nexus_artifact_repo: { get_input: nexus_artifact_repo }
572 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
573 apt-get -y install jq
576 echo $METADATA | jq -r ".meta.$1"
579 # Create configuration files
581 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
582 echo "$(get_metadata cpe_signal_ipaddr)" > /opt/config/cpe_signal_ipaddr.txt
583 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
584 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
585 echo "$(get_metadata mr_ip_addr)" > /opt/config/mr_ip_addr.txt
586 echo "$(get_metadata mr_ip_port)" > /opt/config/mr_ip_port.txt
587 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
588 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
589 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
590 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
592 # Download and run install script
593 apt-get -y install unzip
594 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
595 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
596 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
597 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
598 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dhcp_install.sh
600 chmod +x v_dhcp_install.sh
606 virtual_mem_size: 4096 MB
609 virtual_local_storage:
610 - size_of_storage: 40 GB
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_protocols: [ipv4]
624 - associated_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_protocols: [ipv4]
640 - associated_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_protocols: [ipv4]
658 - associated_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 }
676 min_number_of_instances: 1
677 max_number_of_instances: 1
679 inject_files: # TODO SDC bug
680 source_path: ../Artifacts/Deployment/OTHER/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
727 virtual_mem_size: 4096 MB
730 virtual_local_storage:
731 - size_of_storage: 40 GB
733 sw_image: #TODO need to put glance image name here
734 #file: { get_input: vcpe_image_name }
735 file: ../Artifacts/Deployment/OTHER/image
736 type: tosca.artifacts.nfv.SwImage