Commit 12b27195 authored by Francisco-Javier Ramon Salguero's avatar Francisco-Javier Ramon Salguero
Browse files

Merge branch 'master' into 'master'

Slicing test documentation

See merge request !2
parents 97a5f8ee 8ef56f88
Loading
Loading
Loading
Loading
+188 −17
Original line number Diff line number Diff line
@@ -687,47 +687,218 @@ NOTE: VNF Metrics collection for scaled instances is not supported.

### \[SLICING-01\] Basic Network Slicing

1. Onboard the packages and the Network Slice Template
1. Onboard the packages and the Network Slice Templates

   ```bash
   osm vnfpkg-create slice_hackfest_vnf.tar.gz
   osm nspkg-create slice_hackfest_ns.tar.gz
   osm nst-create slice_hackfest_nst.yaml
   osm vnfd-create slice_basic_vnf
   osm vnfd-create slice_basic_middle_vnfd
   osm nsd-create slice_basic_ns
   osm nsd-create slice_basic_middle_nsd
   osm netslice-template-create slice_basic_nst/slice_basic_nst.yaml
   ```

2. Instantiate the Slice

   ```bash
   osm nsi-create --nsi_name my_slice --nst_name slice_hackfest_nst --vim_account <vim_account_name> --config 'netslice-vld: [{name: slice_hackfest_vld_data, vim-network-name: <VIM_MGMT_NET>}]'
   osm nsi-create --nsi_name slicebasic --nst_name slice_basic_nst --vim_account <VIM_TARGET> --config '{netslice-vld: [ {name: slice_vld_mgmt, vim-network-name: <VIM_MGMT_NET>} ] }'
   # Wait for the slice to be configured
   osm nsi-list --filter name="slicebasic"
   ```
   
3. Check that the Network services have been created.
3. Get the slice Middle VNF IP address

   ```bash
   osm nsi-list
   osm ns-list |grep my_slice
   osm nsi-show my_slice
   # Look for nsr-ref-list. There should be 2 Network Services
   osm ns-show <NS_ID>
   osm vnf-show --ns <NS_ID>
   # Get the ns id of the middle ns (called slicebasic.slice_basic_nsd_2)
   osm ns-list | grep slicebasic.slice_basic_nsd_2 | awk '{print $4}'
   # Get the IP address of the first (and only) VNF in the ns: MGMT_IP
   osm vnf-list --filter member-vnf-index-ref=1 | grep <ns_id> | awk '{print $14}'
   ```

4. SSH to the VNF
4. Test Ping to the middle VNF

   ```bash
   ping -c 5 -W 1 <MGMT_IP > /dev/null && echo OK
   ```

5. SSH to the middle VNF

   ```bash
   osm vnf-show --ns <NS_ID>
   ssh osm@<MGMT_IP>  [pwd: osm4u]
   ```

5. Delete the slice

6. Get all the IP addresses of the slice

   ```bash
   osm nsi-delete my_slice
   # Get the list of ns of the slice
   osm ns-list | grep slicebasic | awk '{print $4}'
   # For each of the ns in the list, get the list of the VNFs
   osm vnf-list | grep <ns_id> | awk '{print $2}'
   # For each VNFs in the list, get the list of the IPs
   osm vnf-show <vnd_id> --filter vdur --literal | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -t: -u -k1,1
   ```

7. Test first slice connectivity: Ping all the VMs in the slice

   ```bash
   ssh osm@<MGMT_IP>  [pwd: osm4u]
   # For each of the IP addresses obtained in step #5
   ping -c 5 -W 1 <ip_address> > /dev/null && echo OK
   ```

8. Stop the first slice intance

   ```bash
   osm nsi-delete slicebasic
   ```

9. Delete the template and packages

   ```bash
   osm netslice-template-delete slice_basic_nst
   osm netslice-template-delete slice_basic_nst2
   osm nsd-delete slice_basic_nsd
   osm nsd-delete slice_basic_middle_nsd
   osm vnfd-delete slice_basic_vnfd
   osm vnfd-delete slice_basic_middle_vnfd
   ```

### \[SLICING-02\] Complex Network Slicing

TODO: Under ellaboration. Similar to above, but with more components and shared NS.
1. Onboard the packages and the Network Slice Templates

   ```bash
   osm vnfd-create slice_basic_vnf
   osm vnfd-create slice_basic_middle_vnfd
   osm nsd-create slice_basic_ns
   osm nsd-create slice_basic_middle_nsd
   osm netslice-template-create slice_basic_nst/slice_basic_nst.yaml
   osm netslice-template-create slice_basic_nst/slice_basic_2nd_nst.yaml
   ```

