Adding a note on helm3 for Near RIC installation procedure
[it/dep.git] / docs / ric / installation-ricplt.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 Clone the it/dep git repository that has deployment scripts and support files on the target VM.
22 (You might have already done this in a previous step.)
23
24 ::
25
26   % git clone https://gerrit.o-ran-sc.org/r/it/dep
27
28 Check out the appropriate branch of the repository with the release you want to deploy.
29 For example:
30
31 .. code:: bash
32
33   git clone https://gerrit.o-ran-sc.org/r/it/dep
34   cd dep
35   git submodule update --init --recursive --remote
36
37 **Modify the deployment recipe**
38
39 Edit the recipe files ./RECIPE_EXAMPLE/PLATFORM/example_recipe.yaml.
40
41 - Specify the IP addresses used by the RIC and AUX cluster ingress controller (e.g., the main interface IP) in the following section. If you do not plan to set up an AUX cluster, you can put down any private IPs (e.g., 10.0.2.1 and 10.0.2.2).
42
43 .. code:: bash
44
45   extsvcplt:
46     ricip: ""
47     auxip: ""
48
49 - Deployment scripts support both helm v2 and v3. The deployment script will determine the helm version installed in cluster during the deployment.
50 - To specify which version of the RIC platform components will be deployed, update the RIC platform component container tags in their corresponding section.
51 - 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.
52
53 .. code:: bash
54
55   docker-credential:
56     enabled: true
57     credential:
58       SOME_KEY_NAME:
59         registry: ""
60         credential:
61           user: ""
62           password: ""
63           email: ""
64
65 For more advanced recipe configuration options, please refer to the recipe configuration guideline.
66
67
68 **Deploying the Infrastructure and Platform Groups**
69
70 After the recipes are edited, the Near Realtime RIC platform is ready to be deployed.
71
72 .. code:: bash
73
74   cd dep/bin
75   ./deploy-ric-platform ../RECIPE_EXAMPLE/PLATFORM/example_recipe.yaml
76
77
78 **Checking the Deployment Status**
79
80 Now check the deployment status after a short wait. Results similar to the
81 output shown below indicate a complete and successful deployment. Check the
82 STATUS column from both kubectl outputs to ensure that all are either
83 "Completed" or "Running", and that none are "Error" or "ImagePullBackOff".
84
85 .. code::
86
87   # helm list
88   NAME                  REVISION        UPDATED                         STATUS          CHART                   APP VERSION     NAMESPACE
89   r3-a1mediator         1               Thu Jan 23 14:29:12 2020        DEPLOYED        a1mediator-3.0.0        1.0             ricplt
90   r3-appmgr             1               Thu Jan 23 14:28:14 2020        DEPLOYED        appmgr-3.0.0            1.0             ricplt
91   r3-dbaas1             1               Thu Jan 23 14:28:40 2020        DEPLOYED        dbaas1-3.0.0            1.0             ricplt
92   r3-e2mgr              1               Thu Jan 23 14:28:52 2020        DEPLOYED        e2mgr-3.0.0             1.0             ricplt
93   r3-e2term             1               Thu Jan 23 14:29:04 2020        DEPLOYED        e2term-3.0.0            1.0             ricplt
94   r3-infrastructure     1               Thu Jan 23 14:28:02 2020        DEPLOYED        infrastructure-3.0.0    1.0             ricplt
95   r3-jaegeradapter      1               Thu Jan 23 14:29:47 2020        DEPLOYED        jaegeradapter-3.0.0     1.0             ricplt
96   r3-rsm                1               Thu Jan 23 14:29:39 2020        DEPLOYED        rsm-3.0.0               1.0             ricplt
97   r3-rtmgr              1               Thu Jan 23 14:28:27 2020        DEPLOYED        rtmgr-3.0.0             1.0             ricplt
98   r3-submgr             1               Thu Jan 23 14:29:23 2020        DEPLOYED        submgr-3.0.0            1.0             ricplt
99   r3-vespamgr           1               Thu Jan 23 14:29:31 2020        DEPLOYED        vespamgr-3.0.0          1.0             ricplt
100
101   # kubectl get pods -n ricplt
102   NAME                                               READY   STATUS             RESTARTS   AGE
103   deployment-ricplt-a1mediator-69f6d68fb4-7trcl      1/1     Running            0          159m
104   deployment-ricplt-appmgr-845d85c989-qxd98          2/2     Running            0          160m
105   deployment-ricplt-dbaas-7c44fb4697-flplq           1/1     Running            0          159m
106   deployment-ricplt-e2mgr-569fb7588b-wrxrd           1/1     Running            0          159m
107   deployment-ricplt-e2term-alpha-db949d978-rnd2r     1/1     Running            0          159m
108   deployment-ricplt-jaegeradapter-585b4f8d69-tmx7c   1/1     Running            0          158m
109   deployment-ricplt-rsm-755f7c5c85-j7fgf             1/1     Running            0          158m
110   deployment-ricplt-rtmgr-c7cdb5b58-2tk4z            1/1     Running            0          160m
111   deployment-ricplt-submgr-5b4864dcd7-zwknw          1/1     Running            0          159m
112   deployment-ricplt-vespamgr-864f95c9c9-5wth4        1/1     Running            0          158m
113   r3-infrastructure-kong-68f5fd46dd-lpwvd            2/2     Running            3          160m
114
115   # kubectl get pods -n ricinfra
116   NAME                                        READY   STATUS      RESTARTS   AGE
117   deployment-tiller-ricxapp-d4f98ff65-9q6nb   1/1     Running     0          163m
118   tiller-secret-generator-plpbf               0/1     Completed   0          163m
119
120 **Checking Container Health**
121
122 Check the health of the application manager platform component by querying it
123 via the ingress controller using the following command.
124
125 .. code:: bash
126
127   % curl -v http://localhost:32080/appmgr/ric/v1/health/ready
128
129 The output should look as follows.
130
131 .. code::
132
133   *   Trying 10.0.2.100...
134   * TCP_NODELAY set
135   * Connected to 10.0.2.100 (10.0.2.100) port 32080 (#0)
136   > GET /appmgr/ric/v1/health/ready HTTP/1.1
137   > Host: 10.0.2.100:32080
138   > User-Agent: curl/7.58.0
139   > Accept: */*
140   >
141   < HTTP/1.1 200 OK
142   < Content-Type: application/json
143   < Content-Length: 0
144   < Connection: keep-alive
145   < Date: Wed, 22 Jan 2020 20:55:39 GMT
146   < X-Kong-Upstream-Latency: 0
147   < X-Kong-Proxy-Latency: 2
148   < Via: kong/1.3.1
149   <
150   * Connection #0 to host 10.0.2.100 left intact
151
152
153 **Undeploying the Infrastructure and Platform Groups**
154
155 To undeploy all the containers, perform the following steps in a root shell
156 within the it-dep repository.
157
158 .. code:: bash
159
160   # cd bin
161   # ./undeploy-ric-platform
162
163 Results similar to below indicate a complete and successful cleanup.
164
165 .. code::
166
167   # ./undeploy-ric-platform
168   Undeploying RIC platform components [appmgr rtmgr dbaas1 e2mgr e2term a1mediator submgr vespamgr rsm jaegeradapter infrastructure]
169   release "r3-appmgr" deleted
170   release "r3-rtmgr" deleted
171   release "r3-dbaas1" deleted
172   release "r3-e2mgr" deleted
173   release "r3-e2term" deleted
174   release "r3-a1mediator" deleted
175   release "r3-submgr" deleted
176   release "r3-vespamgr" deleted
177   release "r3-rsm" deleted
178   release "r3-jaegeradapter" deleted
179   release "r3-infrastructure" deleted
180   configmap "ricplt-recipe" deleted
181   namespace "ricxapp" deleted
182   namespace "ricinfra" deleted
183   namespace "ricplt" deleted
184
185
186 **Restarting the VM**
187
188 After a reboot of the VM, and a suitable delay for initialization,
189 all the containers should be running again as shown above.