blob: e3d9b277eebe01a6e4a3eed638e6d097c4ee4906 [file] [log] [blame]
Andy Bavierf73c3d22021-08-30 10:29:06 -07001.. vim: syntax=rst
2
3Setting Up Aether-in-a-Box
4==========================
5
Andy Bavier840e0b42021-09-16 17:10:23 -07006Aether-in-a-Box (AiaB) provides an easy way to deploy Aether's SD-CORE and ROC
7components, and then run basic tests to validate the installation.
8This guide describes the steps to set up AiaB.
Andy Bavierf73c3d22021-08-30 10:29:06 -07009
Andy Bavier840e0b42021-09-16 17:10:23 -070010AiaB can be set up with a 4G or 5G SD-CORE. In either case, SD-CORE configuration
11can be done with or without the ROC. The ROC
12provides an interactive GUI for examining and changing the configuration, and is used to
13manage the production Aether; it can be deployed to test the integration between
14ROC and SD-CORE. If the ROC is not deployed, a simple tool called SimApp
15is used to configure the required state in SD-CORE for testing core functionality.
16
17Helm charts are the primary method of installing the SD-CORE and ROC resources.
18AiaB 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
24AiaB can be run on a bare metal machine or VM. System prerequisites:
Andy Bavierf73c3d22021-08-30 10:29:06 -070025
26* Ubuntu 18.04
27* Kernel 4.15 or later
28* Haswell CPU or newer
29
30Clone Repositories
31------------------
32
Andy Bavier840e0b42021-09-16 17:10:23 -070033To initialize the AiaB environment, first clone the following repository
34using your Gerrit ID::
Andy Bavierf73c3d22021-08-30 10:29:06 -070035
Andy Bavier840e0b42021-09-16 17:10:23 -070036 cd ~
37 git clone "ssh://<username>@gerrit.opencord.org:29418/aether-in-a-box"
38
39If you are going to install AiaB using published Helm charts, you can proceed to the
40next section.
41
42If you wish to install SD-CORE from local Helm charts, clone these additional repositories::
43
44 mkdir -p ~/cord
45 cd ~/cord
Andy Bavier7ff674f2021-11-05 12:47:17 -070046 git clone "ssh://<username>@gerrit.opencord.org:29418/sdcore-helm-charts"
Andy Bavierf73c3d22021-08-30 10:29:06 -070047 git clone "ssh://<username>@gerrit.opencord.org:29418/aether-helm-charts"
48
Andy Bavier112a33c2021-11-11 11:13:49 -070049If you wish to install the ROC from local Helm charts, clone this::
Andy Bavier840e0b42021-09-16 17:10:23 -070050
51 mkdir -p ~/cord
52 cd ~/cord
Andy Baviere86261e2021-09-21 11:05:18 -070053 git clone "ssh://<username>@gerrit.opencord.org:29418/roc-helm-charts"
Andy Bavier840e0b42021-09-16 17:10:23 -070054
55Now change to *~/aether-in-a-box* directory.
Andy Bavierf73c3d22021-08-30 10:29:06 -070056
57Set up Authentication Tokens
58----------------------------
59
Andy Bavier840e0b42021-09-16 17:10:23 -070060Edit the file *configs/authentication*.
Andy Bavierf73c3d22021-08-30 10:29:06 -070061
62Fill out REGISTRY_USERNAME and REGISTRY_CLI_SECRET as follows:
63
64* Log into the `Aether Harbor Registry <https://registry.aetherproject.org>`_ using your Crowd credentials
65* Select *User Profile* from the drop-down menu in the upper right corner
66* For REGISTRY_USERNAME, use the *Username* in your profile
67* Copy the *CLI secret* to the clipboard and paste to REGISTRY_CLI_SECRET
68
Andy Bavier7ff674f2021-11-05 12:47:17 -070069Also fill out REPO_USERNAME and REPO_PASSWORD with the information needed to authenticate
70with Aether's Helm chart repositories.
Andy Bavierf73c3d22021-08-30 10:29:06 -070071
Andy Bavier840e0b42021-09-16 17:10:23 -070072If you have already set up AiaB but you used incorrect credentials, first clean up AiaB as described
73in the `Cleanup`_ section, then edit *configs/authentication* and re-build AiaB.
Andy Bavierf73c3d22021-08-30 10:29:06 -070074
Andy Bavier840e0b42021-09-16 17:10:23 -070075Installing the ROC
76------------------
Andy Bavierf73c3d22021-08-30 10:29:06 -070077
Andy Bavier840e0b42021-09-16 17:10:23 -070078Note that you must install the ROC *before* installing SD-CORE.
79If you are not using the ROC to configure SD-CORE, you can skip this step.
Andy Bavierf73c3d22021-08-30 10:29:06 -070080
Andy Bavier840e0b42021-09-16 17:10:23 -070081First choose whether you will install the 4G or 5G SD-CORE. To install the ROC to
82configure the 4G SD-CORE::
Andy Bavierf73c3d22021-08-30 10:29:06 -070083
Andy Bavier840e0b42021-09-16 17:10:23 -070084 make roc-4g-models
85
86To install the ROC to configure the 5G SD-CORE::
87
88 make roc-5g-models
89
90By default the above commands install the ROC from the local charts in the Git repos cloned
91earlier. In order to install the ROC using the latest published charts, add *CHARTS=latest*
92to the command, e.g.,::
93
94 CHARTS=latest make roc-4g-models
95
Andy Bavier1d631762022-01-10 15:47:51 -080096To install the Aether 1.6 release, add *CHARTS=release-1.6*::
Andy Bavier840e0b42021-09-16 17:10:23 -070097
Andy Bavier1d631762022-01-10 15:47:51 -080098 CHARTS=release-1.6 make roc-4g-models
Andy Bavier840e0b42021-09-16 17:10:23 -070099
100Start the 4G SD-CORE
101--------------------
102
103If you are installing the 5G SD-CORE, you can skip this step.
104
105To deploy the 4G SD-CORE and run a simple ping test::
106
107 make test
108
109By default the above commands install the 4G SD-CORE from the local charts in the Git repos cloned
110earlier. In order to install the SD-CORE using the latest published charts, add *CHARTS=latest*
111to the command, e.g.,::
112
113 CHARTS=latest make test
114
Andy Bavier1d631762022-01-10 15:47:51 -0800115To install the Aether 1.6 release, add *CHARTS=release-1.6*::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700116
Andy Bavier1d631762022-01-10 15:47:51 -0800117 CHARTS=release-1.6 make test
Andy Bavierf73c3d22021-08-30 10:29:06 -0700118
Andy Bavier840e0b42021-09-16 17:10:23 -0700119Start the 5G SD-CORE
120--------------------
Andy Bavierf73c3d22021-08-30 10:29:06 -0700121
Andy Bavier840e0b42021-09-16 17:10:23 -0700122If you have already installed the 4G SD-CORE, you must skip this step. Only one version of
123the SD-CORE can be installed at a time.
Andy Bavierf73c3d22021-08-30 10:29:06 -0700124
Andy Bavier1d631762022-01-10 15:47:51 -0800125To deploy the 5G SD-CORE and run a test with gNBSim that performs Registration + UE-initiated
126PDU Session Establishment + sends User Data packets::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700127
Andy Bavier1d631762022-01-10 15:47:51 -0800128 make 5g-test
Andy Bavierf73c3d22021-08-30 10:29:06 -0700129
Andy Bavier840e0b42021-09-16 17:10:23 -0700130By default the above commands install the 5G SD-CORE from the local charts in the Git repos cloned
131earlier. In order to install the SD-CORE using the latest published charts, add *CHARTS=latest*
132to the command, e.g.,::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700133
Andy Bavier1d631762022-01-10 15:47:51 -0800134 CHARTS=latest make 5g-test
Andy Bavierf73c3d22021-08-30 10:29:06 -0700135
Andy Bavier1d631762022-01-10 15:47:51 -0800136To install the Aether 1.6 release, add *CHARTS=release-1.6*::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700137
Andy Bavier1d631762022-01-10 15:47:51 -0800138 CHARTS=release-1.6 make 5g-test
Andy Bavierf73c3d22021-08-30 10:29:06 -0700139
Andy Bavier1d631762022-01-10 15:47:51 -0800140To change the behavior of the test run by gNBSim, change the contents of *gnb.conf*
141in *ransim-values.yaml*. Consult the
142`gNBSim documentation <https://docs.sd-core.opennetworking.org/master/developer/gnbsim.html>`_ for more information.
Andy Bavierf73c3d22021-08-30 10:29:06 -0700143
Andy Bavier840e0b42021-09-16 17:10:23 -0700144Cleanup
145-------
Andy Bavierf73c3d22021-08-30 10:29:06 -0700146
Andy Bavier840e0b42021-09-16 17:10:23 -0700147The first time you build AiaB, it takes a while because it sets up the Kubernetes cluster.
148Subsequent builds will be much faster if you follow these steps to clean up the Helm charts without
149destroying the Kubernetes cluster.
Andy Bavierf73c3d22021-08-30 10:29:06 -0700150
Andy Bavier840e0b42021-09-16 17:10:23 -0700151* Clean up the 4G SD-CORE: *make reset-test*
152* Clean up the 5G SD-CORE: *make reset-5g-test*
153* Clean up the ROC: *make roc-clean*
154
155It's normal for the above commands to take a minute or two to complete.
156
157As an example, suppose that you want to test the 4G SD-CORE with the ROC, and then the 5G SD-CORE
158with the ROC. You could run these commands::
159
160 CHARTS=latest make roc-4g-models # Install ROC with 4G configuration
161 CHARTS=latest make test # Install 4G SD-CORE and run ping test
162 make reset-test
163 make roc-clean
164 CHARTS=latest make roc-5g-models # Install ROC with 5G configuration
Andy Bavier1d631762022-01-10 15:47:51 -0800165 CHARTS=latest make 5g-test # Install 5G SD-CORE and run gNB Sim test
Andy Bavier840e0b42021-09-16 17:10:23 -0700166 make reset-5g-test
167 make roc-clean
168
169Developer Loop
170--------------
171
172Suppose you wish to test a new build of a 5G SD-CORE services. You can deploy custom images
173by editing `~/aether-in-a-box/5g-core-values.yaml`, for example::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700174
175 images:
176 tags:
177 webui: registry.aetherproject.org/omecproject/5gc-webui:onf-release3.0.5-roc-935305f
178 pullPolicy: IfNotPresent
Andy Bavierf73c3d22021-08-30 10:29:06 -0700179
Andy Bavier840e0b42021-09-16 17:10:23 -0700180To upgrade a running 5G SD-CORE with the new image, or to deploy the 5G SD-CORE with the image::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700181
Andy Bavier1d631762022-01-10 15:47:51 -0800182 make 5g-test
Andy Bavier840e0b42021-09-16 17:10:23 -0700183
184Troubleshooting / Known Issues
185------------------------------
186
187If you suspect a problem, first verify that all pods are in Running state::
188
189 kubectl -n omec get pods
190 kubectl -n aether-roc get pods
191
192If the pods are stuck in ImagePullBackOff state, then it's likely an issue with credentials. See the
193`Set up Authentication Tokens`_ section.
194
1954G Test Fails
196^^^^^^^^^^^^^
197Occasionally *make test* (for 4G) fails for unknown reasons; this is true regardless of which Helm charts are used.
198If this happens, first try cleaning up AiaB and re-running the test. If *make test* fails consistently, check
199whether the configuration has been pushed to the SD-CORE::
200
201 kubectl -n omec logs config4g-0 | grep "Successfully"
202
203You should see that a device group and slice has been pushed::
204
205 [INFO][WebUI][CONFIG] Successfully posted message for device group 4g-oaisim-user to main config thread
206 [INFO][WebUI][CONFIG] Successfully posted message for slice default to main config thread
207
208Then tail the *config4g-0* log and make sure that the configuration has been successfully pushed to all
209SD-CORE components.