Examples from OSM Hackfests: Difference between revisions
From OSM Public Wiki
Candelpreste (talk | contribs) |
Candelpreste (talk | contribs) No edit summary |
||
| Line 13: | Line 13: | ||
* '''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] | ||
* '''Image Ubuntu 1604:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2] | |||
* '''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/3rd-hackfest/presentations/20180626%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: | [[File:Hackfest_simple_vnf.JPG|400px]] | ||
===VNF descriptor=== | ===VNF descriptor=== | ||
vnfd:vnfd-catalog: | |||
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_vnf.JPG|400px]] | |||
===NS descriptor=== | ===NS descriptor=== | ||
nsd:nsd-catalog: | |||
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 | |||
** 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> \ | --vim_account <VIM_ACCOUNT_NAME>|<VIM_ACCOUNT_ID> \ | ||
--ssh_keys <KEY1_PUBKEY_FILE> \ | --ssh_keys <KEY1_PUBKEY_FILE> \ | ||
--config '{vld: [ {name: mgmtnet, vim-network-name: <VIM_MGMT_NAME>} ] }' | --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 ... | |||
*Connect to the VNF | |||
ssh -i <priv_key> ubuntu@<IP> | ssh -i <priv_key> ubuntu@<IP> | ||
===Testing with OSM UI=== | ===Testing with OSM UI=== | ||
* Onboard VNF package | * Onboard VNF package | ||
| Line 73: | Line 119: | ||
*Connect to the VNF: | *Connect to the VNF: | ||
ssh -i <priv_key> ubuntu@<IP> | ssh -i <priv_key> ubuntu@<IP> | ||
== 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] | |||
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns] | |||
* '''Image Ubuntu 1604:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2] | |||
* '''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 Modeling multi-VDU VNF] | |||
===VNF diagram=== | |||
[[File:Hackfest multivdu vnf.JPG|500px]] | |||
===VNF descriptor=== | |||
vnfd:vnfd-catalog: | |||
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=== | |||
[[File:Hackfest multivdu ns.JPG|500px]] | |||
===NS descriptor=== | |||
nsd:nsd-catalog: | |||
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 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”: | |||
***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) | |||
***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 with Day-0 configuration == | ||
* '''VNF | |||
* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm- | * '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_3_vnfd.tar.gz hackfest3-vnf] | ||
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_3_nsd.tar.gz hackfest3-ns] | |||
* '''Image hackfest3-mgmt:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/hackfest3-mgmt.qcow2] | |||
* '''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] | |||
===VNF diagram=== | |||
[[File:Hackfest cloudinit vn.JPG|500px]] | |||
===VNF descriptor=== | |||
vnfd:vnfd-catalog: | |||
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=== | |||
[[File:Hackfest cloudinit ns.JPG|500px]] | |||
===NS descriptor=== | |||
nsd:nsd-catalog: | |||
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 UI=== | |||
**Select hackfest3-ns and instanciate it | |||
**Complete the form | |||
***Add a name to the NS | |||
***Select the Datacenter where the NS will be deployed | |||
***Add SSH key | |||
**Go to the dashboard to see the instance and get the mgmt IP address of the VNF | |||
**Connect to each VNF: | |||
***ssh ubuntu@<IP> | |||
**Check that the cloud-config file was executed | |||
== VNF with EPA requirements == | == VNF with EPA requirements == | ||
* '''VNF | |||
* '''Reference material:''' [https://osm-download.etsi.org/ftp/osm- | * '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_4_vnfd.tar.gz hackfest4-vnf] | ||
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_4_nsd.tar.gz hackfest4-ns] | |||
* '''Image hackfest-pktgen:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/hackfest-pktgen.qcow2] | |||
* '''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] | |||
===VNF diagram=== | |||
[[File:Hackfest epasriov vnf.JPG|500px]] | |||
===VNF descriptor=== | |||
vnfd:vnfd-catalog: | |||
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=== | |||
[[File:Hackfest epasriov ns.JPG|500px]] | |||
===NS descriptor=== | |||
nsd:nsd-catalog: | |||
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 UI=== | |||
**Select hackfest4-ns and instanciate it | |||
**Complete the form | |||
***Add a name to the NS | |||
***Select the Datacenter where the NS will be deployed | |||
**SSH to the mgmtVM of one of the VNFs | |||
**Check that cloud-init worked in mgmtVM | |||
**Check interface names in mgmtVM | |||
**Jump to dataVM | |||
***ssh -i test4.pem<IP_dataVM> | |||
**Check interface names in mgmtVM | |||
**Run 'pktgen' | |||
**SSH to the mgmtVM of the second VNF | |||
**Check that cloud-init worked in mgmtVM | |||
**Check interface names in mgmtVM | |||
**Jump to dataVM | |||
***ssh -i test4.pem<IP_dataVM> | |||
**Check interface names in mgmtVM | |||
**Run 'pktgen' | |||
== VNF with Day-1/Day-2 configuration (adding a charm) == | == VNF with Day-1/Day-2 configuration (adding a charm) == | ||
Revision as of 13:30, 18 July 2018
Examples from the 3rd OSM Hackfest
Work material
Examples
Basic VNF and NS
- VNF package: hackfest1-vnf
- NS package: hackfest1-ns
- Image Ubuntu 1604: [1]
- Reference material: Presentation: creating a basic VNF and NS
VNF diagram
VNF descriptor
vnfd:vnfd-catalog:
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 descriptor
nsd:nsd-catalog:
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
- 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 ...
- 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 Ubuntu 1604: [2]
- Reference material: Modeling multi-VDU VNF
VNF diagram
VNF descriptor
vnfd:vnfd-catalog:
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 descriptor
nsd:nsd-catalog:
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 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”:
- 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)
- 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: [3]
- Reference material: Adding day-0 configuration to VNFs
VNF diagram
VNF descriptor
vnfd:vnfd-catalog:
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 descriptor
nsd:nsd-catalog:
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 UI
- Select hackfest3-ns and instanciate it
- Complete the form
- Add a name to the NS
- Select the Datacenter where the NS will be deployed
- Add SSH key
- Go to the dashboard to see the instance and get the mgmt IP address of the VNF
- Connect to each VNF:
- ssh ubuntu@<IP>
- Check that the cloud-config file was executed
VNF with EPA requirements
- VNF package: hackfest4-vnf
- NS package: hackfest4-ns
- Image hackfest-pktgen: [4]
- Reference material: Modeling EPA capabilities in your VNF descriptor
VNF diagram
VNF descriptor
vnfd:vnfd-catalog:
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 descriptor
nsd:nsd-catalog:
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 UI
- Select hackfest4-ns and instanciate it
- Complete the form
- Add a name to the NS
- Select the Datacenter where the NS will be deployed
- SSH to the mgmtVM of one of the VNFs
- Check that cloud-init worked in mgmtVM
- Check interface names in mgmtVM
- Jump to dataVM
- ssh -i test4.pem<IP_dataVM>
- Check interface names in mgmtVM
- Run 'pktgen'
- SSH to the mgmtVM of the second VNF
- Check that cloud-init worked in mgmtVM
- Check interface names in mgmtVM
- Jump to dataVM
- ssh -i test4.pem<IP_dataVM>
- Check interface names in mgmtVM
- Run 'pktgen'