Merge "[DOC]Few changes added in DCAE healthcheck and DCAE deployment validation...
[dcaegen2.git] / docs / sections / services / mapper / installation.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. _mapper-installation:
4
5
6
7 Installation
8 ============
9
10 **Deployment Prerequisite/dependencies**
11
12 VES-Mapper can be deployed individually though it will throw errors if it can't reach to DMaaP instance's APIs. To test it functionally, DMaaP is the only required prerequisite outside DCAE. As VES-Mapper is integrated with Consul / CBS, it fetches the initial configuration from Consul.
13
14 **Blueprint/model/image**
15
16 VES-Mapper blueprint is available @ 
17 https://git.onap.org/dcaegen2/platform/blueprints/tree/blueprints/k8s-ves-mapper.yaml?h=guilin
18
19 VES-Mapper docker image is available in Nexus repo @ `nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.mapper.vesadapter.universalvesadaptor:latest <nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.mapper.vesadapter.universalvesadaptor:latest>`_
20
21
22
23
24 **1.To Run via blueprint**
25
26 *a. Verify DMaaP configurations in the blueprint as per setup*
27
28   Dmaap Configuration consists of subscribe url to fetch notifications from the respective collector and publish url to publish ves event.
29  
30 ``streams_publishes`` and ``streams_subscribes`` point to the publishing topic and subscribe topic respectively. Update these ``urls`` as per your DMaaP configurations in the blueprint.
31
32 *b. Verify the Smooks mapping configuration in the blueprint as per the usecase. Blueprint contains default mapping  for each supported collector ( SNMP Collector and RESTConf collector currently) which may serve the purpose for the usecase. The ``mapping-files`` in ``collectors`` contains the contents of the mapping file.
33
34 *c. Upload the blueprint in the DCAE's Cloudify instance*
35
36 For this step, DCAE's Cloudify instance should be in running state. Transfer blueprint file in DCAE bootstrap POD under /blueprints directory. Log-in to the DCAE bootstrap POD's main container.
37
38 .. note::
39   For doing this, we should run the below commands
40
41   * To get the bootstrap pod name, run this: kubectl get pods -n onap | grep bootstrap
42   * To transfer blueprint file in bootstrap pod, run this: kubectl cp <source file path> <bootstrap pod>:/blueprints -n onap
43   * To login to bootstrap pod name, run this: kubectl exec -it <bootstrap pod> bash -n onap
44
45 .. note::
46   Verify the below versions before validate blueprint
47
48   * The version of the plugin used is different from "cfy plugins list", update the blueprint import to match.
49   * If the tag_version under inputs is old, update with the latest
50
51 Validate blueprint
52
53     ``cfy blueprints validate /blueprints/k8s-ves-mapper.yaml``
54
55 Use following command for validated blueprint to upload:
56
57         ``cfy blueprints upload -b ves-mapper /blueprints/k8s-ves-mapper.yaml``
58
59 *d. Create the Deployment* 
60 After VES-Mapper's validated blueprint is uploaded,  create Cloudify Deployment by following command
61
62   ``cfy deployments create -b ves-mapper ves-mapper``
63
64 *e.  Deploy the component by using following command*
65
66   ``cfy executions start -d ves-mapper install``
67
68 To undeploy running ves-mapper, follow the below steps
69
70 *a.  cfy uninstall ves-mapper -f*
71
72 .. note::
73   The deployment uninstall will also delete the blueprint. In some case you might notice 400 error reported indicating active deployment exist such as below.
74
75   Ex: An error occurred on the server: 400: Can't delete deployment ves-mapper - There are running or queued executions for this deployment. Running executions ids:      d89fdd0c-8e12-4dfa-ba39-a6187fcf2f18
76
77 *b.  In that case, cancel the execution ID then run uninstall as below*
78
79 .. code-block:: bash
80
81   cfy executions cancel <Running executions ID>
82   cfy uninstall ves-mapper
83
84 **2.To run on standalone mode**
85
86 Though this is not a preferred way, to run VES-Mapper container on standalone mode using local configuration file carried in the docker image, following docker run command can be used.
87  
88     ``docker run -d   nexus3.onap.org:10003/onap/org.onap.dcaegen2.services.mapper.vesadapter.universalvesadaptor:1.1.0``
89