blob: c0a3c012d817853c5da96efb2ed9d0145c9a8b75 [file] [log] [blame]
ajayb3f40982021-12-08 14:26:11 -08001..
2 SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
3 SPDX-License-Identifier: Apache-2.0
4
ajayce0380c2021-12-14 21:51:00 -08005.. _aiab-guide:
ajay87945292021-12-08 00:52:00 -08006
7================
ajayd19711c2021-12-07 12:07:04 -08008Aether In a Box
ajay87945292021-12-08 00:52:00 -08009================
10
11Setting Up Aether-in-a-Box
12__________________________
13
14Aether-in-a-Box (AiaB) provides an easy way to deploy Aethers SD-CORE
15components and run basic tests to validate the installation. This guide
16describes the steps to set up AiaB.
17
18AiaB can be set up with a 4G or 5G SD-CORE. We use SimApp to configure
19the required state in SD-CORE for testing core functionality.
20
21Helm charts are the primary method of installing the SD-CORE resources.
22AiaB offers a great deal of flexibility regarding which Helm chart
23versions 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
29AiaB 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
35Clone Repositories
36__________________
37
38To initialize the AiaB environment, first clone the following repository using
39your 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
49Set up Authentication Tokens
50____________________________
51
52::
53
54 cd ~/aether-in-a-box
55
56Edit the file configs/authentication.
57
58Fill 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
65Also fill out REPO_USERNAME and REPO_PASSWORD with the information needed to
66authenticate with Aethers Helm chart repositories.
67
68If you have already set up AiaB but you used incorrect credentials, first
69clean up AiaB as described in the Cleanup section, then edit
70configs/authentication and re-build AiaB.
71
72Start the 4G SD-CORE
73____________________
74
75::
76
77 make test
78
79Start the 5G SD-CORE
80____________________
81
82If you have already installed the 4G SD-CORE, you must skip this step.
Vini Gajjar816e1852022-01-24 14:32:44 +053083Only one version of the SD-CORE can be installed at a time
84
85To deploy 5G SD-CORE::
ajay87945292021-12-08 00:52:00 -080086
87 make 5gc
88
Vini Gajjar816e1852022-01-24 14:32:44 +053089To deploy and test 5G SD-CORE::
90
91 make 5g-test
92
93The above step uses gNBSim to perform Registration + UE-Initiated PDU Session
94Establishment + User Data Packets. To test other procedures, modify *gnb.conf*
95in *ransim-values.yaml* (refer gNBSim documentation :ref:`gNB-Simulator`)
ajay87945292021-12-08 00:52:00 -080096
97Cleanup
98_______
99
100The first time you build AiaB, it takes a while because it sets up the
101Kubernetes cluster. Subsequent builds will be much faster if you follow
102these steps to clean up the Helm charts without destroying the Kubernetes
103cluster.::
104
105 Clean up the 4G SD-CORE: *make reset-test
106 Clean up the 5G SD-CORE: *make reset-5g-test
107
108Developer Loop
109______________
110
111Suppose you wish to test a new build of a 5G SD-CORE services. You can deploy
112custom images by editing ~/aether-in-a-box/5g-core-values.yaml, for example::
113
114 images:
115 tags:
116 webui: registry.aetherproject.org/omecproject/5gc-webui:onf-release3.0.5-roc-935305f
117 pullPolicy: IfNotPresent
118
119To upgrade a running 5G SD-CORE with the new image, or to deploy the 5G SD-CORE
120with the image::
121
122 make 5gc
123
124Troubleshooting / Known Issues
125______________________________
126
127If you suspect a problem, first verify that all pods are in Running state::
128
129 kubectl -n omec get pods
130 kubectl -n aether-roc get pods
131
132If the pods are stuck in ImagePullBackOff state, then its likely an issue
133with credentials. See the Set up Authentication Tokens section.
134
1354G Test Fails
136_____________
137
138Occasionally make test (for 4G) fails for unknown reasons; this is true
139regardless of which Helm charts are used. If this happens, first try
140cleaning up AiaB and re-running the test. If make test fails consistently,
141check whether the configuration has been pushed to the SD-CORE::
142
143 kubectl -n omec logs config4g-0 | grep "Successfully"
144
145You should see that a device group and slice has been pushed::
146
147 [INFO][WebUI][CONFIG] Successfully posted message for device group 4g-oaisim-user to main config thread
148 [INFO][WebUI][CONFIG] Successfully posted message for slice default to main config thread
149
150Then tail the config4g-0 log and make sure that the configuration has been
151successfully pushed to all SD-CORE components.