Examples from OSM Hackfests: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
No edit summary
Line 2: Line 2:
Examples from the 3rd OSM Hackfest
Examples from the 3rd OSM Hackfest


= URLs and Folders =
= Work material =
* [[2nd_OSM_Hackfest#Agenda | Table of contents]]
* [[2nd_OSM_Hackfest#Agenda | Table of contents]]
* [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/ Documentation]
* [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/ Documentation]
Line 14: Line 14:
* '''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/3rd-hackfest/packages/hackfest_1_vnfd.tar.gz hackfest1-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/3rd-hackfest/packages/hackfest_1_nsd.tar.gz hackfest1-ns]


*Creating VNF with the client
*Creating VNF with the client
 
[[File:VNF1.JPG]]
    •Generate skeleton folder (VNF with only 1 VDU):
        /usr/share/osm-devops/descriptor-packages/tools/generate_descriptor_pkg.sh-t vnfd --image ubuntu1604 -c hackfest1
    •Go to hackfest1_vnfd folder and edit the descriptor:
        Use the IM tree representation of VNFD as a reference (http://osm-download.etsi.org/ftp/osm-doc/vnfd.html)
*Editing the VNF descriptor
*Editing the VNF descriptor
[[File:VNFDescriptor1.JPG]]
*Validate the VNF descriptor and generate VNF package
*Validate the VNF descriptor and generate VNF package
    •Validate VNF descriptor
        /usr/share/osm-devops/descriptor-packages/tools/validate_descriptor.py <DESCRIPTOR_FILE>
    •Generate VNF package(from parent folder)
        /usr/share/osm-devops/descriptor-packages/tools/generate_descriptor_pkg.sh -t vnfd -N <VNFD_FOLDER>   
*Creating the NS with the client
[[File:NS1.JPG]]
    •Generate skeleton folder (NS with only 1 VNF)
        /usr/share/osm-devops/descriptor-packages/tools/generate_descriptor_pkg.sh -t nsd -c hackfest1
    •Go to hackfest1_nsd folder and edit the descriptor:
        Use the IM tree representation of VNFD as a reference (http://osm-download.etsi.org/ftp/osm-doc/nsd.html)
*Editing the NS descriptor
[[File:NSDescriptor1.JPG]]
*Validate the NS descriptor and generate NS package
    •Validate NS descriptor
        /usr/share/osm-devops/descriptor-packages/tools/validate_descriptor.py <DESCRIPTOR_FILE>
    •Generate NS package (from parent folder)
        /usr/share/osm-devops/descripto-rpackages/tools/generate_descriptor_pkg.sh -t nsd -N <NSD_FOLDER>
*Adding VNF and NS packages
    •VNF package:
        •osm vnfd-list
        •osm vnfd-create hackfest1_vnfd.tar.gz
        •osm vnfd-show hackfest1-vnf
        •osm vnfd-delete ...
    •NS package
        •osm nsd-list
        •osm nsd-create hackfest1_nsd.tar.gz
        •osm nsd-show hackfest1-ns
        •osm vnfd-delete ...
    •Generating an SSH key pair to access to VNFs later
        •ssh-keygen
*Deploying NS with the client or UI
    •Client
        •osm ns-list
        •osm ns-create --ns_name hf1 --nsd_name hackfest1-ns \
        --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID> \
        --ssh_keys <KEY1_PUBKEY_FILE> \
        --config '{vld: [ {name: mgmtnet, vim-network-name: <VIM_MGMT_NAME>} ] }'
        •osm ns-show hf1
        •osm ns-delete ...
        •Check VNF instances to see the instance and get the mgmt IP address of the VNF
            •osm vnf-list
            •osm vnf-show ...
        •Connect to the VNF
            •ssh -i <priv_key> ubuntu@<IP>


    •UI
        •Go to NS packages
        •In hackfest1-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”:
                    • {vld: [ {name: mgmtnet, vim-network-name: <VIM_MGMT_NAME>} ] }
                    • mgmt (openstack1)
                    • external (openstack3)
                    • public (openstack4)
            • Paste your SSH key
        •Go to VNF instances to see the instance and get the mgmt IP address of the VNF
        •Connect to the VNF:
            •ssh -i <priv_key> ubuntu@<IP>
   


* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/2nd-hackfest/presentations/20180321%20OSM%20Hackfest%20-%20Session%201%20-%20Creating%20a%20basic%20VNF%20and%20NS.pdf Creating a basic VNF and NS]
* '''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 Creating a basic VNF and NS]


== Multi-VDU VNF ==
== Multi-VDU VNF ==

Revision as of 10:53, 17 July 2018

Examples from the 3rd OSM Hackfest

Work material

Examples

Basic VNF and NS


  • Creating VNF with the client

VNF1.JPG

   •Generate skeleton folder (VNF with only 1 VDU):
       /usr/share/osm-devops/descriptor-packages/tools/generate_descriptor_pkg.sh-t vnfd --image ubuntu1604 -c hackfest1
   •Go to hackfest1_vnfd folder and edit the descriptor:
       Use the IM tree representation of VNFD as a reference (http://osm-download.etsi.org/ftp/osm-doc/vnfd.html)
  • Editing the VNF descriptor

VNFDescriptor1.JPG

  • Validate the VNF descriptor and generate VNF package
   •Validate VNF descriptor
       /usr/share/osm-devops/descriptor-packages/tools/validate_descriptor.py <DESCRIPTOR_FILE>
   •Generate VNF package(from parent folder)
       /usr/share/osm-devops/descriptor-packages/tools/generate_descriptor_pkg.sh -t vnfd -N <VNFD_FOLDER>    
  • Creating the NS with the client

NS1.JPG

   •Generate skeleton folder (NS with only 1 VNF)
       /usr/share/osm-devops/descriptor-packages/tools/generate_descriptor_pkg.sh -t nsd -c hackfest1
   •Go to hackfest1_nsd folder and edit the descriptor:
       Use the IM tree representation of VNFD as a reference (http://osm-download.etsi.org/ftp/osm-doc/nsd.html)
  • Editing the NS descriptor

NSDescriptor1.JPG

  • Validate the NS descriptor and generate NS package
   •Validate NS descriptor
       /usr/share/osm-devops/descriptor-packages/tools/validate_descriptor.py <DESCRIPTOR_FILE>
   •Generate NS package (from parent folder)
       /usr/share/osm-devops/descripto-rpackages/tools/generate_descriptor_pkg.sh -t nsd -N <NSD_FOLDER>
  • Adding VNF and NS packages
    •VNF package: 
       •osm vnfd-list
       •osm vnfd-create hackfest1_vnfd.tar.gz
       •osm vnfd-show hackfest1-vnf
       •osm vnfd-delete ...
    •NS package 
       •osm nsd-list
       •osm nsd-create hackfest1_nsd.tar.gz
       •osm nsd-show hackfest1-ns
       •osm vnfd-delete ...
    •Generating an SSH key pair to access to VNFs later
       •ssh-keygen
  • Deploying NS with the client or UI
   •Client 
       •osm ns-list
       •osm ns-create --ns_name hf1 --nsd_name hackfest1-ns \
       --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID> \
       --ssh_keys <KEY1_PUBKEY_FILE> \
       --config '{vld: [ {name: mgmtnet, vim-network-name: <VIM_MGMT_NAME>} ] }'
       •osm ns-show hf1
       •osm ns-delete ...
       •Check VNF instances to see the instance and get the mgmt IP address of the VNF
           •osm vnf-list
           •osm vnf-show ...
        •Connect to the VNF
            •ssh -i <priv_key> ubuntu@<IP>
   •UI
       •Go to NS packages
       •In hackfest1-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”:
                   • {vld: [ {name: mgmtnet, vim-network-name: <VIM_MGMT_NAME>} ] }
                   • mgmt (openstack1)
                   • external (openstack3)
                   • public (openstack4)
           • Paste your SSH key
        •Go to VNF instances to see the instance and get the mgmt IP address of the VNF
        •Connect to the VNF:
            •ssh -i <priv_key> ubuntu@<IP>
    

Multi-VDU VNF


VNF with Day-0 configuration

VNF with EPA requirements

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