Removing references to k8s and vm
[ric-plt/ric-dep.git] / docs / installation-ric.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. SPDX-License-Identifier: CC-BY-4.0
3 .. ===============LICENSE_START=======================================================
4 .. Copyright (C) 2019-2020 AT&T Intellectual Property
5 .. ===================================================================================
6 .. This documentation file is distributed under the Creative Commons Attribution
7 .. 4.0 International License (the "License"); you may not use this file except in
8 .. compliance with the License.  You may obtain a copy of the License at
9 ..
10 .. http://creativecommons.org/licenses/by/4.0
11 ..
12 .. This file is distributed on an "AS IS" BASIS,
13 .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 .. See the License for the specific language governing permissions and
15 .. limitations under the License.
16 .. ===============LICENSE_END=========================================================
17
18
19 Getting and Preparing Deployment Scripts
20 ----------------------------------------
21
22 Clone the ric-plt/dep git repository that has deployment scripts and support files on the target VM.
23
24 ::
25
26   % git clone "https://gerrit.o-ran-sc.org/r/ric-plt/ric-dep"
27
28
29 .. code:: bash
30
31   git clone "https://gerrit.o-ran-sc.org/r/ric-plt/ric-dep"
32
33 Deploying the Infrastructure and Platform Groups
34 ------------------------------------------------
35
36 Use the scripts below to install kubernetes, kubernetes-CNI, helm and docker on a fresh 
37 Ubuntu 20.04 installation. Note that since May 2022 there's no need for anything form the repo it/dep
38 anymore.
39
40 .. code:: bash
41
42   # install kubernetes, kubernetes-CNI, helm and docker 
43   cd ric-dep/bin
44   ./install_k8s_and_helm.sh
45
46   # install chartmuseum into helm and add ric-common templates
47   ./install_common_templates_to_helm.sh
48
49 After the recipes are edited and helm started, the Near Realtime RIC platform is ready to be deployed, 
50 but first update the deployment recipe as per instructions in the next section.
51
52
53 Modify the deployment recipe
54 ----------------------------
55
56 Edit the recipe files ./RECIPE_EXAMPLE/example_recipe_latest_stable.yaml (which is 
57 a softlink that points to the latest release version). "example_recipe_latest_unstable.yaml
58 points to the latest example file that is under current development.
59
60 .. code:: bash
61
62   extsvcplt:
63     ricip: ""
64     auxip: ""
65
66 - Deployment scripts support both helm v2 and v3. The deployment script will determine the helm version installed in cluster during the deployment.
67 - To specify which version of the RIC platform components will be deployed, update the RIC platform component container tags in their corresponding section.
68 - You can specify which docker registry will be used for each component. If the docker registry requires login credential, you can add the credential in the following section. Please note that the installation suite has already included credentials for O-RAN Linux Foundation docker registries. Please do not create duplicate entries.
69
70 .. code:: bash
71
72   docker-credential:
73     enabled: true
74     credential:
75       SOME_KEY_NAME:
76         registry: ""
77         credential:
78           user: ""
79           password: ""
80           email: ""
81
82 For more advanced recipe configuration options, please refer to the recipe configuration guideline.
83
84 Installing the RIC
85 ------------------
86
87 After updating the recipe you can deploy the RIC with the command below. Note that generally use the 
88 latest recipe marked stable or one from a specific release.
89
90 .. code:: bash
91
92   cd ric-dep/bin
93   ./install -f ../RECIPE_EXAMPLE/PLATFORM/example_recipe_latest_stable.yaml
94
95
96 Checking the Deployment Status
97 ------------------------------
98
99 Now check the deployment status after a short wait. Results similar to the
100 output shown below indicate a complete and successful deployment. Check the
101 STATUS column from both kubectl outputs to ensure that all are either
102 "Completed" or "Running", and that none are "Error" or "ImagePullBackOff".
103
104 .. code::
105
106   # helm list
107   NAME                  REVISION        UPDATED                         STATUS          CHART                   APP VERSION     NAMESPACE
108   r3-a1mediator         1               Thu Jan 23 14:29:12 2020        DEPLOYED        a1mediator-3.0.0        1.0             ricplt
109   r3-appmgr             1               Thu Jan 23 14:28:14 2020        DEPLOYED        appmgr-3.0.0            1.0             ricplt
110   r3-dbaas1             1               Thu Jan 23 14:28:40 2020        DEPLOYED        dbaas1-3.0.0            1.0             ricplt
111   r3-e2mgr              1               Thu Jan 23 14:28:52 2020        DEPLOYED        e2mgr-3.0.0             1.0             ricplt
112   r3-e2term             1               Thu Jan 23 14:29:04 2020        DEPLOYED        e2term-3.0.0            1.0             ricplt
113   r3-infrastructure     1               Thu Jan 23 14:28:02 2020        DEPLOYED        infrastructure-3.0.0    1.0             ricplt
114   r3-jaegeradapter      1               Thu Jan 23 14:29:47 2020        DEPLOYED        jaegeradapter-3.0.0     1.0             ricplt
115   r3-rsm                1               Thu Jan 23 14:29:39 2020        DEPLOYED        rsm-3.0.0               1.0             ricplt
116   r3-rtmgr              1               Thu Jan 23 14:28:27 2020        DEPLOYED        rtmgr-3.0.0             1.0             ricplt
117   r3-submgr             1               Thu Jan 23 14:29:23 2020        DEPLOYED        submgr-3.0.0            1.0             ricplt
118   r3-vespamgr           1               Thu Jan 23 14:29:31 2020        DEPLOYED        vespamgr-3.0.0          1.0             ricplt
119
120   # kubectl get pods -n ricplt
121   NAME                                               READY   STATUS             RESTARTS   AGE
122   deployment-ricplt-a1mediator-69f6d68fb4-7trcl      1/1     Running            0          159m
123   deployment-ricplt-appmgr-845d85c989-qxd98          2/2     Running            0          160m
124   deployment-ricplt-dbaas-7c44fb4697-flplq           1/1     Running            0          159m
125   deployment-ricplt-e2mgr-569fb7588b-wrxrd           1/1     Running            0          159m
126   deployment-ricplt-e2term-alpha-db949d978-rnd2r     1/1     Running            0          159m
127   deployment-ricplt-jaegeradapter-585b4f8d69-tmx7c   1/1     Running            0          158m
128   deployment-ricplt-rsm-755f7c5c85-j7fgf             1/1     Running            0          158m
129   deployment-ricplt-rtmgr-c7cdb5b58-2tk4z            1/1     Running            0          160m
130   deployment-ricplt-submgr-5b4864dcd7-zwknw          1/1     Running            0          159m
131   deployment-ricplt-vespamgr-864f95c9c9-5wth4        1/1     Running            0          158m
132   r3-infrastructure-kong-68f5fd46dd-lpwvd            2/2     Running            3          160m
133
134   # kubectl get pods -n ricinfra
135   NAME                                        READY   STATUS      RESTARTS   AGE
136   deployment-tiller-ricxapp-d4f98ff65-9q6nb   1/1     Running     0          163m
137   tiller-secret-generator-plpbf               0/1     Completed   0          163m
138
139 Checking Container Health
140 -------------------------
141
142 Check the health of the application manager platform component by querying it
143 via the ingress controller using the following command.
144
145 .. code:: bash
146
147   % curl -v http://localhost:32080/appmgr/ric/v1/health/ready
148
149 The output should look as follows.
150
151 .. code::
152
153   *   Trying 10.0.2.100...
154   * TCP_NODELAY set
155   * Connected to 10.0.2.100 (10.0.2.100) port 32080 (#0)
156   > GET /appmgr/ric/v1/health/ready HTTP/1.1
157   > Host: 10.0.2.100:32080
158   > User-Agent: curl/7.58.0
159   > Accept: */*
160   >
161   < HTTP/1.1 200 OK
162   < Content-Type: application/json
163   < Content-Length: 0
164   < Connection: keep-alive
165   < Date: Wed, 22 Jan 2020 20:55:39 GMT
166   < X-Kong-Upstream-Latency: 0
167   < X-Kong-Proxy-Latency: 2
168   < Via: kong/1.3.1
169   <
170   * Connection #0 to host 10.0.2.100 left intact
171
172
173 Undeploying the Infrastructure and Platform Groups
174 --------------------------------------------------
175
176 To undeploy all the containers, perform the following steps in a root shell
177 within the it-dep repository.
178
179 .. code:: bash
180
181   # cd bin
182   # ./uninstall
183
184 Results similar to below indicate a complete and successful cleanup.
185
186 .. code::
187
188   # ./undeploy-ric-platform
189   Undeploying RIC platform components [appmgr rtmgr dbaas1 e2mgr e2term a1mediator submgr vespamgr rsm jaegeradapter infrastructure]
190   release "r3-appmgr" deleted
191   release "r3-rtmgr" deleted
192   release "r3-dbaas1" deleted
193   release "r3-e2mgr" deleted
194   release "r3-e2term" deleted
195   release "r3-a1mediator" deleted
196   release "r3-submgr" deleted
197   release "r3-vespamgr" deleted
198   release "r3-rsm" deleted
199   release "r3-jaegeradapter" deleted
200   release "r3-infrastructure" deleted
201   configmap "ricplt-recipe" deleted
202   namespace "ricxapp" deleted
203   namespace "ricinfra" deleted
204   namespace "ricplt" deleted
205
206
207 Restarting the VM
208 -----------------
209
210 After a reboot of the VM, and a suitable delay for initialization,
211 all the containers should be running again as shown above.
212
213 RIC Applications
214 ----------------
215
216 .. include:: installation-xapps.rst
217
218 OPTIONALLY use Redis Cluster (instead of Redis standalone)
219 ----------------------------------------------------------
220
221 .. include:: installation-rediscluster.rst