blob: 096ffb80a5efc11e625484cbc3c9dbb70778732e [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
Andy Bavier296bfa52022-02-10 17:48:37 -070026* Ubuntu 18.04 clean install
Andy Bavierf73c3d22021-08-30 10:29:06 -070027* Kernel 4.15 or later
28* Haswell CPU or newer
Andy Bavier72547672022-02-03 14:45:16 -070029* At least 4 CPUs and 12GB RAM
Andy Bavier296bfa52022-02-10 17:48:37 -070030* Ability to run "sudo" without a password. Due to this requirement, AiaB is most suited to disposable environments like a VM or a `CloudLab <https://cloudlab.us>`_ machine.
Andy Bavierf73c3d22021-08-30 10:29:06 -070031
32Clone Repositories
33------------------
34
Andy Bavier296bfa52022-02-10 17:48:37 -070035To initialize the AiaB environment, first clone the following repository::
Andy Bavierf73c3d22021-08-30 10:29:06 -070036
Andy Bavier840e0b42021-09-16 17:10:23 -070037 cd ~
Hyunsun Moon09d63bb2022-03-16 09:45:55 -070038 git clone "https://gerrit.opencord.org/aether-in-a-box"
Andy Bavier840e0b42021-09-16 17:10:23 -070039
40If you are going to install AiaB using published Helm charts, you can proceed to the
41next section.
42
Andy Bavier99892132022-03-11 14:49:10 -070043If you wish to install from local Helm charts, clone these additional repositories::
Andy Bavier840e0b42021-09-16 17:10:23 -070044
45 mkdir -p ~/cord
46 cd ~/cord
Hyunsun Moon09d63bb2022-03-16 09:45:55 -070047 git clone "https://gerrit.opencord.org/sdcore-helm-charts"
48 git clone "https://gerrit.opencord.org/roc-helm-charts"
Andy Bavier840e0b42021-09-16 17:10:23 -070049
50Now change to *~/aether-in-a-box* directory.
Andy Bavierf73c3d22021-08-30 10:29:06 -070051
Andy Bavier840e0b42021-09-16 17:10:23 -070052Installing the ROC
53------------------
Andy Bavierf73c3d22021-08-30 10:29:06 -070054
Andy Bavier840e0b42021-09-16 17:10:23 -070055Note that you must install the ROC *before* installing SD-CORE.
56If you are not using the ROC to configure SD-CORE, you can skip this step.
Andy Bavierf73c3d22021-08-30 10:29:06 -070057
Andy Bavier840e0b42021-09-16 17:10:23 -070058First choose whether you will install the 4G or 5G SD-CORE. To install the ROC to
59configure the 4G SD-CORE::
Andy Bavierf73c3d22021-08-30 10:29:06 -070060
Andy Bavier840e0b42021-09-16 17:10:23 -070061 make roc-4g-models
62
63To install the ROC to configure the 5G SD-CORE::
64
65 make roc-5g-models
66
67By default the above commands install the ROC from the local charts in the Git repos cloned
68earlier. In order to install the ROC using the latest published charts, add *CHARTS=latest*
69to the command, e.g.,::
70
71 CHARTS=latest make roc-4g-models
72
Andy Bavier99892132022-03-11 14:49:10 -070073To install the Aether 2.0 release, add *CHARTS=release-2.0*::
Andy Bavier840e0b42021-09-16 17:10:23 -070074
Andy Bavier99892132022-03-11 14:49:10 -070075 CHARTS=release-2.0 make roc-4g-models
Andy Bavier840e0b42021-09-16 17:10:23 -070076
Andy Bavier4d27e4e2022-02-07 14:49:45 -070077The ROC has successfully initialized when you see output like this::
78
79 echo "ONOS CLI pod: pod/onos-cli-5b947f8f6-4r5nm"
80 ONOS CLI pod: pod/onos-cli-5b947f8f6-4r5nm
81 until kubectl -n aether-roc exec pod/onos-cli-5b947f8f6-4r5nm -- \
82 curl -s -f -L -X PATCH "http://aether-roc-api:8181/aether-roc-api" \
83 --header 'Content-Type: application/json' \
Andy Bavier99892132022-03-11 14:49:10 -070084 --data-raw "$(cat /root/aether-in-a-box//roc-5g-models.json)"; do sleep 5; done
Andy Bavier4d27e4e2022-02-07 14:49:45 -070085 command terminated with exit code 22
86 command terminated with exit code 22
87 command terminated with exit code 22
88 "9513ea10-883d-11ec-84bf-721e388172cd"
89
90Don't worry if you see a few lines of *command terminated with exit code 22*; that command is trying to
91load the ROC models, and the message appears if the ROC isn't ready yet. However if you see that message
92more than 10 times then something is probably wrong with the ROC or its models.
93
Andy Bavier840e0b42021-09-16 17:10:23 -070094Start the 4G SD-CORE
95--------------------
96
97If you are installing the 5G SD-CORE, you can skip this step.
98
99To deploy the 4G SD-CORE and run a simple ping test::
100
101 make test
102
103By default the above commands install the 4G SD-CORE from the local charts in the Git repos cloned
104earlier. In order to install the SD-CORE using the latest published charts, add *CHARTS=latest*
105to the command, e.g.,::
106
107 CHARTS=latest make test
108
Andy Bavier99892132022-03-11 14:49:10 -0700109To install the Aether 2.0 release, add *CHARTS=release-2.0*::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700110
Andy Bavier99892132022-03-11 14:49:10 -0700111 CHARTS=release-2.0 make test
Andy Bavierf73c3d22021-08-30 10:29:06 -0700112
Andy Bavier840e0b42021-09-16 17:10:23 -0700113Start the 5G SD-CORE
114--------------------
Andy Bavierf73c3d22021-08-30 10:29:06 -0700115
Andy Bavier840e0b42021-09-16 17:10:23 -0700116If you have already installed the 4G SD-CORE, you must skip this step. Only one version of
117the SD-CORE can be installed at a time.
Andy Bavierf73c3d22021-08-30 10:29:06 -0700118
Andy Bavier1d631762022-01-10 15:47:51 -0800119To deploy the 5G SD-CORE and run a test with gNBSim that performs Registration + UE-initiated
120PDU Session Establishment + sends User Data packets::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700121
Andy Bavier1d631762022-01-10 15:47:51 -0800122 make 5g-test
Andy Bavierf73c3d22021-08-30 10:29:06 -0700123
Andy Bavier840e0b42021-09-16 17:10:23 -0700124By default the above commands install the 5G SD-CORE from the local charts in the Git repos cloned
125earlier. In order to install the SD-CORE using the latest published charts, add *CHARTS=latest*
126to the command, e.g.,::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700127
Andy Bavier1d631762022-01-10 15:47:51 -0800128 CHARTS=latest make 5g-test
Andy Bavierf73c3d22021-08-30 10:29:06 -0700129
Andy Bavier99892132022-03-11 14:49:10 -0700130To install the Aether 2.0 release, add *CHARTS=release-2.0*::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700131
Andy Bavier99892132022-03-11 14:49:10 -0700132 CHARTS=release-2.0 make 5gc
Andy Bavier4cda1402022-02-15 15:33:31 -0700133
134NOTE: The *5g-test* target is not supported in Aether-1.6, but you can use the *5gc* target
135to build the 5G core.
Andy Bavierf73c3d22021-08-30 10:29:06 -0700136
Andy Bavier1d631762022-01-10 15:47:51 -0800137To change the behavior of the test run by gNBSim, change the contents of *gnb.conf*
Andy Bavier4cda1402022-02-15 15:33:31 -0700138in *sd-core-5g-values.yaml*. Consult the
Andy Bavier1d631762022-01-10 15:47:51 -0800139`gNBSim documentation <https://docs.sd-core.opennetworking.org/master/developer/gnbsim.html>`_ for more information.
Andy Bavierf73c3d22021-08-30 10:29:06 -0700140
Andy Bavier4d27e4e2022-02-07 14:49:45 -0700141Exploring AiaB
142--------------
143
144The *kubectl* tool is the best way to get familiar with the pods and other Kubernetes objects installed by AiaB.
145The SD-CORE services, UPF, and simulated edge devices run in the *omec* namespace, while the ROC is running
146in the *aether-roc* namespace.
147
148The ROC GUI is available on port 31194 on the host running AiaB.
149
Andy Bavier840e0b42021-09-16 17:10:23 -0700150Cleanup
151-------
Andy Bavierf73c3d22021-08-30 10:29:06 -0700152
Andy Bavier840e0b42021-09-16 17:10:23 -0700153The first time you build AiaB, it takes a while because it sets up the Kubernetes cluster.
154Subsequent builds will be much faster if you follow these steps to clean up the Helm charts without
155destroying the Kubernetes cluster.
Andy Bavierf73c3d22021-08-30 10:29:06 -0700156
Andy Bavier840e0b42021-09-16 17:10:23 -0700157* Clean up the 4G SD-CORE: *make reset-test*
Andy Bavier72547672022-02-03 14:45:16 -0700158* Reset the 4G UE / eNB in order to re-run the 4G test: *make reset-ue*
Andy Bavier840e0b42021-09-16 17:10:23 -0700159* Clean up the 5G SD-CORE: *make reset-5g-test*
160* Clean up the ROC: *make roc-clean*
161
162It's normal for the above commands to take a minute or two to complete.
163
164As an example, suppose that you want to test the 4G SD-CORE with the ROC, and then the 5G SD-CORE
165with the ROC. You could run these commands::
166
167 CHARTS=latest make roc-4g-models # Install ROC with 4G configuration
168 CHARTS=latest make test # Install 4G SD-CORE and run ping test
169 make reset-test
170 make roc-clean
171 CHARTS=latest make roc-5g-models # Install ROC with 5G configuration
Andy Bavier1d631762022-01-10 15:47:51 -0800172 CHARTS=latest make 5g-test # Install 5G SD-CORE and run gNB Sim test
Andy Bavier840e0b42021-09-16 17:10:23 -0700173 make reset-5g-test
174 make roc-clean
175
176Developer Loop
177--------------
178
179Suppose you wish to test a new build of a 5G SD-CORE services. You can deploy custom images
Andy Bavier4cda1402022-02-15 15:33:31 -0700180by editing `~/aether-in-a-box/sd-core-5g-values.yaml`, for example::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700181
Andy Bavier4cda1402022-02-15 15:33:31 -0700182 omec-control-plane:
183 images:
184 tags:
185 webui: registry.aetherproject.org/omecproject/5gc-webui:onf-release3.0.5-roc-935305f
186 pullPolicy: IfNotPresent
Andy Bavierf73c3d22021-08-30 10:29:06 -0700187
Andy Bavier840e0b42021-09-16 17:10:23 -0700188To 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 -0700189
Andy Bavier4cda1402022-02-15 15:33:31 -0700190 make reset-5g-test; make 5g-test
Andy Bavier840e0b42021-09-16 17:10:23 -0700191
192Troubleshooting / Known Issues
193------------------------------
194
195If you suspect a problem, first verify that all pods are in Running state::
196
197 kubectl -n omec get pods
198 kubectl -n aether-roc get pods
199
Andy Bavier840e0b42021-09-16 17:10:23 -07002004G Test Fails
201^^^^^^^^^^^^^
202Occasionally *make test* (for 4G) fails for unknown reasons; this is true regardless of which Helm charts are used.
Andy Bavier72547672022-02-03 14:45:16 -0700203If this happens, first try recreating the simulated UE / eNB and re-running the test as follows::
204
205 make reset-ue
206 make test
207
208If that does not work, try cleaning up AiaB as described above and re-building it.
209
210If *make test* fails consistently, check whether the configuration has been pushed to the SD-CORE::
Andy Bavier840e0b42021-09-16 17:10:23 -0700211
212 kubectl -n omec logs config4g-0 | grep "Successfully"
213
214You should see that a device group and slice has been pushed::
215
216 [INFO][WebUI][CONFIG] Successfully posted message for device group 4g-oaisim-user to main config thread
217 [INFO][WebUI][CONFIG] Successfully posted message for slice default to main config thread
218
219Then tail the *config4g-0* log and make sure that the configuration has been successfully pushed to all
220SD-CORE components.