Examples from OSM Hackfests: Difference between revisions
From OSM Public Wiki
Candelpreste (talk | contribs) mNo edit summary |
Ramonsalguer (talk | contribs) |
||
Line 236: | Line 236: | ||
* '''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/3rd-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/ | * '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-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:''': |
Revision as of 23:31, 10 October 2018
Examples from the 3rd OSM Hackfest
Hackfest material
Examples
Basic VNF and NS
- VNF package: hackfest1-vnf
- NS package: hackfest1-ns
- Image: ubuntu1604
- Reference material: Presentation: creating a basic VNF and NS
VNF diagram
VNF descriptor
NS diagram
NS descriptor
Testing with OSM client
- Onboard VNF packages
osm vnfd-create hackfest1_vnfd.tar.gz osm vnfd-list osm vnfd-show hackfest1-vnf
- Onboard NS packages
osm nsd-create hackfest1_nsd.tar.gz osm nsd-list osm nsd-show hackfest1-ns
- Instantiate
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>} ] }'
- Check NS status
osm ns-list osm ns-show hf1
- 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 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”: -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)
- Connect to the VNF:
ssh -i <priv_key> ubuntu@<IP>
Multi-VDU VNF
- VNF package: hackfest2-vnf
- NS package: hackfest2-ns
- Image: ubuntu1604
- Reference material: Presentation: Modeling multi-VDU VNF
VNF diagram
VNF descriptor
NS diagram
NS descriptor
Testing with OSM client
- Onboard VNF packages
osm vnfd-create hackfest2_vnfd.tar.gz osm vnfd-list osm vnfd-show hackfest2-vnf
- Onboard NS packages
osm nsd-create hackfest2_nsd.tar.gz osm nsd-list osm nsd-show hackfest2-ns
- Instantiate
osm ns-create --ns_name hf2 --nsd_name hackfest2-ns \ --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID>
- Check NS status
osm ns-list osm ns-show hf2
- 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 hackfest2-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 package: hackfest3-vnf
- NS package: hackfest3-ns
- Image hackfest3-mgmt: hackfest3-mgmt
- Reference material: Adding day-0 configuration to VNFs
VNF diagram
VNF descriptor
NS diagram
NS descriptor
Testing with OSM client
- Onboard VNF packages
osm vnfd-create hackfest3_vnfd.tar.gz osm vnfd-list osm vnfd-show hackfest3-vnf
- Onboard NS packages
osm nsd-create hackfest3_nsd.tar.gz osm nsd-list osm nsd-show hackfest3-ns
- Instantiate
osm ns-create --ns_name hf3 --nsd_name hackfest3-ns \ --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID>
- Check NS status
osm ns-list osm ns-show hf3
- 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 hackfest3-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 package: hackfest4-vnf
- NS package: hackfest4-ns
- Image : hackfest-pktgen
- Reference material: Modeling EPA capabilities in your VNF descriptor
VNF diagram
VNF descriptor
NS diagram
NS descriptor
Testing with OSM client
- Onboard VNF packages
osm vnfd-create hackfest4_vnfd.tar.gz osm vnfd-list osm vnfd-show hackfest4-vnf
- Onboard NS packages
osm nsd-create hackfest4_nsd.tar.gz osm nsd-list osm nsd-show hackfest4-ns
- Instantiate
osm ns-create --ns_name hf4 --nsd_name hackfest4-ns \ --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID>
- Check NS status
osm ns-list osm ns-show hf4
- 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 hackfest4-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 package: hackfest_simplecharm_vnf
- NS package: hackfest_simplecharm_ns
- Image : hackfest3-mgmt
- Reference material::
VNF diagram
VNF descriptor
NS diagram
NS descriptor
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