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