Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 1 | .. vim: syntax=rst |
| 2 | |
Andy Bavier | f3e24b6 | 2022-03-30 19:53:01 -0400 | [diff] [blame] | 3 | Aether-in-a-Box for Developers |
| 4 | ============================== |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 5 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 6 | Aether-in-a-Box (AiaB) provides an easy way to deploy Aether's SD-CORE and ROC |
| 7 | components, and then run basic tests to validate the installation. |
| 8 | This guide describes the steps to set up AiaB. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 9 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 10 | AiaB can be set up with a 4G or 5G SD-CORE. In either case, SD-CORE configuration |
| 11 | can be done with or without the ROC. The ROC |
| 12 | provides an interactive GUI for examining and changing the configuration, and is used to |
| 13 | manage the production Aether; it can be deployed to test the integration between |
| 14 | ROC and SD-CORE. If the ROC is not deployed, a simple tool called SimApp |
| 15 | is used to configure the required state in SD-CORE for testing core functionality. |
| 16 | |
| 17 | Helm charts are the primary method of installing the SD-CORE and ROC resources. |
| 18 | AiaB offers a great deal of flexibility regarding which Helm chart versions to install: |
| 19 | |
| 20 | * Local definitions of charts (for testing Helm chart changes) |
| 21 | * Latest published charts (for deploying a development version of Aether) |
| 22 | * Specified versions of charts (for deploying a specific Aether release) |
| 23 | |
| 24 | AiaB can be run on a bare metal machine or VM. System prerequisites: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 25 | |
Andy Bavier | 296bfa5 | 2022-02-10 17:48:37 -0700 | [diff] [blame] | 26 | * Ubuntu 18.04 clean install |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 27 | * Kernel 4.15 or later |
| 28 | * Haswell CPU or newer |
Andy Bavier | 7254767 | 2022-02-03 14:45:16 -0700 | [diff] [blame] | 29 | * At least 4 CPUs and 12GB RAM |
Andy Bavier | 296bfa5 | 2022-02-10 17:48:37 -0700 | [diff] [blame] | 30 | * Ability to run "sudo" without a password. Due to this requirement, AiaB is most suited to disposable environments like a VM or a `CloudLab <https://cloudlab.us>`_ machine. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 31 | |
| 32 | Clone Repositories |
| 33 | ------------------ |
| 34 | |
Andy Bavier | 296bfa5 | 2022-02-10 17:48:37 -0700 | [diff] [blame] | 35 | To initialize the AiaB environment, first clone the following repository:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 36 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 37 | cd ~ |
Hyunsun Moon | 09d63bb | 2022-03-16 09:45:55 -0700 | [diff] [blame] | 38 | git clone "https://gerrit.opencord.org/aether-in-a-box" |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 39 | |
| 40 | If you are going to install AiaB using published Helm charts, you can proceed to the |
| 41 | next section. |
| 42 | |
Andy Bavier | 9989213 | 2022-03-11 14:49:10 -0700 | [diff] [blame] | 43 | If you wish to install from local Helm charts, clone these additional repositories:: |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 44 | |
| 45 | mkdir -p ~/cord |
| 46 | cd ~/cord |
Hyunsun Moon | 09d63bb | 2022-03-16 09:45:55 -0700 | [diff] [blame] | 47 | git clone "https://gerrit.opencord.org/sdcore-helm-charts" |
| 48 | git clone "https://gerrit.opencord.org/roc-helm-charts" |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 49 | |
| 50 | Now change to *~/aether-in-a-box* directory. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 51 | |
Andy Bavier | 6267840 | 2022-04-18 12:06:52 -0700 | [diff] [blame] | 52 | RKE2 vs. Kubespray Install |
| 53 | -------------------------- |
| 54 | |
| 55 | The AiaB installer will bring up Kubernetes on the server where it is run. By default it |
| 56 | uses `RKE2 <https://docs.rke2.io>`_ as the Kubernetes platform. However, older versions of AiaB |
| 57 | used `Kubespray <https://kubernetes.io/docs/setup/production-environment/tools/kubespray/>`_ |
| 58 | and that is still an option. To switch to Kubespray as the Kubernetes platform, edit the |
| 59 | Makefile and replace *rke2* with *kubespray* on this line:: |
| 60 | |
Andy Bavier | 320bb45 | 2022-05-27 15:22:28 -0700 | [diff] [blame^] | 61 | K8S_INSTALL ?= rke2 |
| 62 | |
| 63 | You may wish to use Kubespray instead of RKE2 if you want to use locally-built images with AiaB |
| 64 | (e.g., if you are developing SD-CORE services). The reason is that RKE2 uses containerd instead of |
| 65 | Docker and so cannot access images in the local Docker registry. More details can be found in |
| 66 | the **Developer Loop** section below. |
Andy Bavier | 6267840 | 2022-04-18 12:06:52 -0700 | [diff] [blame] | 67 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 68 | Installing the ROC |
| 69 | ------------------ |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 70 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 71 | Note that you must install the ROC *before* installing SD-CORE. |
| 72 | If you are not using the ROC to configure SD-CORE, you can skip this step. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 73 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 74 | First choose whether you will install the 4G or 5G SD-CORE. To install the ROC to |
| 75 | configure the 4G SD-CORE:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 76 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 77 | make roc-4g-models |
| 78 | |
| 79 | To install the ROC to configure the 5G SD-CORE:: |
| 80 | |
| 81 | make roc-5g-models |
| 82 | |
| 83 | By default the above commands install the ROC from the local charts in the Git repos cloned |
| 84 | earlier. In order to install the ROC using the latest published charts, add *CHARTS=latest* |
| 85 | to the command, e.g.,:: |
| 86 | |
| 87 | CHARTS=latest make roc-4g-models |
| 88 | |
Andy Bavier | 9989213 | 2022-03-11 14:49:10 -0700 | [diff] [blame] | 89 | To install the Aether 2.0 release, add *CHARTS=release-2.0*:: |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 90 | |
Andy Bavier | 9989213 | 2022-03-11 14:49:10 -0700 | [diff] [blame] | 91 | CHARTS=release-2.0 make roc-4g-models |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 92 | |
Andy Bavier | 4d27e4e | 2022-02-07 14:49:45 -0700 | [diff] [blame] | 93 | The ROC has successfully initialized when you see output like this:: |
| 94 | |
| 95 | echo "ONOS CLI pod: pod/onos-cli-5b947f8f6-4r5nm" |
| 96 | ONOS CLI pod: pod/onos-cli-5b947f8f6-4r5nm |
| 97 | until kubectl -n aether-roc exec pod/onos-cli-5b947f8f6-4r5nm -- \ |
| 98 | curl -s -f -L -X PATCH "http://aether-roc-api:8181/aether-roc-api" \ |
| 99 | --header 'Content-Type: application/json' \ |
Andy Bavier | 9989213 | 2022-03-11 14:49:10 -0700 | [diff] [blame] | 100 | --data-raw "$(cat /root/aether-in-a-box//roc-5g-models.json)"; do sleep 5; done |
Andy Bavier | 4d27e4e | 2022-02-07 14:49:45 -0700 | [diff] [blame] | 101 | command terminated with exit code 22 |
| 102 | command terminated with exit code 22 |
| 103 | command terminated with exit code 22 |
| 104 | "9513ea10-883d-11ec-84bf-721e388172cd" |
| 105 | |
| 106 | Don't worry if you see a few lines of *command terminated with exit code 22*; that command is trying to |
| 107 | load the ROC models, and the message appears if the ROC isn't ready yet. However if you see that message |
| 108 | more than 10 times then something is probably wrong with the ROC or its models. |
| 109 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 110 | Start the 4G SD-CORE |
| 111 | -------------------- |
| 112 | |
| 113 | If you are installing the 5G SD-CORE, you can skip this step. |
| 114 | |
| 115 | To deploy the 4G SD-CORE and run a simple ping test:: |
| 116 | |
| 117 | make test |
| 118 | |
| 119 | By default the above commands install the 4G SD-CORE from the local charts in the Git repos cloned |
| 120 | earlier. In order to install the SD-CORE using the latest published charts, add *CHARTS=latest* |
| 121 | to the command, e.g.,:: |
| 122 | |
| 123 | CHARTS=latest make test |
| 124 | |
Andy Bavier | 9989213 | 2022-03-11 14:49:10 -0700 | [diff] [blame] | 125 | To install the Aether 2.0 release, add *CHARTS=release-2.0*:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 126 | |
Andy Bavier | 9989213 | 2022-03-11 14:49:10 -0700 | [diff] [blame] | 127 | CHARTS=release-2.0 make test |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 128 | |
Fatemeh Rouzbeh | 104c01a | 2022-05-16 14:08:27 -0700 | [diff] [blame] | 129 | Getting Started with 4G AiaB |
| 130 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 131 | 4G SD-CORE deploys the following core components to provide mobile connectivity: |
| 132 | |
| 133 | * SPGW (Serving/PDN Gateway): Combined Serving Gateway and Packet Data Network (PDN) Gateway |
| 134 | * UPF (User Plane Function): The interconnect between the mobile infrastructure and the Data Network (DN). |
| 135 | * PCRF (Policy and Charging Rules Function): Data flow detection, policy enforcement, and flow-based charging. |
| 136 | * MME (Mobility Management Entity): Manages UE access network and mobility, and establishing the bearer path for UE. |
| 137 | * HSS (Home Subscriber Server): The main subscriber database. |
| 138 | |
| 139 | .. figure:: images/4g-call-flow.png |
| 140 | :align: center |
| 141 | :width: 80 % |
| 142 | |
| 143 | *Communication between 4G SD-CORE Components* |
| 144 | |
| 145 | The eNB (evolved Node B) is the Radio Access Network (RAN) of the 4G architecture and allows |
| 146 | the UEs to connect to the Mobile network. |
| 147 | It passes UE's attach request to MME via S1AP interface to be identified and authenticated through HSS. |
| 148 | MME sends the session request to SPGW to create the GTP tunnel and request the default bearer. SPGW sends back the UPF |
| 149 | address to establish the connectivity (GTP tunnel) to the DN through the user plane. |
| 150 | |
| 151 | When the AiaB is up, by configuring the routing table you |
| 152 | can route traffic to arbitrary destinations through the AiaB user plane:: |
| 153 | |
| 154 | ip route add <Destination-Network-Address> dev oip1 |
| 155 | |
| 156 | Or you can explicitly specify the *oip1* interface within the command, such as:: |
| 157 | |
| 158 | curl --interface oip1 google.com |
| 159 | ping -I oip1 google.com |
| 160 | |
| 161 | AiaB deploys a router pod in the "default" namespace with four interfaces: *ran-gw* for the radio network, |
| 162 | *access-gw* for access network, *core-gw* for core network, and *eth0* for the external network. |
| 163 | When a UE starts sending traffics to the data network through the user plane (access network), |
| 164 | the outgoing data packets traverse the following path across the pods:: |
| 165 | |
| 166 | (oip1) enb-0 (enb) ==GTP==> (ran-gw) router (access-gw) ==GTP==> (access) upf-0 (core) |
| 167 | ----> (core-gw) router (NAT,eth0) |
| 168 | |
| 169 | And the incoming packets follow as:: |
| 170 | |
| 171 | (NAT,eth0) router (core-gw) ----> (core) upf-0 (access) ==GTP==> (access-gw) router (ran-gw) |
| 172 | ==GTP==> (enb) enb-0 (oip1) |
| 173 | |
| 174 | **Notes:** In the above notations, network interfaces within each pod are shown in parenthesis. |
| 175 | The IP packets sent/received between the UE and external host via the user plane are GTP-encapsulated |
| 176 | and tunneled between the eNB and UPF. |
| 177 | |
| 178 | Ksniff |
| 179 | ~~~~~~ |
| 180 | Ksniff is a Kubernetes-integrated packet sniffer shipped as a kubectl plugin. |
| 181 | Ksniff uses tcpdump and Wireshark (Wireshark 3.x) to capture traffic on a specific pod within the cluster. |
| 182 | After installing Ksniff using Krew and Wireshark, by running the following command |
| 183 | you can see the communications between the components. Ksniff uses kubectl to upload |
| 184 | the tcpdump binary into the target container (e.g. mme, upf, ...), and redirects the output to Wireshark:: |
| 185 | |
| 186 | kubectl ksniff -n omec mme-0 |
| 187 | |
| 188 | You can see the packets sent/received between the core components from the moment an |
| 189 | UE initiates the attach procedure through eNB until |
| 190 | the dedicated bearer (uplink and downlink) has been established (see figure below). |
| 191 | After the bearer has been established, traffic sent from UE's interface (*oip1*) will go through the eNB and UPF. |
| 192 | |
| 193 | .. figure:: images/wireshark-4g.png |
| 194 | :width: 80 % |
| 195 | :align: center |
| 196 | |
| 197 | *Wireshark output of ksniff on mme pod* |
| 198 | |
| 199 | Using Ksniff on the router pod you can see all the packets exchanged between the UE and external hosts |
| 200 | (e.g. ping an external host from the UE interface):: |
| 201 | |
| 202 | kubectl ksniff -n default router |
| 203 | |
| 204 | .. figure:: images/4g-ue-ping.png |
| 205 | :width: 80 % |
| 206 | :align: center |
| 207 | |
| 208 | *Data Flow from UE to an external host through the User Plane (filtered on UE's IP address)* |
| 209 | |
| 210 | Looking at the packet's details, the first and second packets are from *enb* to *router* |
| 211 | and then to *upf* in a GTP tunnel. And the third packet is sent from *router* to the external network via NAT. |
| 212 | The rest are the reply packets from the external host to the UE. |
| 213 | |
| 214 | By default, Ksniff runs *tcpdump* on all interfaces (i.e. *-i any*). To retrieve more details |
| 215 | of packets (e.g. ethernet header information) on a specific interface, |
| 216 | you can explicitly specify the interface along with options (e.g. *-e*). e.g.:: |
| 217 | |
| 218 | kubectl sniff -n default router -i access-gw -f "-e" |
| 219 | |
| 220 | For more information, please visit the links below: |
| 221 | |
| 222 | * `Ksniff <https://github.com/eldadru/ksniff>`_ |
| 223 | * `3gpp Spec <https://www.etsi.org/deliver/etsi_ts/136100_136199/136101/14.05.00_60/ts_136101v140500p.pdf>`_ |
| 224 | * `4G LTE Concepts and Call Flow <https://www.udemy.com/course/4g-lte-evolved-packet-core-deep-dive-and-call-flows/>`_ |
| 225 | |
| 226 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 227 | Start the 5G SD-CORE |
| 228 | -------------------- |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 229 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 230 | If you have already installed the 4G SD-CORE, you must skip this step. Only one version of |
| 231 | the SD-CORE can be installed at a time. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 232 | |
Andy Bavier | 1d63176 | 2022-01-10 15:47:51 -0800 | [diff] [blame] | 233 | To deploy the 5G SD-CORE and run a test with gNBSim that performs Registration + UE-initiated |
| 234 | PDU Session Establishment + sends User Data packets:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 235 | |
Andy Bavier | 1d63176 | 2022-01-10 15:47:51 -0800 | [diff] [blame] | 236 | make 5g-test |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 237 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 238 | By default the above commands install the 5G SD-CORE from the local charts in the Git repos cloned |
| 239 | earlier. In order to install the SD-CORE using the latest published charts, add *CHARTS=latest* |
| 240 | to the command, e.g.,:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 241 | |
Andy Bavier | 1d63176 | 2022-01-10 15:47:51 -0800 | [diff] [blame] | 242 | CHARTS=latest make 5g-test |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 243 | |
Andy Bavier | 9989213 | 2022-03-11 14:49:10 -0700 | [diff] [blame] | 244 | To install the Aether 2.0 release, add *CHARTS=release-2.0*:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 245 | |
Andy Bavier | 05eca6b | 2022-04-01 15:14:34 -0400 | [diff] [blame] | 246 | CHARTS=release-2.0 make 5g-test |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 247 | |
Andy Bavier | 1d63176 | 2022-01-10 15:47:51 -0800 | [diff] [blame] | 248 | To change the behavior of the test run by gNBSim, change the contents of *gnb.conf* |
Andy Bavier | 4cda140 | 2022-02-15 15:33:31 -0700 | [diff] [blame] | 249 | in *sd-core-5g-values.yaml*. Consult the |
Andy Bavier | 1d63176 | 2022-01-10 15:47:51 -0800 | [diff] [blame] | 250 | `gNBSim documentation <https://docs.sd-core.opennetworking.org/master/developer/gnbsim.html>`_ for more information. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 251 | |
Andy Bavier | 4d27e4e | 2022-02-07 14:49:45 -0700 | [diff] [blame] | 252 | Exploring AiaB |
| 253 | -------------- |
| 254 | |
| 255 | The *kubectl* tool is the best way to get familiar with the pods and other Kubernetes objects installed by AiaB. |
| 256 | The SD-CORE services, UPF, and simulated edge devices run in the *omec* namespace, while the ROC is running |
| 257 | in the *aether-roc* namespace. |
| 258 | |
| 259 | The ROC GUI is available on port 31194 on the host running AiaB. |
| 260 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 261 | Cleanup |
| 262 | ------- |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 263 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 264 | The first time you build AiaB, it takes a while because it sets up the Kubernetes cluster. |
| 265 | Subsequent builds will be much faster if you follow these steps to clean up the Helm charts without |
| 266 | destroying the Kubernetes cluster. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 267 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 268 | * Clean up the 4G SD-CORE: *make reset-test* |
Andy Bavier | 7254767 | 2022-02-03 14:45:16 -0700 | [diff] [blame] | 269 | * Reset the 4G UE / eNB in order to re-run the 4G test: *make reset-ue* |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 270 | * Clean up the 5G SD-CORE: *make reset-5g-test* |
| 271 | * Clean up the ROC: *make roc-clean* |
| 272 | |
| 273 | It's normal for the above commands to take a minute or two to complete. |
| 274 | |
| 275 | As an example, suppose that you want to test the 4G SD-CORE with the ROC, and then the 5G SD-CORE |
| 276 | with the ROC. You could run these commands:: |
| 277 | |
| 278 | CHARTS=latest make roc-4g-models # Install ROC with 4G configuration |
| 279 | CHARTS=latest make test # Install 4G SD-CORE and run ping test |
| 280 | make reset-test |
| 281 | make roc-clean |
| 282 | CHARTS=latest make roc-5g-models # Install ROC with 5G configuration |
Andy Bavier | 1d63176 | 2022-01-10 15:47:51 -0800 | [diff] [blame] | 283 | CHARTS=latest make 5g-test # Install 5G SD-CORE and run gNB Sim test |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 284 | make reset-5g-test |
| 285 | make roc-clean |
| 286 | |
Andy Bavier | 6267840 | 2022-04-18 12:06:52 -0700 | [diff] [blame] | 287 | To completely remove AiaB by tearing down the Kubernetes cluster, run *make clean*. |
| 288 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 289 | Developer Loop |
| 290 | -------------- |
| 291 | |
| 292 | Suppose you wish to test a new build of a 5G SD-CORE services. You can deploy custom images |
Andy Bavier | 4cda140 | 2022-02-15 15:33:31 -0700 | [diff] [blame] | 293 | by editing `~/aether-in-a-box/sd-core-5g-values.yaml`, for example:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 294 | |
Andy Bavier | 4cda140 | 2022-02-15 15:33:31 -0700 | [diff] [blame] | 295 | omec-control-plane: |
| 296 | images: |
| 297 | tags: |
| 298 | webui: registry.aetherproject.org/omecproject/5gc-webui:onf-release3.0.5-roc-935305f |
| 299 | pullPolicy: IfNotPresent |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 300 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 301 | To upgrade a running 5G SD-CORE with the new image, or to deploy the 5G SD-CORE with the image:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 302 | |
Andy Bavier | 4cda140 | 2022-02-15 15:33:31 -0700 | [diff] [blame] | 303 | make reset-5g-test; make 5g-test |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 304 | |
Andy Bavier | 320bb45 | 2022-05-27 15:22:28 -0700 | [diff] [blame^] | 305 | Note that RKE2 (the default Kubernetes installer) is based on containerd rather than Docker. |
| 306 | Containerd has its own local image registry that is separate from the local Docker Registry. With RKE2, |
| 307 | if you have used `docker build` to build a local image, it is only in the Docker registry and so is not |
| 308 | available to run in AiaB without some additional steps. An easy workaround |
| 309 | is to use `docker push` to push the image to a remote repository (e.g., Docker Hub) and then modify your |
| 310 | Helm values file to pull in that remote image. Another option is to save the local Docker image |
| 311 | into a file and push the file to the containerd registry like this:: |
| 312 | |
| 313 | docker save -o /tmp/lte-uesoftmodem.tar omecproject/lte-uesoftmodem:1.1.0 |
| 314 | sudo /var/lib/rancher/rke2/bin/ctr --address /run/k3s/containerd/containerd.sock --namespace k8s.io \ |
| 315 | images import /tmp/lte-uesoftmodem.tar |
| 316 | |
| 317 | The above commands save the local Docker image `omecproject/lte-uesoftmodem:1.1.0` in a tarball, and then upload |
| 318 | the tarball into the containerd registry where it is available for use by RKE2. |
| 319 | |
| 320 | If you know that you are going to be using AiaB to test locally-built images, probably the easiest thing to do is to |
| 321 | use the Kubespray installer. If you have already installed using RKE2 and you want to switch to Kubespray, first |
| 322 | run `make clean` before following the steps in the **RKE2 vs. Kubespray Install** section above. |
| 323 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 324 | Troubleshooting / Known Issues |
| 325 | ------------------------------ |
| 326 | |
| 327 | If you suspect a problem, first verify that all pods are in Running state:: |
| 328 | |
| 329 | kubectl -n omec get pods |
| 330 | kubectl -n aether-roc get pods |
| 331 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 332 | 4G Test Fails |
| 333 | ^^^^^^^^^^^^^ |
| 334 | Occasionally *make test* (for 4G) fails for unknown reasons; this is true regardless of which Helm charts are used. |
Andy Bavier | 7254767 | 2022-02-03 14:45:16 -0700 | [diff] [blame] | 335 | If this happens, first try recreating the simulated UE / eNB and re-running the test as follows:: |
| 336 | |
| 337 | make reset-ue |
| 338 | make test |
| 339 | |
| 340 | If that does not work, try cleaning up AiaB as described above and re-building it. |
| 341 | |
| 342 | If *make test* fails consistently, check whether the configuration has been pushed to the SD-CORE:: |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 343 | |
| 344 | kubectl -n omec logs config4g-0 | grep "Successfully" |
| 345 | |
| 346 | You should see that a device group and slice has been pushed:: |
| 347 | |
| 348 | [INFO][WebUI][CONFIG] Successfully posted message for device group 4g-oaisim-user to main config thread |
| 349 | [INFO][WebUI][CONFIG] Successfully posted message for slice default to main config thread |
| 350 | |
| 351 | Then tail the *config4g-0* log and make sure that the configuration has been successfully pushed to all |
| 352 | SD-CORE components. |
Andy Bavier | 2e20f97 | 2022-04-21 11:09:02 -0700 | [diff] [blame] | 353 | |
| 354 | 5G Test Fails |
| 355 | ^^^^^^^^^^^^^ |
| 356 | |
| 357 | If the 5G test fails (*make 5g-test*) then you will see output like this:: |
| 358 | |
| 359 | 2022-04-21T17:59:12Z [INFO][GNBSIM][Summary] Profile Name: profile2 , Profile Type: pdusessest |
| 360 | 2022-04-21T17:59:12Z [INFO][GNBSIM][Summary] Ue's Passed: 2 , Ue's Failed: 3 |
| 361 | 2022-04-21T17:59:12Z [INFO][GNBSIM][Summary] Profile Errors: |
| 362 | 2022-04-21T17:59:12Z [ERRO][GNBSIM][Summary] imsi:imsi-208930100007492, procedure:REGISTRATION-PROCEDURE, error:triggering event:REGESTRATION-REQUEST-EVENT, expected event:AUTHENTICATION-REQUEST-EVENT, received event:REGESTRATION-REJECT-EVENT |
| 363 | 2022-04-21T17:59:12Z [ERRO][GNBSIM][Summary] imsi:imsi-208930100007493, procedure:REGISTRATION-PROCEDURE, error:triggering event:REGESTRATION-REQUEST-EVENT, expected event:AUTHENTICATION-REQUEST-EVENT, received event:REGESTRATION-REJECT-EVENT |
| 364 | 2022-04-21T17:59:12Z [ERRO][GNBSIM][Summary] imsi:imsi-208930100007494, procedure:REGISTRATION-PROCEDURE, error:triggering event:REGESTRATION-REQUEST-EVENT, expected event:AUTHENTICATION-REQUEST-EVENT, received event:REGESTRATION-REJECT-EVENT |
| 365 | 2022-04-21T17:59:12Z [INFO][GNBSIM][Summary] Simulation Result: FAIL |
| 366 | |
| 367 | In this case check whether the *webui* pod has restarted... this can happen if it times out waiting |
| 368 | for the database to come up:: |
| 369 | |
| 370 | $ kubectl -n omec get pod -l app=webui |
| 371 | NAME READY STATUS RESTARTS AGE |
| 372 | webui-6b9c957565-zjqls 1/1 Running 1 (6m55s ago) 7m56s |
| 373 | |
| 374 | If the output shows any restarts, then restart the *simapp* pod to cause it to re-push its subscriber state:: |
| 375 | |
| 376 | $ kubectl -n omec delete pod -l app=simapp |
| 377 | pod "simapp-6c49b87c96-hpf82" deleted |
| 378 | |
| 379 | Re-run the 5G test, it should now pass. |