Examples from OSM Hackfests: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:


Examples from the 3rd OSM Hackfest
Examples from the 4th OSM Hackfest


= Work material =
= Hackfest material =
* [[2nd_OSM_Hackfest#Agenda | Table of contents]]
* [[4th_OSM_Hackfest | Latest OSM Hackfest ]]
* [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/ Documentation]
* [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/presentations/ Presentations]
* [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/ NS and VNF Packages] and [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/ VM images]
* [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/ NS and VNF Packages] and [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/ VM images]


= Examples =
= Examples =
Line 11: Line 11:
== Basic VNF and NS ==
== Basic VNF and NS ==


* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_vnfd.tar.gz hackfest1-vnf]
* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_basic_vnf.tar.gz hackfest_basic-vnf]
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_nsd.tar.gz hackfest1-ns]
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_basic_ns.tar.gz hackfest_basic-ns]
* '''Image:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604]
* '''Image:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604]
* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%202%20-%20Creating%20a%20basic%20VNF%20and%20NS.pdf Presentation: creating a basic VNF and NS]
* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/presentations/20181030%20OSM%20Hackfest%20-%20Session%202%20-%20Creating%20a%20basic%20VNF%20and%20NS.pdf Presentation: creating a basic VNF and NS]


===VNF diagram===
===VNF diagram===
[[File:Hackfest simple vnf.png|400px]]
[[File:Hackfest simple vnf.png|400px]]
===VNF descriptor===
===VNF descriptor===
vnfd:vnfd-catalog:
{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/vnfd/hackfest_basic_vnf/src/hackfest_basic_vnfd.yaml;|800%|300}}
    vnfd:
    -  id: hackfest1-vnf
        name: hackfest1-vnf
        short-name: hackfest1-vnf
        version: '1.0'
        description: A simple VNF descriptor w/ one VDU
        logo: osm.png
        connection-point:
        -  name: vnf-cp0
            type: VPORT
        vdu:
        -  id: hackfest1VM
            name: hackfest1VM
            image: ubuntu1604
            count: '1'
            vm-flavor:
                vcpu-count: '1'
                memory-mb: '1024'
                storage-gb: '10'
            interface:
            -  name: vdu-eth0
                type: EXTERNAL
                virtual-interface:
                    type: VIRTIO
                external-connection-point-ref: vnf-cp0
        mgmt-interface:
            cp: vnf-cp0
===NS diagram===
===NS diagram===
[[File:Hackfest simple ns.png|400px]]
[[File:Hackfest simple ns.png|400px]]
===NS descriptor===
===NS descriptor===
nsd:nsd-catalog:
{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/nsd/hackfest_basic_ns/src/hackfest_basic_nsd.yaml;|800%|300}}
    nsd:
    -  id: hackfest1-ns
        name: hackfest1-ns
        short-name: hackfest1-ns
        description: Simple NS with a single VNF and a single VL
        version: '1.0'
        logo: osm.png
        constituent-vnfd:
        -  vnfd-id-ref: hackfest1-vnf
            member-vnf-index: '1'
        vld:
        -  id: mgmtnet
            name: mgmtnet
            short-name: mgmtnet
            type: ELAN
            mgmt-network: 'true'
            vnfd-connection-point-ref:
            -  vnfd-id-ref: hackfest1-vnf
                member-vnf-index-ref: '1'
                vnfd-connection-point-ref: vnf-cp0
===Testing with OSM client===
===Testing with OSM client===
*Onboard VNF packages
*Onboard VNF packages
  osm vnfd-create hackfest1_vnfd.tar.gz
  osm vnfd-create hackfest_basic_vnf.tar.gz
  osm vnfd-list
  osm vnfd-list
  osm vnfd-show hackfest1-vnf
  osm vnfd-show hackfest_basic-vnf
*Onboard NS packages
*Onboard NS packages
  osm nsd-create hackfest1_nsd.tar.gz
  osm nsd-create hackfest_basic_ns.tar.gz
  osm nsd-list
  osm nsd-list
  osm nsd-show hackfest1-ns
  osm nsd-show hackfest_basic-ns
*Instantiate
*Instantiate
  osm ns-create --ns_name hf1 --nsd_name hackfest1-ns \
  osm ns-create --ns_name hf_basic --nsd_name hackfest_basic-ns \
   --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID> \
   --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID> \
   --ssh_keys <KEY1_PUBKEY_FILE> \
   --ssh_keys <KEY1_PUBKEY_FILE> \
Line 87: Line 40:
*Check NS status
*Check NS status
  osm ns-list
  osm ns-list
  osm ns-show hf1
  osm ns-show hf_basic
*Check VNF instances to see the instance and get the mgmt IP address of the VNF
*Check VNF instances to see the instance and get the mgmt IP address of the VNF
  osm vnf-list
  osm vnf-list
Line 101: Line 54:
* Instantiate NS
* Instantiate NS
  Go to NS packages
  Go to NS packages
  In hackfest1-ns, click in “Actions: Instantiate NS”
  In hackfest_basic-ns, click in “Actions: Instantiate NS”
  Complete the form:
  Complete the form:
     -Add a name to the NS instance
     -Add a name to the NS instance
     -Select the Datacenter where the NS will be deployed
     -Select the Datacenter where the NS will be deployed
     -Specify in the config section a default VIM network name to map “mgmtnet”:
     -Specify in the config section a default VIM network name to map “mgmtnet”:
     -Paste your public SSH key to get access to the VNF (VMs need to have cloud-init enabled, in this case the hackfest1 example has cloud-init)
     -Paste your public SSH key to get access to the VNF (VMs need to have cloud-init enabled, in this case the hackfest basic example has cloud-init)
*Connect to the VNF:
*Connect to the VNF:
  ssh -i <priv_key> ubuntu@<IP>
  ssh -i <priv_key> ubuntu@<IP>
Line 112: Line 65:
== Multi-VDU VNF ==
== Multi-VDU VNF ==


* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf]
* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_multivdu_vnf.tar.gz hackfest_multivdu-vnf]
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_multivdu_ns.tar.gz hackfest_multivdu-ns]
* '''Image:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604]
* '''Image:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604]
* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf Presentation: Modeling multi-VDU VNF]
* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/presentations/20181030%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF.pdf: Modeling multi-VDU VNF]


