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