Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 1 | .. vim: syntax=rst |
| 2 | |
| 3 | Setting Up Aether-in-a-Box |
| 4 | ========================== |
| 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 | |
| 26 | * Ubuntu 18.04 |
| 27 | * Kernel 4.15 or later |
| 28 | * Haswell CPU or newer |
| 29 | |
| 30 | Clone Repositories |
| 31 | ------------------ |
| 32 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 33 | To initialize the AiaB environment, first clone the following repository |
| 34 | using your Gerrit ID:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 35 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 36 | cd ~ |
| 37 | git clone "ssh://<username>@gerrit.opencord.org:29418/aether-in-a-box" |
| 38 | |
| 39 | If you are going to install AiaB using published Helm charts, you can proceed to the |
| 40 | next section. |
| 41 | |
| 42 | If you wish to install SD-CORE from local Helm charts, clone these additional repositories:: |
| 43 | |
| 44 | mkdir -p ~/cord |
| 45 | cd ~/cord |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 46 | git clone "ssh://<username>@gerrit.opencord.org:29418/helm-charts" |
| 47 | git clone "ssh://<username>@gerrit.opencord.org:29418/aether-helm-charts" |
| 48 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 49 | If you wish to install the ROC from local Helm charts, clone these:: |
| 50 | |
| 51 | mkdir -p ~/cord |
| 52 | cd ~/cord |
| 53 | git clone https://github.com/atomix/atomix-helm-charts.git |
| 54 | git clone https://github.com/onosproject/onos-helm-charts.git |
Andy Bavier | e86261e | 2021-09-21 11:05:18 -0700 | [diff] [blame^] | 55 | git clone "ssh://<username>@gerrit.opencord.org:29418/roc-helm-charts" |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 56 | |
| 57 | Now change to *~/aether-in-a-box* directory. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 58 | |
| 59 | Set up Authentication Tokens |
| 60 | ---------------------------- |
| 61 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 62 | Edit the file *configs/authentication*. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 63 | |
| 64 | Fill out REGISTRY_USERNAME and REGISTRY_CLI_SECRET as follows: |
| 65 | |
| 66 | * Log into the `Aether Harbor Registry <https://registry.aetherproject.org>`_ using your Crowd credentials |
| 67 | * Select *User Profile* from the drop-down menu in the upper right corner |
| 68 | * For REGISTRY_USERNAME, use the *Username* in your profile |
| 69 | * Copy the *CLI secret* to the clipboard and paste to REGISTRY_CLI_SECRET |
| 70 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 71 | If you wish to install SD-CORE using Aether's published Helm charts, or if you are installing the ROC, also |
| 72 | fill out REPO_USERNAME and REPO_PASSWORD with the information needed to authenticate with Aether's Helm |
| 73 | chart repository. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 74 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 75 | If you have already set up AiaB but you used incorrect credentials, first clean up AiaB as described |
| 76 | in the `Cleanup`_ section, then edit *configs/authentication* and re-build AiaB. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 77 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 78 | Installing the ROC |
| 79 | ------------------ |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 80 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 81 | Note that you must install the ROC *before* installing SD-CORE. |
| 82 | 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] | 83 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 84 | First choose whether you will install the 4G or 5G SD-CORE. To install the ROC to |
| 85 | configure the 4G SD-CORE:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 86 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 87 | make roc-4g-models |
| 88 | |
| 89 | To install the ROC to configure the 5G SD-CORE:: |
| 90 | |
| 91 | make roc-5g-models |
| 92 | |
| 93 | By default the above commands install the ROC from the local charts in the Git repos cloned |
| 94 | earlier. In order to install the ROC using the latest published charts, add *CHARTS=latest* |
| 95 | to the command, e.g.,:: |
| 96 | |
| 97 | CHARTS=latest make roc-4g-models |
| 98 | |
Andy Bavier | e86261e | 2021-09-21 11:05:18 -0700 | [diff] [blame^] | 99 | To install the Aether 1.5 release, add *CHARTS=release-1.5*:: |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 100 | |
Andy Bavier | e86261e | 2021-09-21 11:05:18 -0700 | [diff] [blame^] | 101 | CHARTS=release-1.5 make roc-4g-models |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 102 | |
| 103 | Start the 4G SD-CORE |
| 104 | -------------------- |
| 105 | |
| 106 | If you are installing the 5G SD-CORE, you can skip this step. |
| 107 | |
| 108 | To deploy the 4G SD-CORE and run a simple ping test:: |
| 109 | |
| 110 | make test |
| 111 | |
| 112 | By default the above commands install the 4G SD-CORE from the local charts in the Git repos cloned |
| 113 | earlier. In order to install the SD-CORE using the latest published charts, add *CHARTS=latest* |
| 114 | to the command, e.g.,:: |
| 115 | |
| 116 | CHARTS=latest make test |
| 117 | |
Andy Bavier | e86261e | 2021-09-21 11:05:18 -0700 | [diff] [blame^] | 118 | To install the Aether 1.5 release, add *CHARTS=release-1.5*:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 119 | |
Andy Bavier | e86261e | 2021-09-21 11:05:18 -0700 | [diff] [blame^] | 120 | CHARTS=release-1.5 make test |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 121 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 122 | Start the 5G SD-CORE |
| 123 | -------------------- |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 124 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 125 | If you have already installed the 4G SD-CORE, you must skip this step. Only one version of |
| 126 | the SD-CORE can be installed at a time. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 127 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 128 | To deploy the 5G SD-CORE:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 129 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 130 | make 5gc |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 131 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 132 | By default the above commands install the 5G SD-CORE from the local charts in the Git repos cloned |
| 133 | earlier. In order to install the SD-CORE using the latest published charts, add *CHARTS=latest* |
| 134 | to the command, e.g.,:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 135 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 136 | CHARTS=latest make 5gc |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 137 | |
Andy Bavier | e86261e | 2021-09-21 11:05:18 -0700 | [diff] [blame^] | 138 | To install the Aether 1.5 release, add *CHARTS=release-1.5*:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 139 | |
Andy Bavier | e86261e | 2021-09-21 11:05:18 -0700 | [diff] [blame^] | 140 | CHARTS=release-1.5 make 5gc |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 141 | |
| 142 | You can use *gnbsim* to test 5G functionality. For example, to run the 5G user registration:: |
| 143 | |
| 144 | kubectl -n omec exec gnbsim-0 -- /go/src/gnbsim/gnbsim register |
| 145 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 146 | Currently there is no ping test for the 5G SD-CORE. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 147 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 148 | Cleanup |
| 149 | ------- |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 150 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 151 | The first time you build AiaB, it takes a while because it sets up the Kubernetes cluster. |
| 152 | Subsequent builds will be much faster if you follow these steps to clean up the Helm charts without |
| 153 | destroying the Kubernetes cluster. |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 154 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 155 | * Clean up the 4G SD-CORE: *make reset-test* |
| 156 | * Clean up the 5G SD-CORE: *make reset-5g-test* |
| 157 | * Clean up the ROC: *make roc-clean* |
| 158 | |
| 159 | It's normal for the above commands to take a minute or two to complete. |
| 160 | |
| 161 | As an example, suppose that you want to test the 4G SD-CORE with the ROC, and then the 5G SD-CORE |
| 162 | with the ROC. You could run these commands:: |
| 163 | |
| 164 | CHARTS=latest make roc-4g-models # Install ROC with 4G configuration |
| 165 | CHARTS=latest make test # Install 4G SD-CORE and run ping test |
| 166 | make reset-test |
| 167 | make roc-clean |
| 168 | CHARTS=latest make roc-5g-models # Install ROC with 5G configuration |
| 169 | CHARTS=latest make 5gc # Install 5G SD-CORE |
| 170 | make reset-5g-test |
| 171 | make roc-clean |
| 172 | |
| 173 | Developer Loop |
| 174 | -------------- |
| 175 | |
| 176 | Suppose you wish to test a new build of a 5G SD-CORE services. You can deploy custom images |
| 177 | by editing `~/aether-in-a-box/5g-core-values.yaml`, for example:: |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 178 | |
| 179 | images: |
| 180 | tags: |
| 181 | webui: registry.aetherproject.org/omecproject/5gc-webui:onf-release3.0.5-roc-935305f |
| 182 | pullPolicy: IfNotPresent |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 183 | |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 184 | 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] | 185 | |
Andy Bavier | f73c3d2 | 2021-08-30 10:29:06 -0700 | [diff] [blame] | 186 | make 5gc |
Andy Bavier | 840e0b4 | 2021-09-16 17:10:23 -0700 | [diff] [blame] | 187 | |
| 188 | Troubleshooting / Known Issues |
| 189 | ------------------------------ |
| 190 | |
| 191 | If you suspect a problem, first verify that all pods are in Running state:: |
| 192 | |
| 193 | kubectl -n omec get pods |
| 194 | kubectl -n aether-roc get pods |
| 195 | |
| 196 | If the pods are stuck in ImagePullBackOff state, then it's likely an issue with credentials. See the |
| 197 | `Set up Authentication Tokens`_ section. |
| 198 | |
| 199 | 4G Test Fails |
| 200 | ^^^^^^^^^^^^^ |
| 201 | Occasionally *make test* (for 4G) fails for unknown reasons; this is true regardless of which Helm charts are used. |
| 202 | If this happens, first try cleaning up AiaB and re-running the test. If *make test* fails consistently, check |
| 203 | whether the configuration has been pushed to the SD-CORE:: |
| 204 | |
| 205 | kubectl -n omec logs config4g-0 | grep "Successfully" |
| 206 | |
| 207 | You should see that a device group and slice has been pushed:: |
| 208 | |
| 209 | [INFO][WebUI][CONFIG] Successfully posted message for device group 4g-oaisim-user to main config thread |
| 210 | [INFO][WebUI][CONFIG] Successfully posted message for slice default to main config thread |
| 211 | |
| 212 | Then tail the *config4g-0* log and make sure that the configuration has been successfully pushed to all |
| 213 | SD-CORE components. |
| 214 | |
| 215 | 5G Test Fails |
| 216 | ^^^^^^^^^^^^^ |
| 217 | Currently the 5G *gnbsim* does not support data packets, though the UE can successfully register. |
| 218 | For example the *gnbsim register* command gets stuck here:: |
| 219 | |
| 220 | ip address in string 172.250.0.1 |
| 221 | err <nil> |
| 222 | UE address - 172.250.0.1 |
| 223 | Assigned address to UE address 172.250.0.1 |
| 224 | sent message NGAP-PDU Session Resource Setup Response |
| 225 | Failed to write gtpu packet |
| 226 | Sent uplink gtpu packet |
| 227 | Failed to write gtpu packet |
| 228 | Sent uplink gtpu packet |
| 229 | Failed to write gtpu packet |
| 230 | Sent uplink gtpu packet |
| 231 | |
| 232 | Fixing this is work-in-progress. |