===VNF diagram===
===VNF diagram===
[[File:Hackfest multivdu vnf.png|500px]]
[[File:Hackfest multivdu vnf.png|500px]]
===VNF descriptor===
===VNF descriptor===
vnfd:vnfd-catalog:
{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/vnfd/hackfest_multivdu_vnf/src/hackfest_multivdu_vnfd.yaml;|800%|300}}
    vnfd:
    -  id: hackfest2-vnf
        name: hackfest2-vnf
        short-name: hackfest2-vnf
        version: '1.0'
        description: A VNF consisting of 2 VDUs connected to an internal VL
        logo: osm.png
        connection-point:
        -  id: vnf-mgmt
            name: vnf-mgmt
            short-name: vnf-mgmt
            type: VPORT
        -  id: vnf-data
            name: vnf-data
            short-name: vnf-data
            type: VPORT
        mgmt-interface:
            cp: vnf-mgmt
        internal-vld:
        -  id: internal
            name: internal
            short-name: internal
            type: ELAN
            internal-connection-point:
            -  id-ref: mgmtVM-internal
            -  id-ref: dataVM-internal
        vdu:
        -  id: mgmtVM
            name: mgmtVM
            image: US1604
            count: '1'
            vm-flavor:
                vcpu-count: '1'
                memory-mb: '1024'
                storage-gb: '10'
            interface:
            -  name: mgmtVM-eth0
                position: '1'
                type: EXTERNAL
                virtual-interface:
                    type: VIRTIO
                external-connection-point-ref: vnf-mgmt
            -  name: mgmtVM-eth1
                position: '2'
                type: INTERNAL
                virtual-interface:
                    type: VIRTIO
                internal-connection-point-ref: mgmtVM-internal
            internal-connection-point:
            -  id: mgmtVM-internal
                name: mgmtVM-internal
                short-name: mgmtVM-internal
                type: VPORT
        -  id: dataVM
            name: dataVM
            image: US1604
            count: '1'
            vm-flavor:
                vcpu-count: '1'
                memory-mb: '1024'
                storage-gb: '10'
            interface:
            -  name: dataVM-eth0
                position: '1'
                type: INTERNAL
                virtual-interface:
                    type: VIRTIO
                internal-connection-point-ref: dataVM-internal
            -  name: dataVM-xe0
                position: '2'
                type: EXTERNAL
                virtual-interface:
                    type: VIRTIO
                external-connection-point-ref: vnf-data
            internal-connection-point:
            -  id: dataVM-internal
                name: dataVM-internal
                short-name: dataVM-internal
                type: VPORT
===NS diagram===
===NS diagram===
[[File:Hackfest multivdu ns.png|500px]]
[[File:Hackfest multivdu ns.png|500px]]
===NS descriptor===
===NS descriptor===
nsd:nsd-catalog:
{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/nsd/hackfest_multivdu_ns/src/hackfest_multivdu_nsd.yaml;|800%|300}}
    nsd:
    -  id: hackfest2-ns
        name: hackfest2-ns
        short-name: hackfest2-ns
        description: NS with 2 VNFs connected by datanet and mgmtnet VLs
        version: '1.0'
        logo: osm.png
        constituent-vnfd:
        -  vnfd-id-ref: hackfest2-vnf
            member-vnf-index: '1'
        -  vnfd-id-ref: hackfest2-vnf
            member-vnf-index: '2'
        vld:
        -  id: mgmtnet
            name: mgmtnet
            short-name: mgmtnet
            type: ELAN
            mgmt-network: 'true'
            vim-network-name: mgmt
            vnfd-connection-point-ref:
            -  vnfd-id-ref: hackfest2-vnf
                member-vnf-index-ref: '1'
                vnfd-connection-point-ref: vnf-mgmt
            -  vnfd-id-ref: hackfest2-vnf
                member-vnf-index-ref: '2'
                vnfd-connection-point-ref: vnf-mgmt
        -  id: datanet
            name: datanet
            short-name: datanet
            type: ELAN
            vnfd-connection-point-ref:
            -  vnfd-id-ref: hackfest2-vnf
                member-vnf-index-ref: '1'
                vnfd-connection-point-ref: vnf-data
            -  vnfd-id-ref: hackfest2-vnf
                member-vnf-index-ref: '2'
                vnfd-connection-point-ref: vnf-data
===Testing with OSM client===
===Testing with OSM client===
*Onboard VNF packages
*Onboard VNF packages
  osm vnfd-create hackfest2_vnfd.tar.gz
  osm vnfd-create hackfest_multivdu_vnf.tar.gz
  osm vnfd-list
  osm vnfd-list
  osm vnfd-show hackfest2-vnf
  osm vnfd-show hackfest_multivdu-vnf
*Onboard NS packages
*Onboard NS packages
  osm nsd-create hackfest2_nsd.tar.gz
  osm nsd-create hackfest_multivdu_ns.tar.gz
  osm nsd-list
  osm nsd-list
  osm nsd-show hackfest2-ns
  osm nsd-show hackfest_multivdu-ns
*Instantiate
*Instantiate
  osm ns-create --ns_name hf2 --nsd_name hackfest2-ns \
  osm ns-create --ns_name hf_multivdu --nsd_name hackfest_multivdu-ns \
   --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID>  
   --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID>  
*Check NS status
*Check NS status
  osm ns-list
  osm ns-list
  osm ns-show hf2
  osm ns-show hf_multivdu
*Check VNF instances to see the instance and get the mgmt IP address of the VNF
*Check VNF instances to see the instance and get the mgmt IP address of the VNF
  osm vnf-list
  osm vnf-list
Line 269: Line 106:
*Instantiate NS
*Instantiate NS
  Go to NS packages
  Go to NS packages
  In hackfest2-ns, click in “Actions: Instantiate NS”
  In hackfest_multivdu-ns, click in “Actions: Instantiate NS”
     -Complete the form
     -Complete the form
     -Add a name to the NS instance
     -Add a name to the NS instance
Line 280: Line 117:
== VNF with Day-0 configuration ==
== VNF with Day-0 configuration ==


* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_3_vnfd.tar.gz hackfest3-vnf]
* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_cloudinit_vnf.tar.gz hackfest_cloudinit-vnf]
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_3_nsd.tar.gz hackfest3-ns]
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_cloudinit_ns.tar.gz hackfest_cloudinit-ns]
* '''Image hackfest3-mgmt:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/hackfest3-mgmt.qcow2 hackfest3-mgmt]
* '''Image hackfest3-mgmt:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/hackfest3-mgmt.qcow2 hackfest3-mgmt]
* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180624%20OSM%20Hackfest%20-%20Session%204%20-%20Adding%20day-0%20configuration%20to%20VNFs.pdf Adding day-0 configuration to VNFs]
* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/presentations/20181030%20OSM%20Hackfest%20-%20Session%204%20-%20Adding%20day-0%20configuration%20to%20VNFs.pdf Adding day-0 configuration to VNFs]


===VNF diagram===
===VNF diagram===
[[File:Hackfest cloudinit vnf.png|500px]]
[[File:Cloudinit vnf.png|500px]]
===VNF descriptor===
===VNF descriptor===
vnfd:vnfd-catalog:
{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/vnfd/hackfest_cloudinit_vnf/src/hackfest_cloudinit_vnfd.yaml;|800%|300}}
    vnfd:
    -  id: hackfest3-vnf
        name: hackfest3-vnf
        short-name: hackfest3-vnf
        version: '1.0'
        description: A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with cloud-init
        logo: osm.png
        connection-point:
        -  id: vnf-mgmt
            name: vnf-mgmt
            short-name: vnf-mgmt
            type: VPORT
        -  id: vnf-data
            name: vnf-data
            short-name: vnf-data
            type: VPORT
        mgmt-interface:
            cp: vnf-mgmt
        internal-vld:
        -  id: internal
            name: internal
            short-name: internal
            type: ELAN
            internal-connection-point:
            -  id-ref: mgmtVM-internal
            -  id-ref: dataVM-internal
        vdu:
        -  id: mgmtVM
            name: mgmtVM
            image: hackfest3-mgmt
            count: '1'
            vm-flavor:
                vcpu-count: '1'
                memory-mb: '1024'
                storage-gb: '10'
            interface:
            -  name: mgmtVM-eth0
                position: '1'
                type: EXTERNAL
                virtual-interface:
                    type: VIRTIO
                external-connection-point-ref: vnf-mgmt
            -  name: mgmtVM-eth1
                position: '2'
                type: INTERNAL
                virtual-interface:
                    type: VIRTIO
                internal-connection-point-ref: mgmtVM-internal
            internal-connection-point:
            -  id: mgmtVM-internal
                name: mgmtVM-internal
                short-name: mgmtVM-internal
                type: VPORT
            cloud-init-file: cloud-config.txt
        -  id: dataVM
            name: dataVM
            image: hackfest3-mgmt
            count: '1'
            vm-flavor:
                vcpu-count: '1'
                memory-mb: '1024'
                storage-gb: '10'
            interface:
            -  name: dataVM-eth0
                position: '1'
                type: INTERNAL
                virtual-interface:
                    type: VIRTIO
                internal-connection-point-ref: dataVM-internal
            -  name: dataVM-xe0
                position: '2'
                type: EXTERNAL
                virtual-interface:
                    type: VIRTIO
                external-connection-point-ref: vnf-data
            internal-connection-point:
            -  id: dataVM-internal
                name: dataVM-internal
                short-name: dataVM-internal
                type: VPORT
===NS diagram===
===NS diagram===
[[File:Hackfest cloudinit ns.png|500px]]
[[File:Cloudinit ns.png|500px]]
===NS descriptor===
===NS descriptor===
nsd:nsd-catalog:
{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/nsd/hackfest_cloudinit_ns/src/hackfest_cloudinit_nsd.yaml;|800%|300}}
    nsd:
    -  id: hackfest3-ns
        name: hackfest3-ns
        short-name: hackfest3-ns
        description: NS with 2 VNFs hackfest3-vnf connected by datanet and mgmtnet VLs
        version: '1.0'
        logo: osm.png
        constituent-vnfd:
        -  vnfd-id-ref: hackfest3-vnf
            member-vnf-index: '1'
        -  vnfd-id-ref: hackfest3-vnf
            member-vnf-index: '2'
        vld:
        -  id: mgmtnet
            name: mgmtnet
            short-name: mgmtnet
            type: ELAN
            mgmt-network: 'true'
            vim-network-name: mgmt
            vnfd-connection-point-ref:
            -  vnfd-id-ref: hackfest3-vnf
                member-vnf-index-ref: '1'
                vnfd-connection-point-ref: vnf-mgmt
            -  vnfd-id-ref: hackfest3-vnf
                member-vnf-index-ref: '2'
                vnfd-connection-point-ref: vnf-mgmt
        -  id: datanet
            name: datanet
            short-name: datanet
            type: ELAN
            vnfd-connection-point-ref:
            -  vnfd-id-ref: hackfest3-vnf
                member-vnf-index-ref: '1'
                vnfd-connection-point-ref: vnf-data
            -  vnfd-id-ref: hackfest3-vnf
                member-vnf-index-ref: '2'
                vnfd-connection-point-ref: vnf-data
===Testing with OSM client===
===Testing with OSM client===
*Onboard VNF packages
*Onboard VNF packages
  osm vnfd-create hackfest3_vnfd.tar.gz
  osm vnfd-create hackfest_cloudinit_vnfd.tar.gz
  osm vnfd-list
  osm vnfd-list
  osm vnfd-show hackfest3-vnf
  osm vnfd-show hackfest_cloudinit-vnf
*Onboard NS packages
*Onboard NS packages
  osm nsd-create hackfest3_nsd.tar.gz
  osm nsd-create hackfest_cloudinit_nsd.tar.gz
  osm nsd-list
  osm nsd-list
  osm nsd-show hackfest3-ns
  osm nsd-show hackfest_cloudinit-ns
*Instantiate
*Instantiate
  osm ns-create --ns_name hf3 --nsd_name hackfest3-ns \
  osm ns-create --ns_name hf_cloudinit --nsd_name hackfest_cloudinit-ns \
   --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID>  
   --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID>  
