b255917414514b6e0686786529836c0f436e3ec4
[it/dep.git] / docs / ric / installation-xapps.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 **Loading xApp Helm Charts**
19
20 The RIC Platform App Manager deploys RIC applications (a.k.a. xApps) using Helm charts stored in a private local Helm repo.
21 The Helm local repo is deployed as a sidecar of the App Manager pod, and its APIs are exposed using an ingress controller with TLS enabled.
22 You can use both HTTP and HTTPS to access it.
23
24 Before any xApp can be deployed, its Helm chart must be loaded into this private Helm repo.
25 The example below shows the command sequences that upload and delete the xApp Helm charts:
26
27 #. Load the xApp Helm charts into the Helm repo;
28 #. Verify the xApp Helm charts;
29 #. Call App Manager to deploy the xApp;
30 #. Call App Manager to delete the xApp;
31 #. Delete the xApp helm chart from the private Helm repo.
32
33 In the following example, the <INGRESS_CONTROLLER_IP> is the IP address that the RIC cluster ingress controller is listening to.
34 If you are using a VM, it is the IP address of the main interface.
35 If you are using REC clusters, it is the DANM network IP address you assigned in the recipe.
36 If the commands are executed inside the host machine, you can use "localhost" as the <INGRESS_CONTROLLER_IP>.
37
38
39 .. code:: bash
40
41    # load admin-xapp Helm chart to the Helm repo
42    curl -L --data-binary "@admin-xapp-1.0.7.tgz" http://<INGRESS_CONTROLLER_IP>:32080/helmrepo
43
44    # verify the xApp Helm charts
45    curl -L http://<INGRESS_CONTROLLER_IP>:32080/helmrepo/index.yaml
46
47    # test App Manager health check API
48    curl -v http://<INGRESS_CONTROLLER_IP>:32080/appmgr/ric/v1/health/ready
49    # expecting a 200 response
50
51    # list deployed xApps
52    curl http://<INGRESS_CONTROLLER_IP>:32080/appmgr/ric/v1/xapps
53    # expecting a []
54
55    # deploy xApp, the xApp name has to be the same as the xApp Helm chart name
56    curl -X POST http://<INGRESS_CONTROLLER_IP>/appmgr/ric/v1/xapps -d '{"name": "admin-xapp"}'
57    # expecting: {"name":"admin-app","status":"deployed","version":"1.0","instances":null}
58
59    # check again deployed xApp
60    curl http://<INGRESS_CONTROLLER_IP>:32080/appmgr/ric/v1/xapps
61    # expecting a JSON array with an entry for admin-app
62
63    # check pods using kubectl
64    kubectl get pods --all-namespaces
65    # expecting the admin-xapp pod showing up
66
67    # underlay the xapp
68    curl -X DELETE http://<INGRESS_CONTROLLER_IP>:32080/appmgr/ric/v1/xapps/admin-xapp
69
70    # check pods using kubectl
71    kubectl get pods --all-namespaces
72    # expecting the admin-xapp pod gone or shown as terminating
73
74    # to delete a chart
75    curl -L -X DELETE -u helm:helm http://<INGRESS_CONTROLLER_IP>:32080/api/charts/admin-xapp/0.0.5
76
77 For more xApp deployment and usage examples, please see the documentation for the it/test repository.