ajay | b3f4098 | 2021-12-08 14:26:11 -0800 | [diff] [blame] | 1 | .. |
| 2 | SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 3 | SPDX-License-Identifier: Apache-2.0 |
| 4 | |
ajay | ce0380c | 2021-12-14 21:51:00 -0800 | [diff] [blame] | 5 | .. _aiab-guide: |
ajay | 8794529 | 2021-12-08 00:52:00 -0800 | [diff] [blame] | 6 | |
| 7 | ================ |
ajay | d19711c | 2021-12-07 12:07:04 -0800 | [diff] [blame] | 8 | Aether In a Box |
ajay | 8794529 | 2021-12-08 00:52:00 -0800 | [diff] [blame] | 9 | ================ |
| 10 | |
| 11 | Setting Up Aether-in-a-Box |
| 12 | __________________________ |
| 13 | |
| 14 | Aether-in-a-Box (AiaB) provides an easy way to deploy Aether’s SD-CORE |
| 15 | components and run basic tests to validate the installation. This guide |
| 16 | describes the steps to set up AiaB. |
| 17 | |
| 18 | AiaB can be set up with a 4G or 5G SD-CORE. We use SimApp to configure |
| 19 | the required state in SD-CORE for testing core functionality. |
| 20 | |
| 21 | Helm charts are the primary method of installing the SD-CORE resources. |
| 22 | AiaB offers a great deal of flexibility regarding which Helm chart |
| 23 | versions to install: |
| 24 | |
| 25 | * Local definitions of charts (for testing Helm chart changes) |
| 26 | * Latest published charts (for deploying a development version of Aether) |
| 27 | * Specified versions of charts (for deploying a specific Aether release) |
| 28 | |
| 29 | AiaB can be run on a bare metal machine or VM. System prerequisites: |
| 30 | |
| 31 | * Ubuntu 18.04 |
| 32 | * Kernel 4.15 or later |
| 33 | * Haswell CPU or newer |
| 34 | |
| 35 | Clone Repositories |
| 36 | __________________ |
| 37 | |
| 38 | To initialize the AiaB environment, first clone the following repository using |
| 39 | your Gerrit ID:: |
| 40 | |
| 41 | cd ~ |
| 42 | git clone "ssh://<username>@gerrit.opencord.org:29418/aether-in-a-box" |
| 43 | |
| 44 | mkdir -p ~/cord |
| 45 | cd ~/cord |
| 46 | git clone "ssh://<username>@gerrit.opencord.org:29418/sdcore-helm-charts" |
| 47 | git clone "ssh://<username>@gerrit.opencord.org:29418/aether-helm-charts" |
| 48 | |
| 49 | Set up Authentication Tokens |
| 50 | ____________________________ |
| 51 | |
| 52 | :: |
| 53 | |
| 54 | cd ~/aether-in-a-box |
| 55 | |
| 56 | Edit the file configs/authentication. |
| 57 | |
| 58 | Fill out REGISTRY_USERNAME and REGISTRY_CLI_SECRET as follows: |
| 59 | |
| 60 | * Log into the Aether Harbor Registry using your Crowd credentials |
| 61 | * Select User Profile from the drop-down menu in the upper right corner |
| 62 | * For REGISTRY_USERNAME, use the Username in your profile |
| 63 | * Copy the CLI secret to the clipboard and paste to REGISTRY_CLI_SECRET |
| 64 | |
| 65 | Also fill out REPO_USERNAME and REPO_PASSWORD with the information needed to |
| 66 | authenticate with Aether’s Helm chart repositories. |
| 67 | |
| 68 | If you have already set up AiaB but you used incorrect credentials, first |
| 69 | clean up AiaB as described in the Cleanup section, then edit |
| 70 | configs/authentication and re-build AiaB. |
| 71 | |
| 72 | Start the 4G SD-CORE |
| 73 | ____________________ |
| 74 | |
| 75 | :: |
| 76 | |
| 77 | make test |
| 78 | |
| 79 | Start the 5G SD-CORE |
| 80 | ____________________ |
| 81 | |
| 82 | If you have already installed the 4G SD-CORE, you must skip this step. |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame^] | 83 | Only one version of the SD-CORE can be installed at a time |
| 84 | |
| 85 | To deploy 5G SD-CORE:: |
ajay | 8794529 | 2021-12-08 00:52:00 -0800 | [diff] [blame] | 86 | |
| 87 | make 5gc |
| 88 | |
Vini Gajjar | 816e185 | 2022-01-24 14:32:44 +0530 | [diff] [blame^] | 89 | To deploy and test 5G SD-CORE:: |
| 90 | |
| 91 | make 5g-test |
| 92 | |
| 93 | The above step uses gNBSim to perform Registration + UE-Initiated PDU Session |
| 94 | Establishment + User Data Packets. To test other procedures, modify *gnb.conf* |
| 95 | in *ransim-values.yaml* (refer gNBSim documentation :ref:`gNB-Simulator`) |
ajay | 8794529 | 2021-12-08 00:52:00 -0800 | [diff] [blame] | 96 | |
| 97 | Cleanup |
| 98 | _______ |
| 99 | |
| 100 | The first time you build AiaB, it takes a while because it sets up the |
| 101 | Kubernetes cluster. Subsequent builds will be much faster if you follow |
| 102 | these steps to clean up the Helm charts without destroying the Kubernetes |
| 103 | cluster.:: |
| 104 | |
| 105 | Clean up the 4G SD-CORE: *make reset-test |
| 106 | Clean up the 5G SD-CORE: *make reset-5g-test |
| 107 | |
| 108 | Developer Loop |
| 109 | ______________ |
| 110 | |
| 111 | Suppose you wish to test a new build of a 5G SD-CORE services. You can deploy |
| 112 | custom images by editing ~/aether-in-a-box/5g-core-values.yaml, for example:: |
| 113 | |
| 114 | images: |
| 115 | tags: |
| 116 | webui: registry.aetherproject.org/omecproject/5gc-webui:onf-release3.0.5-roc-935305f |
| 117 | pullPolicy: IfNotPresent |
| 118 | |
| 119 | To upgrade a running 5G SD-CORE with the new image, or to deploy the 5G SD-CORE |
| 120 | with the image:: |
| 121 | |
| 122 | make 5gc |
| 123 | |
| 124 | Troubleshooting / Known Issues |
| 125 | ______________________________ |
| 126 | |
| 127 | If you suspect a problem, first verify that all pods are in Running state:: |
| 128 | |
| 129 | kubectl -n omec get pods |
| 130 | kubectl -n aether-roc get pods |
| 131 | |
| 132 | If the pods are stuck in ImagePullBackOff state, then it’s likely an issue |
| 133 | with credentials. See the Set up Authentication Tokens section. |
| 134 | |
| 135 | 4G Test Fails |
| 136 | _____________ |
| 137 | |
| 138 | Occasionally make test (for 4G) fails for unknown reasons; this is true |
| 139 | regardless of which Helm charts are used. If this happens, first try |
| 140 | cleaning up AiaB and re-running the test. If make test fails consistently, |
| 141 | check whether the configuration has been pushed to the SD-CORE:: |
| 142 | |
| 143 | kubectl -n omec logs config4g-0 | grep "Successfully" |
| 144 | |
| 145 | You should see that a device group and slice has been pushed:: |
| 146 | |
| 147 | [INFO][WebUI][CONFIG] Successfully posted message for device group 4g-oaisim-user to main config thread |
| 148 | [INFO][WebUI][CONFIG] Successfully posted message for slice default to main config thread |
| 149 | |
| 150 | Then tail the config4g-0 log and make sure that the configuration has been |
| 151 | successfully pushed to all SD-CORE components. |