blob: c8050bea9740c640760a44a325b4717300cd6d45 [file] [log] [blame]
ajay87945292021-12-08 00:52:00 -08001.. vim: syntax=rst
2
3================
ajayd19711c2021-12-07 12:07:04 -08004Aether In a Box
ajay87945292021-12-08 00:52:00 -08005================
6
7Setting Up Aether-in-a-Box
8__________________________
9
10Aether-in-a-Box (AiaB) provides an easy way to deploy Aethers SD-CORE
11components and run basic tests to validate the installation. This guide
12describes the steps to set up AiaB.
13
14AiaB can be set up with a 4G or 5G SD-CORE. We use SimApp to configure
15the required state in SD-CORE for testing core functionality.
16
17Helm charts are the primary method of installing the SD-CORE resources.
18AiaB offers a great deal of flexibility regarding which Helm chart
19versions to install:
20
21* Local definitions of charts (for testing Helm chart changes)
22* Latest published charts (for deploying a development version of Aether)
23* Specified versions of charts (for deploying a specific Aether release)
24
25AiaB can be run on a bare metal machine or VM. System prerequisites:
26
27* Ubuntu 18.04
28* Kernel 4.15 or later
29* Haswell CPU or newer
30
31Clone Repositories
32__________________
33
34To initialize the AiaB environment, first clone the following repository using
35your Gerrit ID::
36
37 cd ~
38 git clone "ssh://<username>@gerrit.opencord.org:29418/aether-in-a-box"
39
40 mkdir -p ~/cord
41 cd ~/cord
42 git clone "ssh://<username>@gerrit.opencord.org:29418/sdcore-helm-charts"
43 git clone "ssh://<username>@gerrit.opencord.org:29418/aether-helm-charts"
44
45Set up Authentication Tokens
46____________________________
47
48::
49
50 cd ~/aether-in-a-box
51
52Edit the file configs/authentication.
53
54Fill out REGISTRY_USERNAME and REGISTRY_CLI_SECRET as follows:
55
56 * Log into the Aether Harbor Registry using your Crowd credentials
57 * Select User Profile from the drop-down menu in the upper right corner
58 * For REGISTRY_USERNAME, use the Username in your profile
59 * Copy the CLI secret to the clipboard and paste to REGISTRY_CLI_SECRET
60
61Also fill out REPO_USERNAME and REPO_PASSWORD with the information needed to
62authenticate with Aethers Helm chart repositories.
63
64If you have already set up AiaB but you used incorrect credentials, first
65clean up AiaB as described in the Cleanup section, then edit
66configs/authentication and re-build AiaB.
67
68Start the 4G SD-CORE
69____________________
70
71::
72
73 make test
74
75Start the 5G SD-CORE
76____________________
77
78If you have already installed the 4G SD-CORE, you must skip this step.
79Only one version of the SD-CORE can be installed at a time.::
80
81 make 5gc
82
83You can use gnbsim to test 5G functionality. Detailed steps in link (see :ref:`gNB-Simulator`)
84
85Cleanup
86_______
87
88The first time you build AiaB, it takes a while because it sets up the
89Kubernetes cluster. Subsequent builds will be much faster if you follow
90these steps to clean up the Helm charts without destroying the Kubernetes
91cluster.::
92
93 Clean up the 4G SD-CORE: *make reset-test
94 Clean up the 5G SD-CORE: *make reset-5g-test
95
96Developer Loop
97______________
98
99Suppose you wish to test a new build of a 5G SD-CORE services. You can deploy
100custom images by editing ~/aether-in-a-box/5g-core-values.yaml, for example::
101
102 images:
103 tags:
104 webui: registry.aetherproject.org/omecproject/5gc-webui:onf-release3.0.5-roc-935305f
105 pullPolicy: IfNotPresent
106
107To upgrade a running 5G SD-CORE with the new image, or to deploy the 5G SD-CORE
108with the image::
109
110 make 5gc
111
112Troubleshooting / Known Issues
113______________________________
114
115If you suspect a problem, first verify that all pods are in Running state::
116
117 kubectl -n omec get pods
118 kubectl -n aether-roc get pods
119
120If the pods are stuck in ImagePullBackOff state, then its likely an issue
121with credentials. See the Set up Authentication Tokens section.
122
1234G Test Fails
124_____________
125
126Occasionally make test (for 4G) fails for unknown reasons; this is true
127regardless of which Helm charts are used. If this happens, first try
128cleaning up AiaB and re-running the test. If make test fails consistently,
129check whether the configuration has been pushed to the SD-CORE::
130
131 kubectl -n omec logs config4g-0 | grep "Successfully"
132
133You should see that a device group and slice has been pushed::
134
135 [INFO][WebUI][CONFIG] Successfully posted message for device group 4g-oaisim-user to main config thread
136 [INFO][WebUI][CONFIG] Successfully posted message for slice default to main config thread
137
138Then tail the config4g-0 log and make sure that the configuration has been
139successfully pushed to all SD-CORE components.