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. |
| 83 | Only one version of the SD-CORE can be installed at a time.:: |
| 84 | |
| 85 | make 5gc |
| 86 | |
| 87 | You can use gnbsim to test 5G functionality. Detailed steps in link (see :ref:`gNB-Simulator`) |
| 88 | |
| 89 | Cleanup |
| 90 | _______ |
| 91 | |
| 92 | The first time you build AiaB, it takes a while because it sets up the |
| 93 | Kubernetes cluster. Subsequent builds will be much faster if you follow |
| 94 | these steps to clean up the Helm charts without destroying the Kubernetes |
| 95 | cluster.:: |
| 96 | |
| 97 | Clean up the 4G SD-CORE: *make reset-test |
| 98 | Clean up the 5G SD-CORE: *make reset-5g-test |
| 99 | |
| 100 | Developer Loop |
| 101 | ______________ |
| 102 | |
| 103 | Suppose you wish to test a new build of a 5G SD-CORE services. You can deploy |
| 104 | custom images by editing ~/aether-in-a-box/5g-core-values.yaml, for example:: |
| 105 | |
| 106 | images: |
| 107 | tags: |
| 108 | webui: registry.aetherproject.org/omecproject/5gc-webui:onf-release3.0.5-roc-935305f |
| 109 | pullPolicy: IfNotPresent |
| 110 | |
| 111 | To upgrade a running 5G SD-CORE with the new image, or to deploy the 5G SD-CORE |
| 112 | with the image:: |
| 113 | |
| 114 | make 5gc |
| 115 | |
| 116 | Troubleshooting / Known Issues |
| 117 | ______________________________ |
| 118 | |
| 119 | If you suspect a problem, first verify that all pods are in Running state:: |
| 120 | |
| 121 | kubectl -n omec get pods |
| 122 | kubectl -n aether-roc get pods |
| 123 | |
| 124 | If the pods are stuck in ImagePullBackOff state, then it’s likely an issue |
| 125 | with credentials. See the Set up Authentication Tokens section. |
| 126 | |
| 127 | 4G Test Fails |
| 128 | _____________ |
| 129 | |
| 130 | Occasionally make test (for 4G) fails for unknown reasons; this is true |
| 131 | regardless of which Helm charts are used. If this happens, first try |
| 132 | cleaning up AiaB and re-running the test. If make test fails consistently, |
| 133 | check whether the configuration has been pushed to the SD-CORE:: |
| 134 | |
| 135 | kubectl -n omec logs config4g-0 | grep "Successfully" |
| 136 | |
| 137 | You should see that a device group and slice has been pushed:: |
| 138 | |
| 139 | [INFO][WebUI][CONFIG] Successfully posted message for device group 4g-oaisim-user to main config thread |
| 140 | [INFO][WebUI][CONFIG] Successfully posted message for slice default to main config thread |
| 141 | |
| 142 | Then tail the config4g-0 log and make sure that the configuration has been |
| 143 | successfully pushed to all SD-CORE components. |