blob: 29c88aea7c8839f0a56194303acacaec29ee461e [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
Hyunsun Moon015eb212021-08-24 18:06:24 -070010Network Configuration
11---------------------
Hyunsun Moond12f32b2021-07-30 12:55:00 -070012
Hyunsun Moon015eb212021-08-24 18:06:24 -070013BESS UPF enabled edge setup requires three additional user plane subnets
14apart from the default K8S subnets.
Hyunsun Moond12f32b2021-07-30 12:55:00 -070015
Zack Williamsb7d45152022-03-11 09:37:34 -070016* **enb**: Used to provide eNB/gNB radios with connectivity to SD-Core and
17 UPF.
Hyunsun Moon015eb212021-08-24 18:06:24 -070018
Zack Williamsb7d45152022-03-11 09:37:34 -070019* **access**: Used to provide UPF with connectivity to eNBs.
20
21* **core**: Used to provide UPF with edge services, local breakout, and
22 internet access. This naming comes from the P4 UPF, and is used for uniformity
23
24To help your understanding, the following example ACE environment will be used
25in the rest of the guide.
Hyunsun Moond12f32b2021-07-30 12:55:00 -070026
Zack Williams1ae109e2021-07-27 11:17:04 -070027.. image:: images/bess-upf-example-network.svg
Hyunsun Moond12f32b2021-07-30 12:55:00 -070028
Hyunsun Moond12f32b2021-07-30 12:55:00 -070029.. note::
30
Hyunsun Moon015eb212021-08-24 18:06:24 -070031 Admin and out-of-band networks are not depicted in the diagram.
Hyunsun Moond12f32b2021-07-30 12:55:00 -070032
Hyunsun Moon015eb212021-08-24 18:06:24 -070033+-----------+-----------+------------------------------------+-------------------+---------------+
34| Network | VLAN ID | Subnet | Interface | IP address |
35+-----------+-----------+------------------------------------+-------------------+---------------+
Zack Williamsb7d45152022-03-11 09:37:34 -070036| k8smgmt | 1 | 192.168.1.0/24 (gw: 192.168.1.1) | management router | 192.168.1.254 |
Hyunsun Moon015eb212021-08-24 18:06:24 -070037| | | +-------------------+---------------+
38| | | | compute1 | 192.168.1.3 |
39| | | +-------------------+---------------+
40| | | | compute2 | 192.168.1.4 |
41| | | +-------------------+---------------+
42| | | | compute3 | 192.168.1.5 |
43+-----------+-----------+------------------------------------+-------------------+---------------+
44| enb | 2 | 192.168.2.0/24 (gw: 192.168.2.1) | enb1 | 192.168.2.10 |
45+-----------+-----------+------------------------------------+-------------------+---------------+
46| access | 3 | 192.168.3.0/24 (gw: 192.168.3.1) | upf1 access | 192.168.3.10 |
47+-----------+-----------+------------------------------------+-------------------+---------------+
Zack Williamsb7d45152022-03-11 09:37:34 -070048| core | 4 | 192.168.4.0/24 (gw: 192.168.4.1) | management router | 192.168.4.254 |
Hyunsun Moon015eb212021-08-24 18:06:24 -070049| | | +-------------------+---------------+
50| | | | upf1 core | 192.168.4.10 |
51+-----------+-----------+------------------------------------+-------------------+---------------+
Hyunsun Moond12f32b2021-07-30 12:55:00 -070052
Zack Williamsb7d45152022-03-11 09:37:34 -070053It is assumed that the management router has the only external routable address
54and acts as a router connecting the Aether pod to the outside.
55
56This means that all uplink packets leaving the Aether pod need to be
57masqueraded with the external address of the management router or the k8smgmt
58address if the destination is Aether Central.
59
Hyunsun Moon015eb212021-08-24 18:06:24 -070060Also, in order for downlink traffic to UE to be delivered to its destination,
Zack Williamsb7d45152022-03-11 09:37:34 -070061it must be forwarded to the UPF's core interface. This adds additional routes
62to the management router and L3 switch.
63
Hyunsun Moond12f32b2021-07-30 12:55:00 -070064
Charles Chan84869672022-03-04 15:54:42 -080065.. note::
66
Zack Williamsb7d45152022-03-11 09:37:34 -070067 There is a work-in-progress on interface consolidation in BESS UPF, which
68 will merge ``radio``, ``access``, and ``fabric`` into only one interface and
Charles Chan84869672022-03-04 15:54:42 -080069 simplify the configuration significantly.
Hyunsun Moond12f32b2021-07-30 12:55:00 -070070
Zack Williamsb7d45152022-03-11 09:37:34 -070071Required Cluster Resources
72--------------------------
Hyunsun Moond12f32b2021-07-30 12:55:00 -070073
Zack Williamsb7d45152022-03-11 09:37:34 -070074Before proceeding with the deployment, make sure the cluster has sufficient
75resources to run BESS UPF by running the command below.
Hyunsun Moond12f32b2021-07-30 12:55:00 -070076
77.. code-block:: shell
78
Hyunsun Moon53a18a72021-08-10 16:57:32 -070079 $ kubectl get nodes -o json | jq '.items[].status.allocatable'
Hyunsun Moond12f32b2021-07-30 12:55:00 -070080 {
81 "cpu": "95",
82 "ephemeral-storage": "1770223432846",
83 "hugepages-1Gi": "32Gi",
84 "intel.com/intel_sriov_netdevice": "32",
85 "intel.com/intel_sriov_vfio": "32",
86 "memory": "360749956Ki",
87 "pods": "110"
88 }
89
Hyunsun Moon015eb212021-08-24 18:06:24 -070090For best performance, BESS UPF requires the following resources:
91
92* 2 dedicated cores (``"cpu"``)
93* 2 1GiB HugePages (``"hugepages-1Gi"``)
94* 2 SRIOV Virtual Functions bound to **vfio-pci** driver (``"intel.com/intel_sriov_vfio"``)
95
96For environments where these resources are not available, contact Ops team for
97advanced configuration.
Hyunsun Moond12f32b2021-07-30 12:55:00 -070098
Hyunsun Moonb9c7dde2021-08-01 06:11:08 -070099Configure and Deploy
100--------------------
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700101
Zack Williamsb7d45152022-03-11 09:37:34 -0700102Download ``aether-app-configs`` if you don't have it already in your
103development machine.
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700104
105.. code-block:: shell
106
107 $ cd $WORKDIR
108 $ git clone "ssh://[username]@gerrit.opencord.org:29418/aether-app-configs"
109
Zack Williamsb7d45152022-03-11 09:37:34 -0700110Move the directory to ``apps/bess-upf/upf1`` and create a Helm values file for
111the new cluster as shown below. Don't forget to replace the IP addresses in
112the example configuration with the addresses of the actual cluster.
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700113
Hyunsun Moon2b2bf9a2021-08-01 05:29:48 -0700114.. code-block:: yaml
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700115
116 $ cd $WORKDIR/aether-app-configs/apps/bess-upf/upf1
117 $ mkdir overlays/prd-ace-test
118 $ vi overlays/prd-ace-test/values.yaml
Hyunsun Moon015eb212021-08-24 18:06:24 -0700119 # SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700120
121 config:
122 upf:
123 enb:
124 subnet: "192.168.2.0/24"
125 access:
Hyunsun Moon015eb212021-08-24 18:06:24 -0700126 ip: "192.168.3.10/24"
127 gateway: "192.168.3.1"
Hyunsun Moon6001f942021-08-01 10:35:04 -0700128 vlan: 3
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700129 core:
Hyunsun Moon015eb212021-08-24 18:06:24 -0700130 ip: "192.168.4.10/24"
131 gateway: "192.168.4.1"
Hyunsun Moon6001f942021-08-01 10:35:04 -0700132 vlan: 4
Hyunsun Moonba65df22021-08-10 20:01:06 -0700133 # Add below when connecting to 5G core
134 #cfgFiles:
135 # upf.json:
Charles Chan84869672022-03-04 15:54:42 -0800136 # gtppsc: true
Hyunsun Moonba65df22021-08-10 20:01:06 -0700137 # cpiface:
Charles Chan84869672022-03-04 15:54:42 -0800138 # dnn: "internet" # should match the one configured in ROC
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700139
140
Zack Williamsb7d45152022-03-11 09:37:34 -0700141Update ``fleet.yaml`` in the same directory to let Fleet use the custom
142configuration when deploying BESS UPF to the new cluster.
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700143
Hyunsun Moon2b2bf9a2021-08-01 05:29:48 -0700144.. code-block:: yaml
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700145
146 $ vi fleet.yaml
147 # add following block at the end
148 - name: prd-ace-test
149 clusterSelector:
150 matchLabels:
151 management.cattle.io/cluster-display-name: ace-test
152 helm:
153 valuesFiles:
154 - overlays/prd-ace-test/values.yaml
155
156
Hyunsun Moon2b2bf9a2021-08-01 05:29:48 -0700157Submit your changes.
Hyunsun Moond12f32b2021-07-30 12:55:00 -0700158
159.. code-block:: shell
160
161 $ cd $WORKDIR/aether-app-configs
162 $ git status
163 $ git add .
164 $ git commit -m "Add BESS UPF configs for test ACE"
165 $ git review
166
167
168Go to Fleet dashboard and wait until the cluster status becomes **Active**.
Hyunsun Moonb9c7dde2021-08-01 06:11:08 -0700169It can take up to 1 min for Fleet to fetch the configuration updates.