RIC:1060: Change in PTL
[ric-plt/rtmgr.git] / docs / installation-guide-rtmgr-as-pod.rst
1 ..
2 ..  Copyright (c) 2019 AT&T Intellectual Property.
3 ..  Copyright (c) 2019 Nokia.
4 ..
5 ..  Licensed under the Creative Commons Attribution 4.0 International
6 ..  Public License (the "License"); you may not use this file except
7 ..  in compliance with the License. You may obtain a copy of the License at
8 ..
9 ..    https://creativecommons.org/licenses/by/4.0/
10 ..
11 ..  Unless required by applicable law or agreed to in writing, documentation
12 ..  distributed under the License is distributed on an "AS IS" BASIS,
13 ..  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ..
15 ..  See the License for the specific language governing permissions and
16 ..  limitations under the License.
17 ..
18
19
20 .. contents::
21    :depth: 3
22    :local:
23
24 Pre-requisites
25 --------------
26     * Kubernetes v.1.16.0 or above
27     * helm v2.12.3 or above
28     * Appmgr pods should be deployed and in running state
29
30 Clone the ric-plt/dep git repository
31 ------------------------------------
32
33 .. code:: bash
34
35   git clone "https://gerrit.o-ran-sc.org/r/ric-plt/ric-dep"
36
37
38 Modify the deployment recipe
39 ----------------------------
40 Locate for 'rtmgr' in the recipe file and edit the tag and repo.
41
42 .. code:: bash
43
44   rtmgr:
45     image:
46       registry: "nexus3.o-ran-sc.org:10004/o-ran-sc"
47       name: ric-plt-rtmgr
48       tag: 0.5.3
49
50 Copy the ric-common helm charts for it/dep, configure the helm repo and start local helm server
51
52 .. code:: bash
53
54    git clone "https://gerrit.o-ran-sc.org/r/it/dep"
55    HELM_HOME=$(helm home)
56    COMMON_CHART_VERSION=$(cat dep/ric-common/Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
57    helm package -d /tmp dep/ric-common/Common-Template/helm/ric-common
58    cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $HELM_HOME/repository/local/
59    helm repo index $HELM_HOME/repository/local/
60    helm serve >& /dev/null &
61    helm repo remove local
62    helm repo add local http://127.0.0.1:8879/charts
63
64
65 At this stage, routing manager can be deployed.
66
67 .. code:: bash
68
69   cd ric-dep/bin
70   ./install -f ../RECIPE_EXAMPLE/PLATFORM/example_recipe.yaml -c rtmgr
71
72 Checking the Deployment Status
73 ------------------------------
74
75 Now check the deployment status after a short wait. Results similar to the
76 output shown below indicate a complete and successful deployment. Check the
77 STATUS column from both kubectl outputs to ensure that all are either
78 "Completed" or "Running", and that none are "Error" or "ImagePullBackOff".
79
80 .. code:: bash
81
82   #helm list | grep rtmgr
83   r3-rtmgr                1               Wed Mar 25 08:34:22 2020        DEPLOYED        rtmgr-3.0.0             1.0          ricplt
84
85   # kubectl get pods -n ricplt | grep rtmgr
86   deployment-ricplt-rtmgr-6446b96b65-8mxzn           1/1     Running   0          46s
87
88 Checking Container Health
89 -------------------------
90
91 Check the health of the routing manager platform component by querying it
92 with the following command.
93
94 .. code:: bash
95
96  #kubectl get pods -n ricplt -o wide | grep rtmgr
97  deployment-ricplt-rtmgr-6446b96b65-8mxzn           1/1     Running   0          16m   10.244.0.17    master-node   <none>           <none>
98
99
100  curl -v http://10.244.0.17:8080/ric/v1/health/alive
101  *   Trying 10.244.0.17...
102  * TCP_NODELAY set
103  * Connected to 10.244.0.17 (10.244.0.17) port 8080 (#0)
104  > GET /ric/v1/health/alive HTTP/1.1
105  > Host: 10.244.0.17:8080
106  > User-Agent: curl/7.58.0
107  > Accept: */*
108  >
109  < HTTP/1.1 200 OK
110  < Content-Type: application/json
111  < Date: Wed, 25 Mar 2020 03:19:05 GMT
112  < Content-Length: 0
113  <  
114  * Connection #0 to host 10.244.0.17 left intact
115
116 Undeploying Routing Manager
117 ---------------------------
118
119 .. code:: bash
120
121  #helm delete --purge r3-rtmgr