blob: f54606ed1196e50da1e12155e4271ebea866cfe1 [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 Bavier840e0b42021-09-16 17:10:23 -070049If 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 Baviere86261e2021-09-21 11:05:18 -070055 git clone "ssh://<username>@gerrit.opencord.org:29418/roc-helm-charts"
Andy Bavier840e0b42021-09-16 17:10:23 -070056
57Now change to *~/aether-in-a-box* directory.
Andy Bavierf73c3d22021-08-30 10:29:06 -070058
59Set up Authentication Tokens
60----------------------------
61
Andy Bavier840e0b42021-09-16 17:10:23 -070062Edit the file *configs/authentication*.
Andy Bavierf73c3d22021-08-30 10:29:06 -070063
64Fill 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 Bavier7ff674f2021-11-05 12:47:17 -070071Also fill out REPO_USERNAME and REPO_PASSWORD with the information needed to authenticate
72with Aether's Helm chart repositories.
Andy Bavierf73c3d22021-08-30 10:29:06 -070073
Andy Bavier840e0b42021-09-16 17:10:23 -070074If you have already set up AiaB but you used incorrect credentials, first clean up AiaB as described
75in the `Cleanup`_ section, then edit *configs/authentication* and re-build AiaB.
Andy Bavierf73c3d22021-08-30 10:29:06 -070076
Andy Bavier840e0b42021-09-16 17:10:23 -070077Installing the ROC
78------------------
Andy Bavierf73c3d22021-08-30 10:29:06 -070079
Andy Bavier840e0b42021-09-16 17:10:23 -070080Note that you must install the ROC *before* installing SD-CORE.
81If you are not using the ROC to configure SD-CORE, you can skip this step.
Andy Bavierf73c3d22021-08-30 10:29:06 -070082
Andy Bavier840e0b42021-09-16 17:10:23 -070083First choose whether you will install the 4G or 5G SD-CORE. To install the ROC to
84configure the 4G SD-CORE::
Andy Bavierf73c3d22021-08-30 10:29:06 -070085
Andy Bavier840e0b42021-09-16 17:10:23 -070086 make roc-4g-models
87
88To install the ROC to configure the 5G SD-CORE::
89
90 make roc-5g-models
91
92By default the above commands install the ROC from the local charts in the Git repos cloned
93earlier. In order to install the ROC using the latest published charts, add *CHARTS=latest*
94to the command, e.g.,::
95
96 CHARTS=latest make roc-4g-models
97
Andy Baviere86261e2021-09-21 11:05:18 -070098To install the Aether 1.5 release, add *CHARTS=release-1.5*::
Andy Bavier840e0b42021-09-16 17:10:23 -070099
Andy Baviere86261e2021-09-21 11:05:18 -0700100 CHARTS=release-1.5 make roc-4g-models
Andy Bavier840e0b42021-09-16 17:10:23 -0700101
102Start the 4G SD-CORE
103--------------------
104
105If you are installing the 5G SD-CORE, you can skip this step.
106
107To deploy the 4G SD-CORE and run a simple ping test::
108
109 make test
110
111By default the above commands install the 4G SD-CORE from the local charts in the Git repos cloned
112earlier. In order to install the SD-CORE using the latest published charts, add *CHARTS=latest*
113to the command, e.g.,::
114
115 CHARTS=latest make test
116
Andy Baviere86261e2021-09-21 11:05:18 -0700117To install the Aether 1.5 release, add *CHARTS=release-1.5*::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700118
Andy Baviere86261e2021-09-21 11:05:18 -0700119 CHARTS=release-1.5 make test
Andy Bavierf73c3d22021-08-30 10:29:06 -0700120
Andy Bavier840e0b42021-09-16 17:10:23 -0700121Start the 5G SD-CORE
122--------------------
Andy Bavierf73c3d22021-08-30 10:29:06 -0700123
Andy Bavier840e0b42021-09-16 17:10:23 -0700124If you have already installed the 4G SD-CORE, you must skip this step. Only one version of
125the SD-CORE can be installed at a time.
Andy Bavierf73c3d22021-08-30 10:29:06 -0700126
Andy Bavier840e0b42021-09-16 17:10:23 -0700127To deploy the 5G SD-CORE::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700128
Andy Bavier840e0b42021-09-16 17:10:23 -0700129 make 5gc
Andy Bavierf73c3d22021-08-30 10:29:06 -0700130
Andy Bavier840e0b42021-09-16 17:10:23 -0700131By default the above commands install the 5G SD-CORE from the local charts in the Git repos cloned
132earlier. In order to install the SD-CORE using the latest published charts, add *CHARTS=latest*
133to the command, e.g.,::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700134
Andy Bavier840e0b42021-09-16 17:10:23 -0700135 CHARTS=latest make 5gc
Andy Bavierf73c3d22021-08-30 10:29:06 -0700136
Andy Baviere86261e2021-09-21 11:05:18 -0700137To install the Aether 1.5 release, add *CHARTS=release-1.5*::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700138
Andy Baviere86261e2021-09-21 11:05:18 -0700139 CHARTS=release-1.5 make 5gc
Andy Bavierf73c3d22021-08-30 10:29:06 -0700140
141You can use *gnbsim* to test 5G functionality. For example, to run the 5G user registration::
142
143 kubectl -n omec exec gnbsim-0 -- /go/src/gnbsim/gnbsim register
144
Andy Bavier840e0b42021-09-16 17:10:23 -0700145Currently there is no ping test for the 5G SD-CORE.
Andy Bavierf73c3d22021-08-30 10:29:06 -0700146
Andy Bavier840e0b42021-09-16 17:10:23 -0700147Cleanup
148-------
Andy Bavierf73c3d22021-08-30 10:29:06 -0700149
Andy Bavier840e0b42021-09-16 17:10:23 -0700150The first time you build AiaB, it takes a while because it sets up the Kubernetes cluster.
151Subsequent builds will be much faster if you follow these steps to clean up the Helm charts without
152destroying the Kubernetes cluster.
Andy Bavierf73c3d22021-08-30 10:29:06 -0700153
Andy Bavier840e0b42021-09-16 17:10:23 -0700154* Clean up the 4G SD-CORE: *make reset-test*
155* Clean up the 5G SD-CORE: *make reset-5g-test*
156* Clean up the ROC: *make roc-clean*
157
158It's normal for the above commands to take a minute or two to complete.
159
160As an example, suppose that you want to test the 4G SD-CORE with the ROC, and then the 5G SD-CORE
161with the ROC. You could run these commands::
162
163 CHARTS=latest make roc-4g-models # Install ROC with 4G configuration
164 CHARTS=latest make test # Install 4G SD-CORE and run ping test
165 make reset-test
166 make roc-clean
167 CHARTS=latest make roc-5g-models # Install ROC with 5G configuration
168 CHARTS=latest make 5gc # Install 5G SD-CORE
169 make reset-5g-test
170 make roc-clean
171
172Developer Loop
173--------------
174
175Suppose you wish to test a new build of a 5G SD-CORE services. You can deploy custom images
176by editing `~/aether-in-a-box/5g-core-values.yaml`, for example::
Andy Bavierf73c3d22021-08-30 10:29:06 -0700177
178 images:
179 tags:
180 webui: registry.aetherproject.org/omecproject/5gc-webui:onf-release3.0.5-roc-935305f
181 pullPolicy: IfNotPresent
Andy Bavierf73c3d22021-08-30 10:29:06 -0700182
Andy Bavier840e0b42021-09-16 17:10:23 -0700183To 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 -0700184
Andy Bavierf73c3d22021-08-30 10:29:06 -0700185 make 5gc
Andy Bavier840e0b42021-09-16 17:10:23 -0700186
187Troubleshooting / Known Issues
188------------------------------
189
190If you suspect a problem, first verify that all pods are in Running state::
191
192 kubectl -n omec get pods
193 kubectl -n aether-roc get pods
194
195If the pods are stuck in ImagePullBackOff state, then it's likely an issue with credentials. See the
196`Set up Authentication Tokens`_ section.
197
1984G Test Fails
199^^^^^^^^^^^^^
200Occasionally *make test* (for 4G) fails for unknown reasons; this is true regardless of which Helm charts are used.
201If this happens, first try cleaning up AiaB and re-running the test. If *make test* fails consistently, check
202whether the configuration has been pushed to the SD-CORE::
203
204 kubectl -n omec logs config4g-0 | grep "Successfully"
205
206You should see that a device group and slice has been pushed::
207
208 [INFO][WebUI][CONFIG] Successfully posted message for device group 4g-oaisim-user to main config thread
209 [INFO][WebUI][CONFIG] Successfully posted message for slice default to main config thread
210
211Then tail the *config4g-0* log and make sure that the configuration has been successfully pushed to all
212SD-CORE components.
213
2145G Test Fails
215^^^^^^^^^^^^^
216Currently the 5G *gnbsim* does not support data packets, though the UE can successfully register.
217For example the *gnbsim register* command gets stuck here::
218
219 ip address in string 172.250.0.1
220 err <nil>
221 UE address - 172.250.0.1
222 Assigned address to UE address 172.250.0.1
223 sent message NGAP-PDU Session Resource Setup Response
224 Failed to write gtpu packet
225 Sent uplink gtpu packet
226 Failed to write gtpu packet
227 Sent uplink gtpu packet
228 Failed to write gtpu packet
229 Sent uplink gtpu packet
230
231Fixing this is work-in-progress.