blob: 317f8fc4d1a86b291b32ae5bbd410179cb1d9f50 [file] [log] [blame]
Hyunsun Moond12f32b2021-07-30 12:55:00 -07001..
2 SPDX-FileCopyrightText: © 2021 Open Networking Foundation <support@opennetworking.org>
3 SPDX-License-Identifier: Apache-2.0
4
5BESS UPF Deployment
6===================
7
Hyunsun Moonb9c7dde2021-08-01 06:11:08 -07008This section describes how to configure and deploy BESS UPF.
Hyunsun Moond12f32b2021-07-30 12:55:00 -07009
10
Hyunsun Moonb9c7dde2021-08-01 06:11:08 -070011Network Settings
12----------------
Hyunsun Moond12f32b2021-07-30 12:55:00 -070013
14BESS UPF requires three networks, **enb**, **access**, and **core**, and all
15three networks must use different subnets. To help your understanding,
16the following example ACE environment will be used in the rest of the guide.
17
18.. image:: images/bess-upf-example-network.png
19
20+-----------+-----------+------------------------------------+------------+---------------+
21| Network | VLAN | Subnet | Interface | IP address |
22+-----------+-----------+------------------------------------+------------+---------------+
23| enb | 2 | 192.168.2.0/24 (gw: 192.168.2.254) | mgmt vlan2 | 192.168.2.254 |
24| | | +------------+---------------+
25| | | | enb | 192.168.2.10 |
26+-----------+-----------+------------------------------------+------------+---------------+
27| access | 3 | 192.168.3.0/24 (gw: 192.168.3.254) | mgmt vlan3 | 192.168.3.254 |
28| | | +------------+---------------+
29| | | | upf access | 192.168.3.1 |
30+-----------+-----------+------------------------------------+------------+---------------+
31| core | 4 | 192.168.4.0/24 (gw: 192.168.4.254) | mgmt vlan4 | 192.168.4.254 |
32| | | +------------+---------------+
33| | | | upf core | 192.168.4.1 |
34+-----------+-----------+------------------------------------+------------+---------------+
35
36.. note::
37
38 Management plane and out-of-band network are not depicted in the diagram.
39
40
41Note that the management server has the only external routable address and acts as a router for
42all networks in the Aether pod.
43So in order for UE to access the Internet, two things need to be done in the managmenet server.
44
Hyunsun Moonb9c7dde2021-08-01 06:11:08 -070045* For outgoing traffic, masquerade the internal adddress with the external address of the management server.
46* For response traffic to UE, forward them to UPF's **core** interface.
Hyunsun Moond12f32b2021-07-30 12:55:00 -070047
48
49Check Cluster Resources
50-----------------------
51
52Before proceeding with the deployment, make sure the cluster has enough resources to run BESS UPF.
53
54* 2 dedicated cores (``"cpu"``)
55* 2 1Gi HugePages (``"hugepages-1Gi"``)
56* 2 SRIOV Virtual Functions bound to **vfio-pci** driver (``"intel.com/intel_sriov_vfio"``)
57
58In fact, these requirements are not mandatory to run BESS UPF, but are recommended for best performance.
59You can use the following command to check allocatable resources in the cluster nodes.
60
61.. code-block:: shell
62
63 $ kubectl get nodes -o json | jq '.items[].status.available'
64 {
65 "cpu": "95",
66 "ephemeral-storage": "1770223432846",
67 "hugepages-1Gi": "32Gi",
68 "intel.com/intel_sriov_netdevice": "32",
69 "intel.com/intel_sriov_vfio": "32",
70 "memory": "360749956Ki",
71 "pods": "110"
72 }
73
74
Hyunsun Moonb9c7dde2021-08-01 06:11:08 -070075Configure and Deploy
76--------------------
Hyunsun Moond12f32b2021-07-30 12:55:00 -070077
78Download ``aether-app-configs`` if you don't have it already in your development machine.
79
80.. code-block:: shell
81
82 $ cd $WORKDIR
83 $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-app-configs"
84
Hyunsun Moonb9c7dde2021-08-01 06:11:08 -070085Move the directory to ``apps/bess-upf/upf1`` and create a Helm values file for the new cluster as shown below.
Hyunsun Moond12f32b2021-07-30 12:55:00 -070086Don't forget to replace the IP addresses in the example configuration with the addresses of the actual cluster.
87
Hyunsun Moon2b2bf9a2021-08-01 05:29:48 -070088.. code-block:: yaml
Hyunsun Moond12f32b2021-07-30 12:55:00 -070089
90 $ cd $WORKDIR/aether-app-configs/apps/bess-upf/upf1
91 $ mkdir overlays/prd-ace-test
92 $ vi overlays/prd-ace-test/values.yaml
93 # SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
94
95 config:
96 upf:
97 enb:
98 subnet: "192.168.2.0/24"
99 access:
100 ip: "192.168.3.1/24"
101 gateway: "192.168.3.254"
102 core:
103 ip: "192.168.4.1/24"
104 gateway: "192.168.4.254"
105 # Below is required only when connecting to 5G core
106 cfgFiles:
107 upf.json:
108 cpiface:
109 dnn: "8internet"
110 hostname: "upf"
111
112
Hyunsun Moonb9c7dde2021-08-01 06:11:08 -0700113Update ``fleet.yaml`` in the same directory to let Fleet use the custom configuration when deploying
114BESS UPF to the new cluster.
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700115
Hyunsun Moon2b2bf9a2021-08-01 05:29:48 -0700116.. code-block:: yaml
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700117
118 $ vi fleet.yaml
119 # add following block at the end
120 - name: prd-ace-test
121 clusterSelector:
122 matchLabels:
123 management.cattle.io/cluster-display-name: ace-test
124 helm:
125 valuesFiles:
126 - overlays/prd-ace-test/values.yaml
127
128
Hyunsun Moon2b2bf9a2021-08-01 05:29:48 -0700129Submit your changes.
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700130
131.. code-block:: shell
132
133 $ cd $WORKDIR/aether-app-configs
134 $ git status
135 $ git add .
136 $ git commit -m "Add BESS UPF configs for test ACE"
137 $ git review
138
139
140Go to Fleet dashboard and wait until the cluster status becomes **Active**.
Hyunsun Moonb9c7dde2021-08-01 06:11:08 -0700141It can take up to 1 min for Fleet to fetch the configuration updates.