*Check NS status
*Check NS status
  osm ns-list
  osm ns-list
  osm ns-show hf3
  osm ns-show hf_cloudinit
*Check VNF instances to see the instance and get the mgmt IP address of the VNF
*Check VNF instances to see the instance and get the mgmt IP address of the VNF
  osm vnf-list
  osm vnf-list
Line 441: Line 161:
*Instantiate NS
*Instantiate NS
  Go to NS packages
  Go to NS packages
  In hackfest3-ns, click in “Actions: Instantiate NS”
  In hackfest_cloudinit-ns, click in “Actions: Instantiate NS”
     -Complete the form
     -Complete the form
     -Add a name to the NS instance
     -Add a name to the NS instance
Line 452: Line 172:
           sudo ls /root/helloworld.txt
           sudo ls /root/helloworld.txt
           sudo cat /root/helloworld.txt
           sudo cat /root/helloworld.txt
 
== VNF with EPA requirements ==
== VNF with EPA requirements ==


* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_4_vnfd.tar.gz hackfest4-vnf]
* '''VNF package:''' [http://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_epasriov_vnf.tar.gz hackfest_epasriov-vnf]
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_4_nsd.tar.gz hackfest4-ns]
* '''NS package:''' [http://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_epasriov_ns.tar.gz hackfest_epasriov-ns]
* '''Image :''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/hackfest-pktgen.qcow2 hackfest-pktgen]
* '''Image :''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/hackfest-pktgen.qcow2 hackfest-pktgen]
* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180627%20OSM%20Hackfest%20-%20Session%205%20-%20Modeling%20EPA%20capabilities%20in%20VNF.pdf Modeling EPA capabilities in your VNF descriptor]
* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/presentations/20181102%20OSM%20Hackfest%20-%20Session%205%20-%20Modeling%20EPA%20capabilities%20in%20VNF.pdf Modeling EPA capabilities in your VNF descriptor]


===VNF diagram===
===VNF diagram===
[[File:Hackfest epasriov vnf.png|500px]]
[[File:Epasriov vnf.jpg|500px]]
===VNF descriptor===
===VNF descriptor===
vnfd:vnfd-catalog:
{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/vnfd/hackfest_epasriov_vnf/src/hackfest_epasriov_vnfd.yaml;|800%|300}}
    vnfd:
    -  id: hackfest4-vnf
        name: hackfest4-vnf
        short-name: hackfest4-vnf
        version: '1.0'
        description: A VNF consisting of 2 VDUs with EPA capabilities connected to an internal VL, mgmtVM VDU with cloud-init
        logo: osm.png
        connection-point:
        -  id: vnf-mgmt
            name: vnf-mgmt
            short-name: vnf-mgmt
            type: VPORT
        -  id: vnf-data
            name: vnf-data
            short-name: vnf-data
            type: VPORT
        mgmt-interface:
            cp: vnf-mgmt
        internal-vld:
        -  id: internal
            name: internal
            short-name: internal
            type: ELAN
            internal-connection-point:
            -  id-ref: mgmtVM-internal
            -  id-ref: dataVM-internal
        vdu:
        -  id: mgmtVM
            name: mgmtVM
            image: hackfest3-mgmt
            count: '1'
            vm-flavor:
                vcpu-count: '1'
                memory-mb: '1024'
                storage-gb: '10'
            guest-epa:
                cpu-pinning-policy: DEDICATED
                cpu-thread-pinning-policy: PREFER
                mempage-size: LARGE
                numa-node-policy:
                    mem-policy: STRICT
                    node-cnt: '1'
                    node:
                    -  id: '1'
            interface:
            -  name: mgmtVM-eth0
                position: '1'
                type: EXTERNAL
                virtual-interface:
                    type: VIRTIO
                external-connection-point-ref: vnf-mgmt
            -  name: mgmtVM-eth1
                position: '2'
                type: INTERNAL
                virtual-interface:
                    type: VIRTIO
                internal-connection-point-ref: mgmtVM-internal
            internal-connection-point:
            -  id: mgmtVM-internal
                name: mgmtVM-internal
                short-name: mgmtVM-internal
                type: VPORT
            cloud-init-file: cloud-config.txt
        -  id: dataVM
            name: dataVM
            image: hackfest-pktgen
            count: '1'
            vm-flavor:
                vcpu-count: '8'
                memory-mb: '4096'
                storage-gb: '10'
            guest-epa:
                cpu-pinning-policy: DEDICATED
                cpu-thread-pinning-policy: PREFER
                mempage-size: LARGE
                numa-node-policy:
                    mem-policy: STRICT
                    node-cnt: '1'
                    node:
                    -  id: '1'
            interface:
            -  name: eth0
                position: '1'
                type: INTERNAL
                virtual-interface:
                    type: VIRTIO
                internal-connection-point-ref: dataVM-internal
            -  name: xe0
                position: '2'
                type: EXTERNAL
                virtual-interface:
                    type: SR-IOV
                external-connection-point-ref: vnf-data
            internal-connection-point:
            -  id: dataVM-internal
                name: dataVM-internal
                short-name: dataVM-internal
                type: VPORT
===NS diagram===
===NS diagram===
[[File:Hackfest epasriov ns.png|500px]]
[[File:Hackfest epasriov ns.png|500px]]
===NS descriptor===
===NS descriptor===
nsd:nsd-catalog:
{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/nsd/hackfest_epasriov_ns/src/hackfest_epasriov_nsd.yaml;|800%|300}}
    nsd:
    -  id: hackfest4-ns
        name: hackfest4-ns
        short-name: hackfest4-ns
        description: NS with 2 VNFs hackfest4-vnf connected by datanet and mgmtnet VLs
        version: '1.0'
        logo: osm.png
        constituent-vnfd:
        -  vnfd-id-ref: hackfest4-vnf
            member-vnf-index: '1'
        -  vnfd-id-ref: hackfest4-vnf
            member-vnf-index: '2'
        vld:
        -  id: mgmtnet
            name: mgmtnet
            short-name: mgmtnet
            type: ELAN
            mgmt-network: 'true'
            vim-network-name: mgmt
            vnfd-connection-point-ref:
            -  vnfd-id-ref: hackfest4-vnf
                member-vnf-index-ref: '1'
                vnfd-connection-point-ref: vnf-mgmt
            -  vnfd-id-ref: hackfest4-vnf
                member-vnf-index-ref: '2'
                vnfd-connection-point-ref: vnf-mgmt
        -  id: datanet
            name: datanet
            short-name: datanet
            type: ELAN
            vnfd-connection-point-ref:
            -  vnfd-id-ref: hackfest4-vnf
                member-vnf-index-ref: '1'
                vnfd-connection-point-ref: vnf-data
            -  vnfd-id-ref: hackfest4-vnf
                member-vnf-index-ref: '2'
                vnfd-connection-point-ref: vnf-data
