Commit 7974cee1 authored by lavado's avatar lavado
Browse files

minor updates and addition of helper scripts

parent bd769322
......@@ -15,12 +15,18 @@ Request your own user to run advanced tests.
## Preparation
### Infrastructure preparation
This example requires a PNF, emulated with a VyOS router (image [here](http://osm-download.etsi.org/ftp/osm-6.0-six/7th-hackfest/images/vyos-1.1.7-cloudinit.qcow2.tgz)), connected to a shared management network (osm-ext in this example) and to a shared internal "sgi" network where the Slice will be placed.
There is a "build_infra.sh" with some examples of what needs to be prepared.
1. If you just cloned the repo, make sure you run `git submodule update --init` under the osm-packages folder.
1. Make sure you add a VIM that has a default management network, for example: `osm vim-create ... --config='{management_network_name: <vim mgmt-net name>}'`
1. Add the PDU with the yaml file (emulated by a VyOS VM in this environment). You can do it with `osm pdu-create --descriptor_file pdu.yaml` (editing at least the VIM ID first)
1. Add your K8s Cluster to the VIM.
### Packages preparation
1. If you just cloned the repo, make sure you run `git submodule update --init` under the osm-packages folder.
1. Upload the packages to OSM, the "build_slice.sh" file contain some useful commands, from building to launching.
1. Make sure you got the images for AGW and srsLTE emulator available at ETSI VIM or at the hackfest@172.21.248.19 home directory.
......@@ -51,9 +57,7 @@ This example requires a PNF, emulated with a VyOS router (image [here](http://os
## Testing traffic
After UE is attached (at emulator machine), the "tun_srsue" will appear, and a default route should be added (pending to put as Day-2 primitive), pointing to the GTP tunnel endpoint:
`sudo route add -net 0.0.0.0/0 gw 192.168.128.1`
After UE is attached (at emulator machine), the "tun_srsue" will appear, and a default route should be added automatically to it (script at the image), pointing to the GTP tunnel endpoint:
Finally, a Day-2 primitive must be executed against the PNF (VyOS) to allow traffic from the specific Magma SGI IP address, for example, if it's 192.168.239.10:
......@@ -70,20 +74,25 @@ A Web Proxy is available via a KNF with primitives, implemented with Squid throu
Deploy this NS:
`osm ns-create --ns_name webcache --nsd_name squid-cnf-ns --vim_account <vim_account> --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ]}'`
The UE's browser can be now configured to navigate with this proxy service.
TODO: add how to test this service and run primitives to allow URLs.
The UE's browser can be now configured to navigate using this proxy service. Configure it at the browser's preferences, using the K8sCluster exposed IP for this service, and port 3128 (for HTTP, HTTPs and FTP requests)
Primitives are available to add/remove allowed URLs:
`osm ns-action webcache --vnf_name squid-vnf --kdu_name squid-kdu --action_name addurl --params '{application-name: squid, url: wikipedia.org}'`
`osm ns-action webcache --vnf_name squid-vnf --kdu_name squid-kdu --action_name deleteurl --params '{application-name: squid, url: wikipedia.org}'`
### Network Slicing
- Additional slice instances can be launched (changing agw_id and agw_name), and we should see that just the AGW+emulator NS is launched (Orc8r NS is shared)
Additional slice instances can be launched (changing agw_id and agw_name), and we should see that just the AGW+emulator NS is launched, as the Orc8r NS is shared.
### Placement
A second slice, reusing the same Orc8r, can be launched at different VIM. The procedure is as follows:
A second slice, reusing the same Orc8r, can be launched at different VIM, so that we see AGWs being launched at remotely VIMs. It would need management networks to be reachable between VIMs so the Orc8r's exposed address is reachable from the remote AGWs. The procedure is as follows:
1. [ If PLA not available in setup] Build the PLA image by cloning the repo and running `docker build . -f docker/Dockerfile -t osm_pla:dev`, then plug it into the OSM network. In docker swarm it would be with `docker run -d --name osm_pla --network netosm osm_pla:dev`
1. Prepare the second VIM by ensuring it has the PNF/PDU and the required images.
1. Edit the `pil_price_list.yaml` and `vnf_price_list.yaml` as desired, ensuring that it's "less expensive" to launch the VNFs at the second VIM.
1. Edit the `pil_price_list.yaml` and `vnf_price_list.yaml` as desired, ensuring that it's "less expensive" to launch the VNFs at the second VIM. Examples are available at this repo.
1. Copy the files to the placement folder at PLA:
`docker cp vnf_price_list.yaml $(docker ps -qf name=osm_pla):/placement/.`
`docker cp pil_price_list.yaml $(docker ps -qf name=osm_pla):/placement/.`
......@@ -95,7 +104,7 @@ VIM-level metrics are being collected by default, they can be observed at the Gr
### Auto-scaling
Magma AGW VDU is configured for autoscaling when CPU exceeds a threshold. After scaling, services are not automatically balanced (WIP)
Magma AGW VDU is configured for autoscaling when CPU exceeds a threshold. After scaling, services are not automatically balanced (possible add-on for future hackfests)
## Pending additions
......
# Add Helm repo for Magma Orc8r
osm repo-add --type helm-chart --description "Repository for Facebook Magma helm Chart" magma https://felipevicens.github.io/fb-magma-helm-chart/
# Add first VIM
osm vim-create --name etsi-openstack --user hackfest --password hackfest20$ --auth_url http://172.21.247.1:5000/v3 --tenant hackfest --account_type openstack --config='{management_network_name: osm-ext, dataplane_physical_net: physnet2, microversion: 2.32}'
# Add first PDU
VIMID=`osm vim-list | grep "etsi-openstack " | awk '{ print $4 }'`
sed -i "s/vim_accounts: .*/vim_accounts: [ $VIMID ]/" pdu.yaml
osm pdu-create --descriptor_file pdu.yaml
# Add second VIM
osm vim-create --name etsi-openstack-lowcost --user osm_mdl --password osmmdl20$ --auth_url http://172.21.7.5:5000/v3 --tenant osm_mdl --account_type openstack --config='{management_network_name: management}'
# Add second PDU
VIMID=`osm vim-list | grep "etsi-openstack-lowcost" | awk '{ print $4 }'`
sed -i "s/vim_accounts: .*/vim_accounts: [ $VIMID ]/" pdu.yaml
osm pdu-create --descriptor_file pdu.yaml
# Add K8sCluster to first VIM
osm k8scluster-add --creds ~/kube.yaml --version '1.15' --vim etsi-openstack --description "My K8s cluster" --k8s-nets '{"net1": "osm-ext"}' etsi-k8scluster
# Add SDN Controller
#osm sdnc-create --name onos01 --type onos_vpls --url http://172.21.248.19:8181 --user karaf --password karaf
#osm vim-update whitecloud_highcost_sriov --sdn_controller onos02 --sdn_port_mapping sdn_port_mapping.yaml
\ No newline at end of file
......@@ -20,7 +20,7 @@ osm upload-package hackfest_magma-agw-enb_nsd/hackfest_magma-agw-enb_nsd.tar.gz
osm netslice-template-create magma_slice.yaml
osm nsi-create --nsi_name magma_slice --nst_name magma_slice_hackfest_nst \
--config_file params.yaml --ssh_keys ~/.ssh/id_rsa.pub --vim_account whitecloud_highcost
--config_file params.yaml --ssh_keys ~/.ssh/id_rsa.pub --vim_account etsi-openstack
sleep 4
osm ns-list | grep "\<slice_hackfest_nsd_epc\>" | awk '{print $4}' | xargs -l1 juju switch
......
......@@ -7,4 +7,4 @@ osm vnfd-delete squid-vnf
osm vnfd-create hackfest_squid_cnf.tar.gz
osm nsd-create hackfest_squid_cnf_ns.tar.gz
osm ns-create --ns_name webhost --nsd_name squid-cnf-ns --vim_account whitecloud_highcost --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ] }'
\ No newline at end of file
osm ns-create --ns_name webcache --nsd_name squid-cnf-ns --vim_account etsi-openstack --config '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ] }'
\ No newline at end of file
......@@ -11,7 +11,6 @@ netslice-subnet:
orch_net: 'osmnet'
- id: slice_hackfest_nsd_epcmgmt
#wimAccountId: False
additionalParamsForVnf:
- member-vnf-index: 'orc8r'
additionalParamsForKdu:
......
name: router01
description: router
type: gateway
vim_accounts: [ 6e51e2e2-ac78-4620-b378-100b8ddbfb55, 94c1218a-e9c7-42d8-b0ae-6de0d0a635ae ]
vim_accounts: [ 42ee7fda-2996-4de0-877f-61abc792ad92 ]
shared: false
interfaces:
- name: eth0
......
name: router02
description: router
type: gateway
vim_accounts: [ f675113a-e274-4801-a1c6-0c25e52d3748 ]
shared: false
interfaces:
- name: eth0
ip-address: 172.21.7.150
vim-network-name: osm-ext
mgmt: true
- name: eth1
ip-address: 192.168.239.7
mgmt: false
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment