diff --git a/magma/README.md b/magma/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a32d203681e2d69cf106462724d2e57d6189db24 --- /dev/null +++ b/magma/README.md @@ -0,0 +1,32 @@ +## Preparation + +This example expects a router (PNF) in the network, connected to a shared management network (osm-ext in this example) and to a shared internal "sgi" network where the Slice will be placed. + +1. Upload the descriptors to OSM +2. Add the PDU with the yaml file (emulated by a VyOS VM in this environment) +3. Upload the Slice template with `osm netslice-template-create magma_slice.yaml` +4. 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. + +## Launching the Slice + +1. Edit the params.yaml and set a MetalLB address for your Magma Orc8r-proxy service, which AGW will connect to. Set a name and ID for th first AGW as well. +2. Launch the slice with: +`osm nsi-create --nsi_name magma_slice --nst_name magma_slice_hackfest_nst --config_file params.yaml --vim_account whitecloud` + +## Verifying the services + +1. Visit the Orc8r at the KNF's nginx-proxy svc (https) with credentials admin@magma.test / password1234, then check that your AGW has been registered successfully (after proxy charms are finished) +2. Via this dashboard, add the test subscriber with the following parameters: + - IMSI: 722070000000008 + - KEY: c8eba87c1074edd06885cb0486718341 + - OPC: 17b6c0157895bcaa1efc1cef55033f5f + +3. The emulator is ready to connect, Day-2 primitives for this is WIP, in the meantime, the following commands can be used to connect the eNB and UE, respectively and in that order. + +### Configuring eNodeB example +srsenb --enb.name=dummyENB01 --enb.mcc=901 --enb.mnc=70 --enb.mme_addr=192.168.100.254 --enb.gtp_bind_addr=192.168.100.10 --enb.s1c_bind_addr=192.168.100.10 --enb_files.rr_config=/config/rr.conf --enb_files.sib_config=/config/sib.conf --enb_files.drb_config=/config/drb.conf /config/enb.conf.fauxrf + +### Attaching UE example +sudo srsue --usim.imsi=722070000000008 --usim.k=c8eba87c1074edd06885cb0486718341 --usim.algo=milenage --usim.opc=17b6c0157895bcaa1efc1cef55033f5f --nas.apn=oai.ipv4 /config/ue.conf.fauxrf + + diff --git a/magma/fb_magma_knf/fb_magma_vnfd.yaml b/magma/fb_magma_knf/fb_magma_vnfd.yaml new file mode 100644 index 0000000000000000000000000000000000000000..86b73216b6d5228ea9500b7d58289e9cac2db690 --- /dev/null +++ b/magma/fb_magma_knf/fb_magma_vnfd.yaml @@ -0,0 +1,20 @@ +vnfd-catalog: + schema-version: '3.0' + vnfd: + - id: fb_magma_knf + name: fb_magma_knf + short-name: fb_magma_knf + description: KNF with KDU using a helm-chart for Facebook magma orc8r + vendor: ATOS + version: '1.0' + mgmt-interface: + cp: mgmt + connection-point: + - name: mgmt + k8s-cluster: + nets: + - id: mgmtnet + external-connection-point-ref: mgmt + kdu: + - name: orc8r + helm-chart: magma/orc8r \ No newline at end of file diff --git a/magma/fb_magma_ns/fb_magma_nsd.yaml b/magma/fb_magma_ns/fb_magma_nsd.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b8d3081ba1610a1a5dc3b0d86556034d384ee1ae --- /dev/null +++ b/magma/fb_magma_ns/fb_magma_nsd.yaml @@ -0,0 +1,24 @@ +nsd-catalog: + nsd: + - id: fb_magma_ns + name: fb_magma_ns + short-name: fb_magma_ns + description: NS consisting of a KNF fb_magma_knf connected to mgmt network + vendor: ATOS + version: '1.0' + constituent-vnfd: + - member-vnf-index: orc8r + vnfd-id-ref: fb_magma_knf + connection-point: + - name: nsd_cp_mgmt + vld-id-ref: mgmtnet + vld: + - id: mgmtnet + name: mgmtnet + type: ELAN + mgmt-network: true + vnfd-connection-point-ref: + - member-vnf-index-ref: orc8r + vnfd-id-ref: fb_magma_knf + vnfd-connection-point-ref: mgmt + diff --git a/magma/hackfest_magma-agw-enb_nsd/hackfest_magma-agw-enb_nsd.yaml b/magma/hackfest_magma-agw-enb_nsd/hackfest_magma-agw-enb_nsd.yaml deleted file mode 100644 index 50c3744a73ea3c00a50dacec8b8a43b69b61c823..0000000000000000000000000000000000000000 --- a/magma/hackfest_magma-agw-enb_nsd/hackfest_magma-agw-enb_nsd.yaml +++ /dev/null @@ -1,52 +0,0 @@ -nsd:nsd-catalog: - nsd: - - id: hackfest_magma-agw-enb_nsd - name: hackfest_magma-agw-enb_nsd - short-name: hackfest_magma-agw-enb_nsd - description: Magma AGW 1.0.0 with tools & srsLTE connected to PNF Gateway - vendor: Whitestack - version: '1.0' - constituent-vnfd: - - member-vnf-index: 1 - vnfd-id-ref: hackfest_magma-agw-enb_vnfd - - member-vnf-index: 2 - vnfd-id-ref: hackfest_vyos_pnf - vld: - - id: mgmt - name: mgmt - short-name: mgmt - type: ELAN - mgmt-network: 'true' - vim-network-name: osm-ext - vnfd-connection-point-ref: - - member-vnf-index-ref: 1 - vnfd-id-ref: hackfest_magma-agw-enb_vnfd - vnfd-connection-point-ref: agw-mgmt - - member-vnf-index-ref: 1 - vnfd-id-ref: hackfest_magma-agw-enb_vnfd - vnfd-connection-point-ref: srsLTE-mgmt - - member-vnf-index-ref: 2 - vnfd-connection-point-ref: gateway_public - - id: sgi - name: sgi - short-name: sgi - type: ELAN - vim-network-name: sgi - vnfd-connection-point-ref: - - member-vnf-index-ref: 1 - vnfd-id-ref: hackfest_magma-agw-enb_vnfd - vnfd-connection-point-ref: agw-sgi - - member-vnf-index-ref: 2 - vnfd-id-ref: hackfest_vyos_pnf - vnfd-connection-point-ref: gateway_public - # - id: s1 - # name: s1 - # short-name: s1 - # type: ELAN - # vnfd-connection-point-ref: - # - member-vnf-index-ref: 1 - # vnfd-id-ref: hackfest_magma-agw-enb_vnfd - # vnfd-connection-point-ref: agw-s1 - # - member-vnf-index-ref: 1 - # vnfd-id-ref: hackfest_magma-agw-enb_vnfd - # vnfd-connection-point-ref: srsLTE-s1 diff --git a/magma/hackfest_magma-agw-enb_nsd/magma-agw-enb_nsd.yaml b/magma/hackfest_magma-agw-enb_nsd/magma-agw-enb_nsd.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2fd8a88efa7712226b44f104cf4147d2d51b0223 --- /dev/null +++ b/magma/hackfest_magma-agw-enb_nsd/magma-agw-enb_nsd.yaml @@ -0,0 +1,46 @@ +nsd:nsd-catalog: + nsd: + - id: magma-agw-enb_nsd + name: magma-agw-enb_nsd + short-name: magma-agw-enb_nsd + description: Magma AGW 1.0.0 with tools & srsLTE connected to PNF Gateway + vendor: Whitestack + version: '1.0' + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: magma-agw-enb_vnfd + - member-vnf-index: '2' + vnfd-id-ref: vyos_pnf_charmed + connection-point: + - name: nsd_cp_mgmt + vld-id-ref: mgmt + - name: nsd_cp_sgi + vld-id-ref: sgi + vld: + - id: mgmt + name: mgmt + short-name: mgmt + type: ELAN + mgmt-network: true + vim-network-name: osm-ext + vnfd-connection-point-ref: + - member-vnf-index-ref: '1' + vnfd-id-ref: magma-agw-enb_vnfd + vnfd-connection-point-ref: agw-mgmt + - member-vnf-index-ref: '1' + vnfd-id-ref: magma-agw-enb_vnfd + vnfd-connection-point-ref: srsLTE-mgmt + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: gateway_public + - id: sgi + name: sgi + short-name: sgi + type: ELAN + vim-network-name: sgi + vnfd-connection-point-ref: + - member-vnf-index-ref: '1' + vnfd-id-ref: magma-agw-enb_vnfd + vnfd-connection-point-ref: agw-sgi + - member-vnf-index-ref: '2' + vnfd-id-ref: vyos_pnf_charmed + vnfd-connection-point-ref: gateway_public \ No newline at end of file diff --git a/magma/hackfest_magma-agw-enb_vnfd/hackfest_magma-agw-enb_vnfd.yaml b/magma/hackfest_magma-agw-enb_vnfd/magma-agw-enb_vnfd.yaml similarity index 85% rename from magma/hackfest_magma-agw-enb_vnfd/hackfest_magma-agw-enb_vnfd.yaml rename to magma/hackfest_magma-agw-enb_vnfd/magma-agw-enb_vnfd.yaml index d9cace05165ee59018827fcc5b32aee4c71f212c..3405cddfbc52f257c6ba6ca3e9005676446bfb21 100644 --- a/magma/hackfest_magma-agw-enb_vnfd/hackfest_magma-agw-enb_vnfd.yaml +++ b/magma/hackfest_magma-agw-enb_vnfd/magma-agw-enb_vnfd.yaml @@ -1,8 +1,8 @@ vnfd:vnfd-catalog: vnfd: - - id: hackfest_magma-agw-enb_vnfd - name: hackfest_magma-agw-enb_vnfd - short-name: hackfest_magma-agw-enb_vnfd + - id: magma-agw-enb_vnfd + name: magma-agw-enb_vnfd + short-name: magma-agw-enb_vnfd description: Magma AGW v1.0.0 with tools & srsLTE VDU vendor: Whitestack version: '1.0' @@ -19,8 +19,8 @@ vnfd:vnfd-catalog: storage-gb: 50 guest-epa: cpu-pinning-policy: DEDICATED - mempage-size: LARGE - image: 'magma101e' + mempage-size: LARGE + image: 'magma101_hf9' interface: - name: eth0 type: EXTERNAL @@ -39,12 +39,12 @@ vnfd:vnfd-catalog: position: '2' virtual-interface: type: PARAVIRT - external-connection-point-ref: agw-sgi + external-connection-point-ref: agw-sgi internal-connection-point: - id: agw-s1 name: agw-s1 - short-name: agw-s1 - port-security-enabled: 'false' + short-name: agw-s1 + port-security-enabled: 'false' monitoring-param: - id: agw_cpu_util nfvi-metric: cpu_utilization @@ -61,8 +61,8 @@ vnfd:vnfd-catalog: vm-flavor: vcpu-count: 2 memory-mb: 8192 - storage-gb: 100 - image: 'srsLTEfauxRFc' + storage-gb: 100 + image: 'srsLTEfauxRF_hf9' interface: - name: eth0 type: EXTERNAL @@ -77,7 +77,7 @@ vnfd:vnfd-catalog: internal-connection-point: - id: srsLTE-s1 name: srsLTE-s1 - short-name: srsLTE-s1 + short-name: srsLTE-s1 internal-vld: - id: internalS1 name: internalS1 @@ -96,7 +96,7 @@ vnfd:vnfd-catalog: ip-version: ipv4 subnet-address: 192.168.100.0/24 dhcp-params: - enabled: true + enabled: true connection-point: - name: agw-mgmt - name: agw-sgi @@ -121,9 +121,9 @@ vnfd:vnfd-catalog: name: add-net parameter: - name: orch_ip - value: + value: - name: orch_net - value: + value: - seq: '4' name: add-gw parameter: @@ -132,16 +132,16 @@ vnfd:vnfd-catalog: - name: agw_name value: - name: orch_ip - value: + value: - name: orch_net - value: + value: - seq: '5' name: add-hosts parameter: - name: orch_ip value: - seq: '6' - name: restart-magma + name: restart-magma config-primitive: - name: add-gw parameter: @@ -150,7 +150,7 @@ vnfd:vnfd-catalog: - name: agw_name default-value: - name: orch_ip - default-value: + default-value: - name: orch_net default-value: - name: del-gw @@ -158,7 +158,7 @@ vnfd:vnfd-catalog: - name: agw_id default-value: - name: orch_ip - default-value: + default-value: - name: orch_net default-value: - name: reset-id @@ -189,4 +189,4 @@ vnfd:vnfd-catalog: aggregation-type: AVERAGE vdu-monitoring-param: vdu-ref: magma-agw-vdu - vdu-monitoring-param-ref: agw_packets_sent + vdu-monitoring-param-ref: agw_packets_sent diff --git a/magma/magma_slice.yaml b/magma/magma_slice.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5f137da572f7f2d7f4bc283778452b5fb700a755 --- /dev/null +++ b/magma/magma_slice.yaml @@ -0,0 +1,49 @@ +# Copyright [2020] [Felipe Vicens] +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#NST to test VLD connection between Network Services within the same VIM +nst: +- id: magma_slice_hackfest_nst + name: magma_slice_hackfest_nst + SNSSAI-identifier: + slice-service-type: eMBB + quality-of-service: + id: 1 + + netslice-subnet: + - id: slice_hackfest_nsd_1 + is-shared-nss: false + description: NetSlice Subnet (service) with magma agw + nsd-ref: magma-agw-enb_nsd + - id: slice_hackfest_nsd_2 + is-shared-nss: true + description: NetSlice Subnet (service) with magma orch and nms + nsd-ref: fb_magma_ns + + netslice-vld: + - id: slice_vld_mgmt + name: slice_vld_mgmt + type: ELAN + mgmt-network: true + nss-connection-point-ref: + - nss-ref: slice_hackfest_nsd_1 + nsd-connection-point-ref: nsd_cp_mgmt + - nss-ref: slice_hackfest_nsd_2 + nsd-connection-point-ref: nsd_cp_mgmt + - id: slice_vld_data1 + name: slice_vld_data1 + type: ELAN + nss-connection-point-ref: + - nss-ref: slice_hackfest_nsd_1 + nsd-connection-point-ref: nsd_cp_sgi \ No newline at end of file diff --git a/magma/params.yaml b/magma/params.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5cfed9c340b09ed6bd9f1fa56c92645b73808e80 --- /dev/null +++ b/magma/params.yaml @@ -0,0 +1,21 @@ +netslice-subnet: +- id: slice_hackfest_nsd_1 + additionalParamsForVnf: + - member-vnf-index: '1' + additionalParams: + agw_id: 'agw_26' + agw_name: 'AGW26' + orch_ip: '172.21.250.110' ## change this to the MetalLB IP address of your orc8r_proxy service. + orch_net: 'osmnet' +- id: slice_hackfest_nsd_2 + additionalParamsForVnf: + - member-vnf-index: 'orc8r' + additionalParamsForKdu: + - kdu_name: orc8r + additionalParams: + proxyserviceloadBalancerIP: '172.21.250.110' # MetalLB IP Address +netslice-vld: +- name: slice_vld_mgmt + vim-network-name: "osm-ext" +- name: slice_vld_data1 + vim-network-name: "sgi" \ No newline at end of file diff --git a/magma/pdu.yaml b/magma/pdu.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fa01f2d9adbd32c14b743cc6ef69bd1ad395546c --- /dev/null +++ b/magma/pdu.yaml @@ -0,0 +1,13 @@ +name: router01 +description: router +type: gateway +vim_accounts: [ fb99f5c5-f6b2-4a39-9a30-42012aa3f2c8 ] +shared: false +interfaces: + - name: eth0 + ip-address: 172.21.250.200 + vim-network-name: osm-ext + mgmt: true + - name: eth1 + ip-address: 192.168.239.7 + mgmt: false