===Testing with OSM client===
===Testing with OSM client===
*Onboard VNF packages
*Onboard VNF packages
  osm vnfd-create hackfest4_vnfd.tar.gz
  osm vnfd-create hackfest_epasriov_vnf.tar.gz
  osm vnfd-list
  osm vnfd-list
  osm vnfd-show hackfest4-vnf
  osm vnfd-show hackfest_epasriov-vnf
*Onboard NS packages
*Onboard NS packages
  osm nsd-create hackfest4_nsd.tar.gz
  osm nsd-create hackfest_epasriov_ns.tar.gz
  osm nsd-list
  osm nsd-list
  osm nsd-show hackfest4-ns
  osm nsd-show hackfest_epasriov-ns
*Instantiate
*Instantiate
  osm ns-create --ns_name hf4 --nsd_name hackfest4-ns \
  osm ns-create --ns_name hf_epasriov --nsd_name hackfest_epasriov-ns \
   --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID>  
   --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID>  
*Check NS status
*Check NS status
  osm ns-list
  osm ns-list
  osm ns-show hf4
  osm ns-show hf_epasriov
*Check VNF instances to see the instance and get the mgmt IP address of the VNF
*Check VNF instances to see the instance and get the mgmt IP address of the VNF
  osm vnf-list
  osm vnf-list
Line 634: Line 219:
*Instantiate NS
*Instantiate NS
  Go to NS packages
  Go to NS packages
  In hackfest4-ns, click in “Actions: Instantiate NS”
  In hackfest_epasriov-ns, click in “Actions: Instantiate NS”
     -Complete the form
     -Complete the form
     -Add a name to the NS instance
     -Add a name to the NS instance
Line 645: Line 230:
           ssh -i test4.pem ubuntu<IP_dataVM>
           ssh -i test4.pem ubuntu<IP_dataVM>
           Run pktgen
           Run pktgen


== VNF with Day-1/Day-2 configuration (adding a charm) ==
== VNF with Day-1/Day-2 configuration (adding a charm) ==


* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_simplecharm_vnf.tar.gz hackfest_simplecharm_vnf]
* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_simplecharm_vnf.tar.gz hackfest_simplecharm_vnf]
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_simlecharm_ns.tar.gz hackfest_simplecharm_ns]
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/hackfest_simplecharm_ns.tar.gz hackfest_simplecharm_ns]
* '''Image :''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/hackfest3-mgmt.qcow2 hackfest3-mgmt]
* '''Image :''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/hackfest3-mgmt.qcow2 hackfest3-mgmt]
* '''Reference material:''':
* '''Reference material:''':
**[https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20VNF%20and%20NS%20package%20generation%20from%20command%20line.pdf How to generate VNF package from command line]
**[https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/presentations/20181031%20OSM%20Hackfest%20-%20Session%207a%20-%20Adding%20day-1%20and%20day-2%20configuration%20to%20your%20VNF%20-%20Creating%20your%20first%20proxy%20charm.pdf Adding day-1/day-2 configuration to your VNF. Creating a charm for your VNF]
**[https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180628%20OSM%20Hackfest%20-%20Session%207a%20-%20Adding%20day-1%20and%20day-2%20configuration%20to%20your%20VNF%20-%20Creating%20your%20first%20proxy%20charm.pdf Adding day-1/day-2 configuration to your VNF. Creating a charm for your VNF]
**[https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/presentations/20181031%20OSM%20Hackfest%20-%20Session%207b%20-%20Adding%20Charms%20to%20your%20VNF%20Descriptor.pdf Adding charms to your VNF Descriptor]
**[https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180628%20OSM%20Hackfest%20-%20Session%207b%20-%20Adding%20Charms%20to%20your%20VNF%20Descriptor.pdf Adding charms to your VNF Descriptor]


===VNF diagram===
===VNF diagram===
[[File:Hackfest simplecharm vnf.png|500px]]
[[File:Simplecharm vnf.jpg|500px]]
===VNF descriptor===
===VNF descriptor===
vnfd:vnfd-catalog:
{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/vnfd/hackfest_simplecharm_vnf/src/hackfest_simplecharm_vnfd.yaml;|800%|300}}
    vnfd:
    -  id: hackfest-simplecharm-vnf
        name: hackfest-simplecharm-vnf
        short-name: hackfest-simplecharm-vnf
        version: '1.0'
        description: A VNF consisting of 2 VDUs connected to an internal VL, and one VDU with cloud-init
        logo: osm.png
        connection-point:
        -  id: vnf-mgmt
            name: vnf-mgmt
            short-name: vnf-mgmt
            type: VPORT
        -  id: vnf-data
            name: vnf-data
            short-name: vnf-data
            type: VPORT
        mgmt-interface:
            cp: vnf-mgmt
        internal-vld:
        -  id: internal
            name: internal
            short-name: internal
            type: ELAN
            internal-connection-point:
            -  id-ref: mgmtVM-internal
            -  id-ref: dataVM-internal
        vdu:
        -  id: mgmtVM
            name: mgmtVM
            image: hackfest3-mgmt
            count: '1'
            vm-flavor:
                vcpu-count: '1'
                memory-mb: '1024'
                storage-gb: '10'
            interface:
            -  name: mgmtVM-eth0
                position: '1'
                type: EXTERNAL
                virtual-interface:
                    type: VIRTIO
                external-connection-point-ref: vnf-mgmt
            -  name: mgmtVM-eth1
                position: '2'
                type: INTERNAL
                virtual-interface:
                    type: VIRTIO
                internal-connection-point-ref: mgmtVM-internal
            internal-connection-point:
            -  id: mgmtVM-internal
                name: mgmtVM-internal
                short-name: mgmtVM-internal
                type: VPORT
            cloud-init-file: cloud-config.txt
        -  id: dataVM
            name: dataVM
            image: hackfest3-mgmt
            count: '1'
            vm-flavor:
                vcpu-count: '1'
                memory-mb: '1024'
                storage-gb: '10'
            interface:
            -  name: dataVM-eth0
                position: '1'
                type: INTERNAL
                virtual-interface:
                    type: VIRTIO
                internal-connection-point-ref: dataVM-internal
            -  name: dataVM-xe0
                position: '2'
                type: EXTERNAL
                virtual-interface:
                    type: VIRTIO
                external-connection-point-ref: vnf-data
            internal-connection-point:
            -  id: dataVM-internal
                name: dataVM-internal
                short-name: dataVM-internal
                type: VPORT
        vnf-configuration:
            juju:
                charm: simple
            initial-config-primitive:
            -  seq: '1'
                name: config
                parameter:
                -  name: ssh-hostname
                    value: <rw_mgmt_ip>
                -  name: ssh-username
                    value: ubuntu
                -  name: ssh-password
                    value: osm4u
            -  seq: '2'
                name: touch
                parameter:
                -  name: filename
                    value: '/home/ubuntu/first-touch'
            config-primitive:
            -  name: touch
                parameter:
                -  name: filename
                    data-type: STRING
                    default-value: '/home/ubuntu/touched'
===NS diagram===
===NS diagram===
[[File:Hackfest simplecharm ns.png|500px]]
[[File:Simplecharm ns.jpg|500px]]
===NS descriptor===
===NS descriptor===
nsd:nsd-catalog:
{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/nsd/hackfest_simplecharm_ns/src/hackfest_simplecharm_nsd.yaml;|800%|300}}
    nsd:
    -  id: hackfest-simplecharm-ns
        name: hackfest-simplecharm-ns
        short-name: hackfest-simplecharm-ns
        description: NS with 2 VNFs hackfest-simplecharm-vnf connected by datanet and mgmtnet VLs
        version: '1.0'
        logo: osm.png
        constituent-vnfd:
        -  vnfd-id-ref: hackfest-simplecharm-vnf
            member-vnf-index: '1'
        -  vnfd-id-ref: hackfest-simplecharm-vnf
            member-vnf-index: '2'
        vld:
        -  id: mgmtnet
            name: mgmtnet
            short-name: mgmtnet
            type: ELAN
            mgmt-network: 'true'
            vim-network-name: mgmt
            vnfd-connection-point-ref:
            -  vnfd-id-ref: hackfest-simplecharm-vnf
                member-vnf-index-ref: '1'
                vnfd-connection-point-ref: vnf-mgmt
            -  vnfd-id-ref: hackfest-simplecharm-vnf
                member-vnf-index-ref: '2'
                vnfd-connection-point-ref: vnf-mgmt
        -  id: datanet
            name: datanet
            short-name: datanet
            type: ELAN
            vnfd-connection-point-ref:
            -  vnfd-id-ref: hackfest-simplecharm-vnf
                member-vnf-index-ref: '1'
                vnfd-connection-point-ref: vnf-data
            -  vnfd-id-ref: hackfest-simplecharm-vnf
                member-vnf-index-ref: '2'
                vnfd-connection-point-ref: vnf-data
 
 
 
===Testing with OSM client===
===Testing with OSM client===
*Onboard VNF packages
*Onboard VNF packages
Line 828: Line 266:
  osm vnf-list
  osm vnf-list
  osm vnf-show <VNF ID>
  osm vnf-show <VNF ID>
*Connect to the VNF (Do the same in both VNFs)
*Connect to the VNF (Do the same in both VNFs) and check the Charm
  ssh ubuntu@<MGMT_IP> (pwd:osm4u)  #The password to the default user was injected via cloud-init
  ssh ubuntu@<MGMT_IP> (pwd:osm4u)  #The password to the default user was injected via cloud-init
    Check that file /home/ubuntu/first-touch exists (this file is created by the charm):
Check that file /home/ubuntu/first-touch exists (this file is created by the charm):
          ls  /home/ubuntu/first-touch
ls  /home/ubuntu/first-touch
    OSM ns-action
*Create the action for the Charm
          osm ns-action hackfest3charmed --vnf_name 1 --action_name touch --params '{filename: /home/ubuntu/mytouch1}' (Returns an operation ID)
osm ns-action hackfest3charmed --vnf_name 1 --action_name touch --params '{filename: /home/ubuntu/mytouch1}' (Returns an operation ID)
          osm ns-op-list hackfest3charmed
osm ns-op-list hackfest3charmed
          osm ns-op-show OP_ID
osm ns-op-show OP_ID
          -Check that the file were created from the actions
*Check that the file were created from the actions
                    ssh ubuntu@<MGMT_IP>
ssh ubuntu@<MGMT_IP>
                    ls /home/ubuntu/mytouch1
ls /home/ubuntu/mytouch1
 


===Testing with OSM UI===
===Testing with OSM UI===
Line 855: Line 293:
     -Specify in the config section a default VIM network name to map “MGMTNET”:
     -Specify in the config section a default VIM network name to map “MGMTNET”:
     -Click the info button to see the mgmt IP address
     -Click the info button to see the mgmt IP address
*Connect to the VNF (Do the same in both VNFs)
*Connect to the VNF (Do the same in both VNFs) and check the Charm
  ssh ubuntu@<MGMT_IP> (pwd:osm4u)  #The password to the default user was injected via cloud-init
  ssh ubuntu@<MGMT_IP> (pwd:osm4u)  #The password to the default user was injected via cloud-init
    Check that file /home/ubuntu/first-touch exists (this file is created by the charm):
Check that file /home/ubuntu/first-touch exists (this file is created by the charm):
          ls  /home/ubuntu/first-touch
ls  /home/ubuntu/first-touch
    OSM ns-action
*Create the action for the Charm
          osm ns-action hackfest3charmed --vnf_name 1 --action_name touch --params '{filename: /home/ubuntu/mytouch1}' (Returns an operation ID)
osm ns-action hackfest3charmed --vnf_name 1 --action_name touch --params '{filename: /home/ubuntu/mytouch1}' (Returns an operation ID)
          osm ns-op-list hackfest3charmed
osm ns-op-list hackfest3charmed
          osm ns-op-show OP_ID
osm ns-op-show OP_ID
          -Check that the file were created from the actions
*Check that the file were created from the actions
                    ssh ubuntu@<MGMT_IP>
ssh ubuntu@<MGMT_IP>
                    ls /home/ubuntu/mytouch1
ls /home/ubuntu/mytouch1

Latest revision as of 15:49, 5 December 2018

Examples from the 4th OSM Hackfest

Hackfest material

Examples

Basic VNF and NS

VNF diagram

Hackfest simple vnf.png

VNF descriptor

{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/vnfd/hackfest_basic_vnf/src/hackfest_basic_vnfd.yaml;%7C800%%7C300}}

NS diagram

Hackfest simple ns.png

NS descriptor

{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/nsd/hackfest_basic_ns/src/hackfest_basic_nsd.yaml;%7C800%%7C300}}

Testing with OSM client

  • Onboard VNF packages
osm vnfd-create hackfest_basic_vnf.tar.gz
osm vnfd-list
osm vnfd-show hackfest_basic-vnf
  • Onboard NS packages
osm nsd-create hackfest_basic_ns.tar.gz
osm nsd-list
osm nsd-show hackfest_basic-ns
  • Instantiate
osm ns-create --ns_name hf_basic --nsd_name hackfest_basic-ns \
  --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID> \
  --ssh_keys <KEY1_PUBKEY_FILE> \
  --config '{vld: [ {name: mgmtnet, vim-network-name: <VIM_MGMT_NAME>} ] }'
  • Check NS status
osm ns-list
osm ns-show hf_basic
  • Check VNF instances to see the instance and get the mgmt IP address of the VNF
osm vnf-list
osm vnf-show <VNF ID>
  • Connect to the VNF
ssh -i <priv_key> ubuntu@<IP>

Testing with OSM UI

  • Onboard VNF package
Go to VNF packages
Drag and drop the VNF package to the ...
  • Onboard NS package
Drag and drop the NS package to the ...
  • Instantiate NS
Go to NS packages
In hackfest_basic-ns, click in “Actions: Instantiate NS”
Complete the form:
    -Add a name to the NS instance
    -Select the Datacenter where the NS will be deployed
    -Specify in the config section a default VIM network name to map “mgmtnet”:
    -Paste your public SSH key to get access to the VNF (VMs need to have cloud-init enabled, in this case the hackfest basic example has cloud-init)
  • Connect to the VNF:
ssh -i <priv_key> ubuntu@<IP>

Multi-VDU VNF

VNF diagram

Hackfest multivdu vnf.png

VNF descriptor

{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/vnfd/hackfest_multivdu_vnf/src/hackfest_multivdu_vnfd.yaml;%7C800%%7C300}}

NS diagram

Hackfest multivdu ns.png

NS descriptor

{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/nsd/hackfest_multivdu_ns/src/hackfest_multivdu_nsd.yaml;%7C800%%7C300}}

Testing with OSM client

  • Onboard VNF packages
osm vnfd-create hackfest_multivdu_vnf.tar.gz
osm vnfd-list
osm vnfd-show hackfest_multivdu-vnf
  • Onboard NS packages
osm nsd-create hackfest_multivdu_ns.tar.gz
osm nsd-list
osm nsd-show hackfest_multivdu-ns
  • Instantiate
osm ns-create --ns_name hf_multivdu --nsd_name hackfest_multivdu-ns \
  --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID> 
  • Check NS status
osm ns-list
osm ns-show hf_multivdu
  • Check VNF instances to see the instance and get the mgmt IP address of the VNF
osm vnf-list
osm vnf-show <VNF ID>
  • Connect to the VNF
ssh osm@<IP> (pwd:osm4u)

Testing with OSM UI

  • Onboard VNF package
Go to VNF packages
Drag and drop the VNF package to the ...
  • Onboard NS package
Drag and drop the NS package to the ...
  • Instantiate NS
Go to NS packages
In hackfest_multivdu-ns, click in “Actions: Instantiate NS”
    -Complete the form
    -Add a name to the NS instance
    -Select the Datacenter where the NS will be deployed
    -Specify in the config section a default VIM network name to map “MGMTNET”:
    -Click the info button to see the mgmt IP address
  • Connect to each VNF:
ssh osm@<IP>  (pwd:osm4u)

VNF with Day-0 configuration

VNF diagram

Cloudinit vnf.png

VNF descriptor

{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/vnfd/hackfest_cloudinit_vnf/src/hackfest_cloudinit_vnfd.yaml;%7C800%%7C300}}

NS diagram

Cloudinit ns.png

NS descriptor

{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/nsd/hackfest_cloudinit_ns/src/hackfest_cloudinit_nsd.yaml;%7C800%%7C300}}

Testing with OSM client

  • Onboard VNF packages
osm vnfd-create hackfest_cloudinit_vnfd.tar.gz
osm vnfd-list
osm vnfd-show hackfest_cloudinit-vnf
  • Onboard NS packages
osm nsd-create hackfest_cloudinit_nsd.tar.gz
osm nsd-list
osm nsd-show hackfest_cloudinit-ns
  • Instantiate
osm ns-create --ns_name hf_cloudinit --nsd_name hackfest_cloudinit-ns \
  --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID> 
  • Check NS status
osm ns-list
osm ns-show hf_cloudinit
  • Check VNF instances to see the instance and get the mgmt IP address of the VNF
osm vnf-list
osm vnf-show <VNF ID>
  • Connect to the VNF
ssh osm@<IP> (pwd:osm4u)  #The password to the default user was injected via cloud-init
    Check that Cloud init worked:
         sudo ls /root/helloworld.txt
         sudo cat /root/helloworld.txt

Testing with OSM UI

  • Onboard VNF package
