1 tosca_definitions_version: tosca_simple_yaml_1_0
3 template_name: vCPE_infra
4 template_version: "1.0"
6 description: vCPE_infra
12 # substitution_mappings:
13 # node_type: onap.vcpe_infra
15 # virtual_link: [ Cp_vaaa_public, virtual_link ] # expose as external CP
16 # virtual_link: [ Cp_vaaa_onap_private, virtual_link ] # expose as external CP
17 # virtual_link: [ Cp_vdns_public, virtual_link ]
18 # virtual_link: [ Cp_vdns_onap_private, virtual_link ]
19 # virtual_link: [ Cp_vdhcp_public, virtual_link ]
20 # virtual_link: [ Cp_vdhcp_onap_private, virtual_link ]
21 # virtual_link: [ Cp_vweb_public, virtual_link ]
22 # virtual_link: [ Cp_vweb_onap_private, virtual_link ]
27 description: image name for vcpe in openstack glance
31 description: public network id used during onap installation
35 description: onap OAM network id
37 onap_private_net_cidr:
39 description: oanp OAM network cidr
43 description: message router ip that for vDHCP configuration
47 description: IP port of the Message Router that for vDHCP configuration
51 description: dcae collector ip
55 description: dcae collector port
59 description: Root URL for the Nexus repository for Maven artifacts
60 default: https://nexus.onap.org
61 demo_artifacts_version:
63 description: artifacts version used in demo vnfs
65 install_script_version:
67 description: install script version number
68 default: 1.2.0-SNAPSHOT
71 description: cloud environment(openstack or rackspace)
75 description: ssh public key
76 default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGx6SKrAuCz1V8KGevZueksLdWoPWJP6z3r29Z7TmPVEOjM+7PIPeSs2BVRx3rnHZBAlasMrZ+fJBS25ts9vfC+ItezQah/hr9vrkmwxCR54Lb84poW+sToPeF6i5eZY7W+jWJfLaFSFx9d2vp4zes/fOlT3NvYCXbn/3QdryQoGl7VFI8oemZypVcikZXElJeeKgAVdSwnrzuqtO/tmbXcAeSbYvVjki8ywYcsWMVMYWUWhh+1BAB6kXnTsIWqzrq0Pfvy+81WDwtiqsqmd93HY8hE0scBrXFBZzQS/AYfIFBlEuFNdLczchntjbZ0n7dmDXk8zHtCZYNk7kwb8k/
79 description: cpe signal net name
80 default: zdfw1cpe01_private
83 description: cpe signal net cidr
87 description: cpe public net name
88 default: zdfw1cpe01_public
91 description: cpe public net cidr
95 description: vdu vdhcp_0 name
96 default: zdcpe1cpe01dhcp01
99 description: ip of vdhcp port to cpe signal net
103 description: ip of vdhcp port to onap oam net
107 description: vdu vaaa_0 name
108 default: zdcpe1cpe01aaa01
111 description: ip of vaaa port to cpe signal net
115 description: ip of vaaa port to onap oam net
119 description: vdu vdns_0 name
120 default: zdcpe1cpe01dns01
123 description: ip of vdns port to cpe public net
127 description: ip of vdns port to onap oam net
131 description: vdu vweb_0 name
132 default: zdcpe1cpe01web01
135 description: ip of vweb port to cpe public net
139 description: ip of vweb port to onap oam net
143 description: The VNF ID is provided by ONAP
144 default: vCPE_Infrastructure_demo_app
147 description: The vCPE Module ID is provided by ONAP
148 default: vCPE_Intrastructure
152 type: tosca.nodes.nfv.VNF
154 descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1177
156 product_name: vcpe_infra
157 software_version: '1.0'
158 descriptor_version: '1.0'
160 flavour_description: simple
166 # type: tosca.nodes.nfv.VnfVirtualLink
169 # layer_protocol: ipv4
171 # max_bit_rate_requirements:
174 # min_bit_rate_requirements:
177 # networkName: { get_input: public_net_id }
181 # type: tosca.nodes.nfv.VnfVirtualLink
184 # layer_protocol: ipv4
186 # max_bit_rate_requirements:
189 # min_bit_rate_requirements:
192 # networkName: { get_input: onap_private_net_id }
193 # cidr: { get_input: onap_private_net_cidr }
197 type: tosca.nodes.nfv.VnfVirtualLink
202 max_bit_rate_requirements:
205 min_bit_rate_requirements:
208 networkName: { get_input: cpe_signal_net_id}
209 cidr: { get_input: cpe_signal_net_cidr }
214 type: tosca.nodes.nfv.VnfVirtualLink
219 max_bit_rate_requirements:
222 min_bit_rate_requirements:
225 networkName: { get_input: cpe_public_net_id}
226 cidr: { get_input: cpe_public_net_cidr }
231 type: tosca.nodes.nfv.VduCp
233 layer_protocol: [ipv4]
236 - asscociated_layer_protocol: ipv4
238 address_type: ip_address
240 ip_address_assignment: false
241 floating_ip_activated: false
243 - virtual_binding: VDU_vaaa_0
244 # - virtual_link: VL_public
246 Cp_vaaa_onap_private:
247 type: tosca.nodes.nfv.VduCp
249 layer_protocol: [ipv4]
252 - asscociated_layer_protocol: ipv4
254 address_type: ip_address
256 ip_address_assignment: false
257 floating_ip_activated: false
259 - { get_input: vaaa_private_ip_1 }
261 - virtual_binding: VDU_vaaa_0
262 # - virtual_link: VL_onap_private
265 type: tosca.nodes.nfv.VduCp
267 layer_protocol: [ipv4]
270 - asscociated_layer_protocol: ipv4
272 address_type: ip_address
274 ip_address_assignment: false
275 floating_ip_activated: false
277 - { get_input: vaaa_private_ip_0 }
279 - virtual_binding: VDU_vaaa_0
280 - virtual_link: VL_cpe_signal
282 VirtualStorage_root_all:
283 # this indicate the VDU root storage size
284 type: tosca.nodes.nfv.Vdu.VirtualStorage
286 type_of_storage: root
287 size_of_storage: 40 GB
290 type: tosca.nodes.nfv.Vdu.Compute
292 name: { get_input: vaaa_name_0 }
294 configurable_properties:
295 additional_vnfc_configurable_properties: {}
297 min_number_of_instances: 1
298 max_number_of_instances: 1
300 inject_files: #TODO SDC Bug
301 source_path: ../Artifacts/Deployment/Other/authorized_keys #SSH authorized_keys
302 dest_path: /home/ubuntu/.ssh/authorized_keys
304 vnf_id: { get_input: vnf_id }
305 vf_module_id: { get_input: vf_module_id }
306 dcae_collector_ip: { get_input: dcae_collector_ip }
307 dcae_collector_port: { get_input: dcae_collector_port }
308 cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
309 oam_ipaddr: { get_input: vaaa_private_ip_1 }
310 oam_cidr: { get_input: onap_private_net_cidr }
311 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
312 demo_artifacts_version: { get_input: demo_artifacts_version }
313 install_script_version: { get_input: install_script_version }
314 cloud_env: { get_input: cloud_env }
315 nexus_artifact_repo: { get_input: nexus_artifact_repo }
318 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
319 apt-get -y install jq
322 echo $METADATA | jq -r ".meta.$1"
325 # Create configuration files
327 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
328 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
329 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
330 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
331 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
332 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
333 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
334 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
335 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
336 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
338 # Download and run install script
339 apt-get -y install unzip
340 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
341 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
342 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
343 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
344 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
346 chmod +x v_aaa_install.sh
351 #TODO add local disk size
353 virtual_mem_size: 4096 MB
357 - virtual_storage: VirtualStorage_root_all
359 sw_image: #TODO need to put glance image name here
360 #file: { get_input: vcpe_image_name }
361 file: ../Artifacts/Deployment/Other/image
362 type: tosca.artifacts.nfv.SwImage
366 type: tosca.nodes.nfv.VduCp
368 layer_protocol: [ipv4]
371 - asscociated_layer_protocol: ipv4
373 address_type: ip_address
375 ip_address_assignment: false
376 floating_ip_activated: false
378 - virtual_binding: VDU_vdns_0
379 # - virtual_link: VL_public
381 Cp_vdns_onap_private:
382 type: tosca.nodes.nfv.VduCp
384 layer_protocol: [ipv4]
387 - asscociated_layer_protocol: ipv4
389 address_type: ip_address
391 ip_address_assignment: false
392 floating_ip_activated: false
394 - { get_input: vdns_private_ip_1 }
396 - virtual_binding: VDU_vdns_0
397 #- virtual_link: VL_onap_private
400 type: tosca.nodes.nfv.VduCp
402 layer_protocol: [ipv4]
405 - asscociated_layer_protocol: ipv4
407 address_type: ip_address
409 ip_address_assignment: false
410 floating_ip_activated: false
412 - { get_input: vdns_private_ip_0 }
414 - virtual_binding: VDU_vdns_0
415 - virtual_link: VL_cpe_public
418 type: tosca.nodes.nfv.Vdu.Compute
420 name: { get_input: vdns_name_0 }
422 configurable_properties:
423 additional_vnfc_configurable_properties: {}
425 min_number_of_instances: 1
426 max_number_of_instances: 1
428 inject_files: # TODO SDC Bug
429 source_path: ../Artifacts/Deployment/Other/authorized_keys #SSH authorized_keys
430 dest_path: /home/ubuntu/.ssh/authorized_keys
432 vnf_id: { get_input: vnf_id }
433 vf_module_id: { get_input: vf_module_id }
434 oam_ipaddr: { get_input: vdns_private_ip_1 }
435 cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
436 oam_cidr: { get_input: onap_private_net_cidr }
437 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
438 demo_artifacts_version: { get_input: demo_artifacts_version }
439 install_script_version: { get_input: install_script_version }
440 cloud_env: { get_input: cloud_env }
441 nexus_artifact_repo: { get_input: nexus_artifact_repo }
444 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
445 apt-get -y install jq
448 echo $METADATA | jq -r ".meta.$1"
451 # Create configuration files
453 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
454 echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
455 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
456 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
457 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
458 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
459 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
460 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
462 # Download and run install script
463 apt-get -y install unzip
464 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
465 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
466 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
467 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
468 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
470 chmod +x v_dns_install.sh
475 #TODO add local disk size
477 virtual_mem_size: 4096 MB
481 - virtual_storage: VirtualStorage_root_all
483 sw_image: #TODO need to put glance image name here
484 #file: { get_input: vcpe_image_name }
485 file: ../Artifacts/Deployment/Other/image
486 type: tosca.artifacts.nfv.SwImage
490 type: tosca.nodes.nfv.VduCp
492 layer_protocol: [ipv4]
495 - asscociated_layer_protocol: ipv4
497 address_type: ip_address
499 ip_address_assignment: false
500 floating_ip_activated: false
502 - virtual_binding: VDU_vdhcp_0
503 # - virtual_link: VL_public
505 Cp_vdhcp_onap_private:
506 type: tosca.nodes.nfv.VduCp
508 layer_protocol: [ipv4]
511 - asscociated_layer_protocol: ipv4
513 address_type: ip_address
515 ip_address_assignment: false
516 floating_ip_activated: false
518 - { get_input: vdhcp_private_ip_1 }
520 - virtual_binding: VDU_vdhcp_0
521 # - virtual_link: VL_onap_private
524 type: tosca.nodes.nfv.VduCp
526 layer_protocol: [ipv4]
529 - asscociated_layer_protocol: ipv4
531 address_type: ip_address
533 ip_address_assignment: false
534 floating_ip_activated: false
536 - { get_input: vdhcp_private_ip_0 }
538 - virtual_binding: VDU_vdhcp_0
539 - virtual_link: VL_cpe_signal
542 type: tosca.nodes.nfv.Vdu.Compute
544 name: { get_input: vdhcp_name_0 }
546 configurable_properties:
547 additional_vnfc_configurable_properties: {}
549 min_number_of_instances: 1
550 max_number_of_instances: 1
552 inject_files: #SDC Bug
553 source_path: ../Artifacts/Deployment/Other/authorized_keys #SSH authorized_keys
554 dest_path: /home/ubuntu/.ssh/authorized_keys
556 vnf_id: { get_input: vnf_id }
557 vf_module_id: { get_input: vf_module_id }
558 oam_ipaddr: { get_input: vdhcp_private_ip_1 }
559 cpe_signal_ipaddr: { get_input: vdhcp_private_ip_0 }
560 oam_cidr: { get_input: onap_private_net_cidr }
561 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
562 mr_ip_addr: { get_input: mr_ip_addr }
563 mr_ip_port: { get_input: mr_ip_port }
564 demo_artifacts_version: { get_input: demo_artifacts_version }
565 install_script_version: { get_input: install_script_version }
566 cloud_env: { get_input: cloud_env }
567 nexus_artifact_repo: { get_input: nexus_artifact_repo }
570 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
571 apt-get -y install jq
574 echo $METADATA | jq -r ".meta.$1"
577 # Create configuration files
579 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
580 echo "$(get_metadata cpe_signal_ipaddr)" > /opt/config/cpe_signal_ipaddr.txt
581 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
582 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
583 echo "$(get_metadata mr_ip_addr)" > /opt/config/mr_ip_addr.txt
584 echo "$(get_metadata mr_ip_port)" > /opt/config/mr_ip_port.txt
585 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
586 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
587 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
588 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
590 # Download and run install script
591 apt-get -y install unzip
592 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
593 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
594 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
595 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
596 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dhcp_install.sh
598 chmod +x v_dhcp_install.sh
603 #TODO add local disk size
605 virtual_mem_size: 4096 MB
609 - virtual_storage: VirtualStorage_root_all
611 sw_image: #TODO need to put glance image name here
612 #file: { get_input: vcpe_image_name }
613 file: ../Artifacts/Deployment/Other/image
614 type: tosca.artifacts.nfv.SwImage
618 type: tosca.nodes.nfv.VduCp
620 layer_protocol: [ipv4]
623 - asscociated_layer_protocol: ipv4
625 address_type: ip_address
627 ip_address_assignment: false
628 floating_ip_activated: false
630 - virtual_binding: VDU_vweb_0
631 # - virtual_link: VL_public
633 Cp_vweb_onap_private:
634 type: tosca.nodes.nfv.VduCp
636 layer_protocol: [ipv4]
639 - asscociated_layer_protocol: ipv4
641 address_type: ip_address
643 ip_address_assignment: false
644 floating_ip_activated: false
646 - { get_input: vweb_private_ip_1 }
648 - virtual_binding: VDU_vweb_0
649 # - virtual_link: VL_onap_private
652 type: tosca.nodes.nfv.VduCp
654 layer_protocol: [ipv4]
657 - asscociated_layer_protocol: ipv4
659 address_type: ip_address
661 ip_address_assignment: false
662 floating_ip_activated: false
664 - { get_input: vweb_private_ip_0 }
666 - virtual_binding: VDU_vweb_0
667 - virtual_link: VL_cpe_public
670 type: tosca.nodes.nfv.Vdu.Compute
672 name: { get_input: vweb_name_0 }
674 configurable_properties:
675 additional_vnfc_configurable_properties: {}
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
727 #TODO add local disk size
729 virtual_mem_size: 4096 MB
733 - virtual_storage: VirtualStorage_root_all
735 sw_image: #TODO need to put glance image name here
736 #file: { get_input: vcpe_image_name }
737 file: ../Artifacts/Deployment/Other/image
738 type: tosca.artifacts.nfv.SwImage