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