Go to VNF packages
Drag and drop the VNF package to the ...
  • Onboard NS package
Drag and drop the NS package to the ...
  • Instantiate NS
Go to NS packages
In hackfest_cloudinit-ns, click in “Actions: Instantiate NS”
    -Complete the form
    -Add a name to the NS instance
    -Select the Datacenter where the NS will be deployed
    -Specify in the config section a default VIM network name to map “MGMTNET”:
    -Click the info button to see the mgmt IP address
  • Connect to the VNF
ssh osm@<IP> (pwd:osm4u)  #The password to the default user was injected via cloud-init
    Check that Cloud init worked:
         sudo ls /root/helloworld.txt
         sudo cat /root/helloworld.txt

VNF with EPA requirements

VNF diagram

Epasriov vnf.jpg

VNF descriptor

{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/vnfd/hackfest_epasriov_vnf/src/hackfest_epasriov_vnfd.yaml;%7C800%%7C300}}

NS diagram

Hackfest epasriov ns.png

NS descriptor

{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/nsd/hackfest_epasriov_ns/src/hackfest_epasriov_nsd.yaml;%7C800%%7C300}}

Testing with OSM client

  • Onboard VNF packages
osm vnfd-create hackfest_epasriov_vnf.tar.gz
osm vnfd-list
osm vnfd-show hackfest_epasriov-vnf
  • Onboard NS packages
osm nsd-create hackfest_epasriov_ns.tar.gz
osm nsd-list
osm nsd-show hackfest_epasriov-ns
  • Instantiate
osm ns-create --ns_name hf_epasriov --nsd_name hackfest_epasriov-ns \
  --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID> 
  • Check NS status
osm ns-list
osm ns-show hf_epasriov
  • Check VNF instances to see the instance and get the mgmt IP address of the VNF
osm vnf-list
osm vnf-show <VNF ID>
  • Connect to the VNF (Do the same in both VNFs)
ssh ubuntu@<MGMT_IP> (pwd:osm4u)  #The password to the default user was injected via cloud-init
    Check that EPA is working:
         ssh -i test4.pem ubuntu<IP_dataVM>
         Run pktgen

Testing with OSM UI

  • Onboard VNF package
Go to VNF packages
Drag and drop the VNF package to the ...
  • Onboard NS package
Drag and drop the NS package to the ...
  • Instantiate NS
Go to NS packages
In hackfest_epasriov-ns, click in “Actions: Instantiate NS”
    -Complete the form
    -Add a name to the NS instance
    -Select the Datacenter where the NS will be deployed
    -Specify in the config section a default VIM network name to map “MGMTNET”:
    -Click the info button to see the mgmt IP address
  • Connect to the VNF (Do the same in both VNFs)
ssh ubuntu@<MGMT_IP> (pwd:osm4u)  #The password to the default user was injected via cloud-init
    Check that EPA is working:
         ssh -i test4.pem ubuntu<IP_dataVM>
         Run pktgen

VNF with Day-1/Day-2 configuration (adding a charm)

VNF diagram

Simplecharm vnf.jpg

VNF descriptor

{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/vnfd/hackfest_simplecharm_vnf/src/hackfest_simplecharm_vnfd.yaml;%7C800%%7C300}}

NS diagram

Simplecharm ns.jpg

NS descriptor

{{#iDisplay:https://osm.etsi.org/gitweb/?p=osm/devops.git;a=blob_plain;f=descriptor-packages/nsd/hackfest_simplecharm_ns/src/hackfest_simplecharm_nsd.yaml;%7C800%%7C300}}

Testing with OSM client

  • Onboard VNF packages
osm vnfd-create hackfest3_simplecharm_vnf.tar.gz
osm vnfd-list
osm vnfd-show hackfest3charmed-vnf
  • Onboard NS packages
osm nsd-create hackfest_simplecharm_ns.tar.gz
osm nsd-list
osm nsd-show hackfest3charmed-ns
  • Instantiate
osm ns-create --ns_name hackfest3charmed --nsd_name hackfest3charmed-ns \
  --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID> 
  • Check NS status
osm ns-list
osm ns-show hackfest3charmed
  • Check VNF instances to see the instance and get the mgmt IP address of the VNF
osm vnf-list
osm vnf-show <VNF ID>
  • Connect to the VNF (Do the same in both VNFs) and check the Charm
ssh ubuntu@<MGMT_IP> (pwd:osm4u)  #The password to the default user was injected via cloud-init
Check that file /home/ubuntu/first-touch exists (this file is created by the charm):
ls  /home/ubuntu/first-touch
  • Create the action for the Charm
osm ns-action hackfest3charmed --vnf_name 1 --action_name touch --params '{filename: /home/ubuntu/mytouch1}' (Returns an operation ID)
osm ns-op-list hackfest3charmed
osm ns-op-show OP_ID
  • Check that the file were created from the actions
ssh ubuntu@<MGMT_IP>
ls /home/ubuntu/mytouch1


Testing with OSM UI

  • Onboard VNF package
Go to VNF packages
Drag and drop the VNF package to the ...
  • Onboard NS package
Drag and drop the NS package to the ...
  • Instantiate NS
Go to NS packages
In hackfest3-simplecharm-ns, click in “Actions: Instantiate NS”
    -Complete the form
    -Add a name to the NS instance
    -Select the Datacenter where the NS will be deployed
    -Specify in the config section a default VIM network name to map “MGMTNET”:
    -Click the info button to see the mgmt IP address
  • Connect to the VNF (Do the same in both VNFs) and check the Charm
ssh ubuntu@<MGMT_IP> (pwd:osm4u)  #The password to the default user was injected via cloud-init
Check that file /home/ubuntu/first-touch exists (this file is created by the charm):
ls  /home/ubuntu/first-touch
  • Create the action for the Charm
osm ns-action hackfest3charmed --vnf_name 1 --action_name touch --params '{filename: /home/ubuntu/mytouch1}' (Returns an operation ID)
osm ns-op-list hackfest3charmed
osm ns-op-show OP_ID
  • Check that the file were created from the actions
ssh ubuntu@<MGMT_IP>
ls /home/ubuntu/mytouch1