Newer
Older
# KNF Onboarding Walkthrough (Work in Progress)
## Introduction
This section uses Facebook's Magma, an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution.
![](assets/magma_overview.png)
This example focuses on the Magma Orchestrator component. It has been documented in a concise way while content keeps being added as K8s support is enhanced in OSM. It is meant to be used for educational purposes and not for a real-life implementation of an EPC.
In addition to the procedure, here you can find some resources related to it:
* [Resulting packages](http://osm-download.etsi.org/ftp/Packages/vnf-onboarding-tf/)
* Images (upcoming)
* Video presentation (upcoming)
## KNF Requirements
A Helm Chart or Juju Bundle contains already all the characteristics of a Kubernetes Network Function in OSM. It just needs OSM to be connected to a Kubernetes Cluster to run on top.
The Helm Chart in which this KNF is based, has been contributed by Felipe Vicens [here](https://felipevicens.github.io/fb-magma-helm-chart/)
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
## Building the KNF Descriptor
With the Helm Chart ready, the following KNFD can be built. Put the following contents in a YAML file using the following structure:
```
fb_magma_knf
|
--- fb_magma_knfd.yaml
```
The descriptor contents would be:
```
vnfd-catalog:
schema-version: '3.0'
vnfd:
- connection-point:
- name: mgmt
description: KNF with KDU using a helm-chart for Facebook magma orc8r
id: fb_magma_knf
k8s-cluster:
nets:
- external-connection-point-ref: mgmt
id: mgmtnet
kdu:
- helm-chart: magma/orc8r
name: orc8r
mgmt-interface:
cp: mgmt
name: fb_magma_knf
short-name: fb_magma_knf
version: '1.0'
```
The main modelling is under the "kdu" list. The rest of elements are either descriptive or not connected to a specific feature at this point.
Package your VNF:
```
tar -cvzf fb_magma_knf.tar.gz fb_magma_knf/
```
## Launching the KNF Package
To launch the KNF package, you need to first include it into a NS Package, let's create one through a YAML file under the following structure.
```
fb_magma_ns
|
--- fb_magma_nsd.yaml
```
The descriptor contents would be:
```
nsd-catalog:
nsd:
- constituent-vnfd:
- member-vnf-index: orc8r
vnfd-id-ref: fb_magma_knf
description: NS consisting of a KNF fb_magma_knf connected to mgmt network
id: fb_magma_ns
name: fb_magma_ns
short-name: fb_magma_ns
version: '1.0'
vld:
- id: mgmtnet
mgmt-network: true
name: mgmtnet
type: ELAN
vim-network-name: mgmt
vnfd-connection-point-ref:
- member-vnf-index-ref: orc8r
vnfd-connection-point-ref: mgmt
vnfd-id-ref: fb_magma_knf
```
The main modelling is under the "constituent-vnfd" list. The rest of elements are either descriptive or not connected to a specific feature at this point.
Package your NS:
```
tar -cvzf fb_magma_ns.tar.gz fb_magma_ns/
```
With both descriptors ready, the package can be tested over any given K8s Cluster registed to OSM. For details on how to register a K8s Cluster, visit the [user guide](https://osm.etsi.org/docs/user-guide/05-osm-usage.html#using-kubernetes-based-vnfs-knfs)
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
```
osm ns-create --ns_name magma_orc8r --nsd_name fb_magma_ns --vim_account <vim_name>
```
## Testing the KNF Package
Monitor with osm ns-list until instantiation is finished, then, execute the following command to check the status of your KDU
```
osm vnf-show <vnf-id> --kdu orc8r
```
Under the services list, you will find all the deployed components and status. Look for your "load balancer" IP addresses for the `nginx-proxy` component (172.21.250.4 in the example below), as it will be used to access this KNF's dashboard.
```
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
bootstrapper-orc8r-proxy LoadBalancer 10.233.44.125 172.21.250.5 443:30586/TCP 58s
...
nginx-proxy LoadBalancer 10.233.4.76 172.21.250.4 443:31742/TCP 58s
orc8r-clientcert-legacy LoadBalancer 10.233.50.131 172.21.250.6 443:30688/TCP 58s
orc8r-configmanager ClusterIP 10.233.19.191 <none> 9100/TCP,9101/TCP 58s
orc8r-controller ClusterIP 10.233.22.92 <none> 8080/
...
```
Visit the dashboard with HTTPS and access it with user `admin@magma.test` (password: password1234)