NONRTRIC-946: Servicemanager - Add Kong data plane and control plane
[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 Helm repo.
22 In the dev testing deployment described in this documentation, this private Helm repo is the Chart Museum pod that is deployed within the ric infrastructure group into the RIC cluster.
23
24 The Helm repo location and credential for access the repo are specified in both the infrastructure and platform recipe files.
25
26 Before any xApp can be deployed, its Helm chart must be loaded into this private Helm repo before the App manager can deploy them.
27 The example below show a command sequence that completes:
28
29 #. Add the Helm repo at the Helm client running on the RIC cluster host VM (via Kong Ingress Controller);
30 #. Load the xApp Helm chart into the Helm repo;
31 #. Update the local cache for the Helm repo and check the Helm chart is loaded;
32 #. Calling App Manager to deploy the xApp;
33 #. Calling App Manager to delete the xApp;
34 #. Delete the xApp helm chart from the private Helm repo.
35
36 .. code:: bash
37
38    # add the Chart Museum as repo cm
39    helm repo add cm http://10.0.2.100:32080/helm
40
41    # load admin-xapp Helm chart to the Chart Museum
42    curl -L -u helm:helm --data-binary "@admin-xapp-1.0.7.tgz" \
43       http://10.0.2.100:32080/helm/api/charts
44
45    # check the local cache of repo cm
46    helm repo update cm
47    # verify that the Helm chart is loaded and accessible
48    helm search cm/
49    # the new admin-app chart should show up here.
50
51    # test App Manager health check API
52    curl -v http://10.0.2.100:32080/appmgr/ric/v1/health/ready
53    # expecting a 200 response
54
55    # list deployed xApps
56    curl http://10.0.2.100:32080/appmgr/ric/v1/xapps
57    # expecting a []
58         
59    # deploy xApp
60    curl -X POST http://10.0.2.100:32080/appmgr/ric/v1/xapps -d '{"name": "admin-xapp"}'
61    # expecting: {"name":"admin-app","status":"deployed","version":"1.0","instances":null}
62         
63    # check again deployed xApp
64    curl http://10.0.2.10:32080/appmgr/ric/v1/xapps
65    # expecting a JSON array with an entry for admin-app
66         
67    # check pods using kubectl
68    kubectl get pods --all-namespaces
69    # expecting the admin-xapp pod showing up
70         
71    # underlay the xapp
72    curl -X DELETE http://10.0.2.100:32080/appmgr/ric/v1/xapps/admin-xapp
73
74    # check pods using kubectl
75    kubectl get pods --all-namespaces
76    # expecting the admin-xapp pod gone or shown as terminating
77
78    # to delete a chart
79    curl -L -X DELETE -u helm:helm http://10.0.2.100:32080/api/charts/admin-xapp/0.0.5
80
81 For more xApp deployment and usage examples, please see the documentation for the it/test repository.