blob: 242a80a62044324480707fb3ab5cc7721691255a [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.
83Only one version of the SD-CORE can be installed at a time.::
84
85 make 5gc
86
87You can use gnbsim to test 5G functionality. Detailed steps in link (see :ref:`gNB-Simulator`)
88
89Cleanup
90_______
91
92The first time you build AiaB, it takes a while because it sets up the
93Kubernetes cluster. Subsequent builds will be much faster if you follow
94these steps to clean up the Helm charts without destroying the Kubernetes
95cluster.::
96
97 Clean up the 4G SD-CORE: *make reset-test
98 Clean up the 5G SD-CORE: *make reset-5g-test
99
100Developer Loop
101______________
102
103Suppose you wish to test a new build of a 5G SD-CORE services. You can deploy
104custom images by editing ~/aether-in-a-box/5g-core-values.yaml, for example::
105
106 images:
107 tags:
108 webui: registry.aetherproject.org/omecproject/5gc-webui:onf-release3.0.5-roc-935305f
109 pullPolicy: IfNotPresent
110
111To upgrade a running 5G SD-CORE with the new image, or to deploy the 5G SD-CORE
112with the image::
113
114 make 5gc
115
116Troubleshooting / Known Issues
117______________________________
118
119If you suspect a problem, first verify that all pods are in Running state::
120
121 kubectl -n omec get pods
122 kubectl -n aether-roc get pods
123
124If the pods are stuck in ImagePullBackOff state, then its likely an issue
125with credentials. See the Set up Authentication Tokens section.
126
1274G Test Fails
128_____________
129
130Occasionally make test (for 4G) fails for unknown reasons; this is true
131regardless of which Helm charts are used. If this happens, first try
132cleaning up AiaB and re-running the test. If make test fails consistently,
133check whether the configuration has been pushed to the SD-CORE::
134
135 kubectl -n omec logs config4g-0 | grep "Successfully"
136
137You should see that a device group and slice has been pushed::
138
139 [INFO][WebUI][CONFIG] Successfully posted message for device group 4g-oaisim-user to main config thread
140 [INFO][WebUI][CONFIG] Successfully posted message for slice default to main config thread
141
142Then tail the config4g-0 log and make sure that the configuration has been
143successfully pushed to all SD-CORE components.