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_protocols: [ipv4]
171 # max_bitrate_requirements:
174 # min_bitrate_requirements:
177 # virtual_link_protocol_data:
178 # - associated_layer_protocol: ipv4
181 # name: { get_input: public_net_id }
185 # type: tosca.nodes.nfv.VnfVirtualLink
188 # layer_protocols: [ipv4]
190 # max_bitrate_requirements:
193 # min_bitrate_requirements:
196 # virtual_link_protocol_data:
197 # - associated_layer_protocol: ipv4
200 # name: { get_input: onap_private_net_id }
201 # cidr: { get_input: onap_private_net_cidr }
205 type: tosca.nodes.nfv.VnfVirtualLink
208 layer_protocols: [ipv4]
210 max_bitrate_requirements:
213 min_bitrate_requirements:
216 virtual_link_protocol_data:
217 - associated_layer_protocol: ipv4
220 name: { get_input: cpe_signal_net_id}
221 cidr: { get_input: cpe_signal_net_cidr }
226 type: tosca.nodes.nfv.VnfVirtualLink
229 layer_protocols: [ipv4]
231 max_bitrate_requirements:
234 min_bitrate_requirements:
237 virtual_link_protocol_data:
238 - associated_layer_protocol: ipv4
241 name: { get_input: cpe_public_net_id}
242 cidr: { get_input: cpe_public_net_cidr }
247 type: tosca.nodes.nfv.VduCp
249 layer_protocols: [ipv4]
252 - associated_layer_protocol: ipv4
254 - address_type: ip_address
256 ip_address_assignment: false
257 floating_ip_activated: false
259 - virtual_binding: VDU_vaaa_0
260 # - virtual_link: VL_public
262 Cp_vaaa_onap_private:
263 type: tosca.nodes.nfv.VduCp
265 layer_protocols: [ipv4]
268 - associated_layer_protocol: ipv4
270 - address_type: ip_address
272 ip_address_assignment: false
273 floating_ip_activated: false
275 - { get_input: vaaa_private_ip_1 }
277 - virtual_binding: VDU_vaaa_0
278 # - virtual_link: VL_onap_private
281 type: tosca.nodes.nfv.VduCp
283 layer_protocols: [ipv4]
286 - associated_layer_protocol: ipv4
288 - address_type: ip_address
290 ip_address_assignment: false
291 floating_ip_activated: false
293 - { get_input: vaaa_private_ip_0 }
295 - virtual_binding: VDU_vaaa_0
296 - virtual_link: VL_cpe_signal
299 type: tosca.nodes.nfv.Vdu.Compute
301 name: { get_input: vaaa_name_0 }
304 min_number_of_instances: 1
305 max_number_of_instances: 1
307 inject_files: #TODO SDC Bug
308 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
309 dest_path: /home/ubuntu/.ssh/authorized_keys
311 vnf_id: { get_input: vnf_id }
312 vf_module_id: { get_input: vf_module_id }
313 dcae_collector_ip: { get_input: dcae_collector_ip }
314 dcae_collector_port: { get_input: dcae_collector_port }
315 cpe_signal_net_ipaddr: { get_input: vaaa_private_ip_0 }
316 oam_ipaddr: { get_input: vaaa_private_ip_1 }
317 oam_cidr: { get_input: onap_private_net_cidr }
318 cpe_signal_net_cidr: { get_input: cpe_signal_net_cidr }
319 demo_artifacts_version: { get_input: demo_artifacts_version }
320 install_script_version: { get_input: install_script_version }
321 cloud_env: { get_input: cloud_env }
322 nexus_artifact_repo: { get_input: nexus_artifact_repo }
325 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
326 apt-get -y install jq
329 echo $METADATA | jq -r ".meta.$1"
332 # Create configuration files
334 echo "$(get_metadata dcae_collector_ip)" > /opt/config/dcae_collector_ip.txt
335 echo "$(get_metadata dcae_collector_port)" > /opt/config/dcae_collector_port.txt
336 echo "$(get_metadata cpe_signal_net_ipaddr)" > /opt/config/cpe_signal_net_ipaddr.txt
337 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
338 echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
339 echo "$(get_metadata cpe_signal_net_cidr)" > /opt/config/cpe_signal_net_cidr.txt
340 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
341 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
342 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
343 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
345 # Download and run install script
346 apt-get -y install unzip
347 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
348 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
349 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
350 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
351 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_aaa_install.sh
353 chmod +x v_aaa_install.sh
359 virtual_mem_size: 4096 MB
362 virtual_local_storage:
363 - size_of_storage: 40 GB
365 sw_image: #TODO need to put glance image name here
366 #file: { get_input: vcpe_image_name }
367 file: ../Artifacts/Deployment/OTHER/image
368 type: tosca.artifacts.nfv.SwImage
372 type: tosca.nodes.nfv.VduCp
374 layer_protocols: [ipv4]
377 - associated_layer_protocol: ipv4
379 - address_type: ip_address
381 ip_address_assignment: false
382 floating_ip_activated: false
384 - virtual_binding: VDU_vdns_0
385 # - virtual_link: VL_public
387 Cp_vdns_onap_private:
388 type: tosca.nodes.nfv.VduCp
390 layer_protocols: [ipv4]
393 - associated_layer_protocol: ipv4
395 - address_type: ip_address
397 ip_address_assignment: false
398 floating_ip_activated: false
400 - { get_input: vdns_private_ip_1 }
402 - virtual_binding: VDU_vdns_0
403 #- virtual_link: VL_onap_private
406 type: tosca.nodes.nfv.VduCp
408 layer_protocols: [ipv4]
411 - associated_layer_protocol: ipv4
413 - address_type: ip_address
415 ip_address_assignment: false
416 floating_ip_activated: false
418 - { get_input: vdns_private_ip_0 }
420 - virtual_binding: VDU_vdns_0
421 - virtual_link: VL_cpe_public
424 type: tosca.nodes.nfv.Vdu.Compute
426 name: { get_input: vdns_name_0 }
429 min_number_of_instances: 1
430 max_number_of_instances: 1
432 inject_files: # TODO SDC Bug
433 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
434 dest_path: /home/ubuntu/.ssh/authorized_keys
436 vnf_id: { get_input: vnf_id }
437 vf_module_id: { get_input: vf_module_id }
438 oam_ipaddr: { get_input: vdns_private_ip_1 }
439 cpe_public_net_ipaddr: { get_input: vdns_private_ip_0 }
440 oam_cidr: { get_input: onap_private_net_cidr }
441 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
442 demo_artifacts_version: { get_input: demo_artifacts_version }
443 install_script_version: { get_input: install_script_version }
444 cloud_env: { get_input: cloud_env }
445 nexus_artifact_repo: { get_input: nexus_artifact_repo }
448 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
449 apt-get -y install jq
452 echo $METADATA | jq -r ".meta.$1"
455 # Create configuration files
457 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
458 echo "$(get_metadata cpe_public_net_ipaddr)" > /opt/config/cpe_public_net_ipaddr.txt
459 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
460 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
461 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
462 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
463 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
464 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
466 # Download and run install script
467 apt-get -y install unzip
468 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
469 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
470 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
471 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
472 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_dns_install.sh
474 chmod +x v_dns_install.sh
480 virtual_mem_size: 4096 MB
483 virtual_local_storage:
484 - size_of_storage: 40 GB
486 sw_image: #TODO need to put glance image name here
487 #file: { get_input: vcpe_image_name }
488 file: ../Artifacts/Deployment/OTHER/image
489 type: tosca.artifacts.nfv.SwImage
493 type: tosca.nodes.nfv.VduCp
495 layer_protocols: [ipv4]
498 - associated_layer_protocol: ipv4
500 - address_type: ip_address
502 ip_address_assignment: false
503 floating_ip_activated: false
505 - virtual_binding: VDU_vdhcp_0
506 # - virtual_link: VL_public
508 Cp_vdhcp_onap_private:
509 type: tosca.nodes.nfv.VduCp
511 layer_protocols: [ipv4]
514 - associated_layer_protocol: ipv4
516 - address_type: ip_address
518 ip_address_assignment: false
519 floating_ip_activated: false
521 - { get_input: vdhcp_private_ip_1 }
523 - virtual_binding: VDU_vdhcp_0
524 # - virtual_link: VL_onap_private
527 type: tosca.nodes.nfv.VduCp
529 layer_protocols: [ipv4]
532 - associated_layer_protocol: ipv4
534 - address_type: ip_address
536 ip_address_assignment: false
537 floating_ip_activated: false
539 - { get_input: vdhcp_private_ip_0 }
541 - virtual_binding: VDU_vdhcp_0
542 - virtual_link: VL_cpe_signal
545 type: tosca.nodes.nfv.Vdu.Compute
547 name: { get_input: vdhcp_name_0 }
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
605 virtual_mem_size: 4096 MB
608 virtual_local_storage:
609 - size_of_storage: 40 GB
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_protocols: [ipv4]
623 - associated_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_protocols: [ipv4]
639 - associated_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_protocols: [ipv4]
657 - associated_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 }
675 min_number_of_instances: 1
676 max_number_of_instances: 1
678 inject_files: # TODO SDC bug
679 source_path: ../Artifacts/Deployment/OTHER/authorized_keys #SSH authorized_keys
680 dest_path: /home/ubuntu/.ssh/authorized_keys
682 vnf_id: { get_input: vnf_id }
683 vf_module_id: { get_input: vf_module_id }
684 oam_ipaddr: { get_input: vweb_private_ip_1 }
685 cpe_public_ipaddr: { get_input: vweb_private_ip_0 }
686 oam_cidr: { get_input: onap_private_net_cidr }
687 cpe_public_net_cidr: { get_input: cpe_public_net_cidr }
688 demo_artifacts_version: { get_input: demo_artifacts_version }
689 install_script_version: { get_input: install_script_version }
690 cloud_env: { get_input: cloud_env }
691 nexus_artifact_repo: { get_input: nexus_artifact_repo }
694 METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
695 apt-get -y install jq
698 echo $METADATA | jq -r ".meta.$1"
701 # Create configuration files
703 echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
704 echo "$(get_metadata cpe_public_ipaddr)" > /opt/config/cpe_public_ipaddr.txt
705 echo "$(get_metadata onap_cidr)" > /opt/config/oam_cidr.txt
706 echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
707 echo "$(get_metadata demo_artifacts_version)" > /opt/config/demo_artifacts_version.txt
708 echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
709 echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
710 echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
712 # Download and run install script
713 apt-get -y install unzip
714 INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
715 NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
716 if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
717 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
718 unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_web_install.sh
720 chmod +x v_web_install.sh
726 virtual_mem_size: 4096 MB
729 virtual_local_storage:
730 - size_of_storage: 40 GB
732 sw_image: #TODO need to put glance image name here
733 #file: { get_input: vcpe_image_name }
734 file: ../Artifacts/Deployment/OTHER/image
735 type: tosca.artifacts.nfv.SwImage