2. Instantiate the first Slice

   ```bash
   osm nsi-create --nsi_name slicebasic --nst_name slice_basic_nst --vim_account <VIM_TARGET> --config '{netslice-vld: [ {name: slice_vld_mgmt, vim-network-name: <VIM_MGMT_NET>} ] }'
   # Wait for the slice to be configured
   osm nsi-list --filter name="slicebasic"
   ```
   
3. Instantiate the second Slice

   ```bash
   osm nsi-create --nsi_name sliceshared --nst_name slice_basic_nst2 --vim_account <VIM_TARGET> --config '{netslice-vld: [ {name: slice_vld_mgmt, vim-network-name: <VIM_MGMT_NET>} ] }'
   # Wait for the slice to be configured
   osm nsi-list --filter name="sliceshared"
   ```
   

4. Check that the Network services have been created.

   ```bash
   # Count the Network services in the first slice
   osm ns-list | grep slicebasic | wc -l
   # Count the Network services in the second slice
   osm ns-list | grep sliceshared | wc -l
   # The addition should be 4
   ```

4. Get the slice Middle VNF IP address

   ```bash
   # Get the ns id of the middle ns (called slicebasic.slice_basic_nsd_2)
   osm ns-list | grep slicebasic.slice_basic_nsd_2 | awk '{print $4}'
   # Get the IP address of the first (and only) VNF in the ns: MGMT_IP
   osm vnf-list --filter member-vnf-index-ref=1 | grep <ns_id> | awk '{print $14}'
   ```

5. Get all the IP addresses of the first slice

   ```bash
   # Get the list of ns of the slice
   osm ns-list | grep slicebasic | awk '{print $4}'
   # For each of the ns in the list, get the list of the VNFs
   osm vnf-list | grep <ns_id> | awk '{print $2}'
   # For each VNFs in the list, get the list of the IPs
   osm vnf-show <vnd_id> --filter vdur --literal | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -t: -u -k1,1
   ```

6. Test Ping to the middle VNF

   ```bash
   ping -c 5 -W 1 <MGMT_IP > /dev/null && echo OK
   ```

7. SSH to the middle VNF

   ```bash
   ssh osm@<MGMT_IP>  [pwd: osm4u]
   ```

8. Test first slice connectivity: Ping all the VMs in the slice

   ```bash
   ssh osm@<MGMT_IP>  [pwd: osm4u]
   # For each of the IP addresses obtained in step #5
   ping -c 5 -W 1 <ip_address> > /dev/null && echo OK
   ```

9. Stop the first slice intance

   ```bash
   osm nsi-delete slicebasic
   ```

10. Count the Network services remaining after deleting the first slice

   ```bash
   # Count the Network services in the first slice
   osm ns-list | grep slicebasic | wc -l
   # Count the Network services in the second slice
   osm ns-list | grep sliceshared | wc -l
   # The addition should be 2
   ```

11. Get all the IP addresses of the second slice

   ```bash
   # Get the list of ns of the slice
   osm ns-list | grep sliceshared | awk '{print $4}'
   # For each of the ns in the list, get the list of the VNFs
   osm vnf-list | grep <ns_id> | awk '{print $2}'
   # For each VNFs in the list, get the list of the IPs
   osm vnf-show <vnd_id> --filter vdur --literal | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -t: -u -k1,1
   ```

12. Test second slice connectivity: Ping all the VMs in the slice

   ```bash
   ssh osm@<MGMT_IP>  [pwd: osm4u]
   # For each of the IP addresses obtained in step #11
   ping -c 5 -W 1 <ip_address> > /dev/null && echo OK
   ```

13. Stop the second slice intance

   ```bash
   osm nsi-delete sliceshared
   ```

14. Delete the template and packages

   ```bash
   osm netslice-template-delete slice_basic_nst
   osm netslice-template-delete slice_basic_nst2
   osm nsd-delete slice_basic_nsd
   osm nsd-delete slice_basic_middle_nsd
   osm vnfd-delete slice_basic_vnfd
   osm vnfd-delete slice_basic_middle_vnfd
   ```


### \[SLICING-03\] Advanced Network Slicing

TODO: Under ellaboration. Similar to above, but with day-2 operations

## Kubernetes and cloud-native