Merge changes I86907081,Iccdbe2a2
[dcaegen2.git] / docs / sections / services / ves-http / installation.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
2 .. http://creativecommons.org/licenses/by/4.0\r
3 .. _ves-installation:\r
4 \r
5 \r
6 VES Collector Cloudify Installation\r
7 ===================================\r
8 \r
9 VESCollector is installed via cloudify blueprint by DCAE bootstrap process on typical ONAP installation.\r
10 As the service is containerized, it can be started on stand-alone mode also.\r
11 \r
12 \r
13 To run VES Collector container on standalone mode, following parameters are required\r
14 \r
15     ``docker run -d -p 8080:8080/tcp -p 8443:8443/tcp -P -e DMAAPHOST='10.0.11.1' nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.7.9``\r
16 \r
17 \r
18 DMAAPHOST is required for standalone; for normal platform installed instance the publish URL are obtained from Consul. Below parameters are exposed for DCAE platform (cloudify) deployed instance\r
19 \r
20 \r
21 - COLLECTOR_IP\r
22 - DMAAPHOST - should contain an address to DMaaP, so that event publishing can work\r
23 - CONFIG_BINDING_SERVICE - should be a name of CBS\r
24 - CONFIG_BINDING_SERVICE_SERVICE_PORT - should be a http port of CBS\r
25 - HOSTNAME - should be a name of VESCollector application as it is registered in CBS catalog\r
26 \r
27 These parameters can be configured either by passing command line option during `docker run` call or by specifying environment variables named after command line option name\r
28 \r
29 \r
30 Authentication Support\r
31 ----------------------\r
32 \r
33 VES Collector support following authentication types\r
34 \r
35     * *auth.method=noAuth* default option - no security (http)\r
36     * *auth.method=certBasicAuth* is used to enable mutual TLS authentication or/and basic HTTPs authentication\r
37 \r
38 The blueprint is same for both deployments - based on the input configuration, VESCollector can be set for required authentication type.\r
39 Default ONAP deployed VESCollector is configured for "certBasicAuth".\r
40 \r
41 If VESCollector instance need to be deployed with authentication disabled, follow below setup\r
42 \r
43 \r
44 - Execute into Bootstrap POD using kubectl command\r
45     .. note::\r
46       For doing this, follow the below steps\r
47 \r
48       * First get the bootstrap pod name by running this: kubectl get pods -n onap | grep bootstrap\r
49       * Then login to bootstrap pod by running this: kubectl exec -it <bootstrap pod> -n onap -- bash\r
50 \r
51 - VES blueprint is available under  /blueprints directory ``k8s-ves.yaml``. A corresponding input file is also pre-loaded into bootstrap pod under /inputs/k8s-ves-inputs.yaml\r
52 \r
53 - Deploy blueprint\r
54     .. code-block:: bash\r
55 \r
56         cfy install -b ves-http -d ves-http -i /inputs/k8s-ves-inputs.yaml /blueprints/k8s-ves.yaml\r
57 \r
58 To undeploy ves-http, steps are noted below\r
59 \r
60 - Uninstall running ves-http and delete deployment\r
61     .. code-block:: bash\r
62 \r
63         cfy uninstall ves-http\r
64 \r
65 The deployment uninstall will also delete the blueprint. In some case you might notice 400 error reported indicating active deployment exist such as below\r
66 ** An error occurred on the server: 400: Can't delete blueprint ves-http - There exist deployments for this blueprint; Deployments ids: ves-http**\r
67 \r
68 In this case blueprint can be deleted explicitly using this command.\r
69 \r
70     .. code-block:: bash\r
71 \r
72         cfy blueprint delete ves-http\r
73 \r
74 External repo schema files from OOM connection to VES collector\r
75 -------------------------------------------------------------------\r
76 In order to not use schema files bundled in VES Collector image but schema files defined in `OOM <https://gerrit.onap.org/r/gitweb?p=oom.git;a=tree;f=kubernetes/dcaegen2/resources/external>`_ repository and installed with dcaegen2 module, follow below setup.\r
77 \r
78 - Execute into Bootstrap POD using kubectl command\r
79     .. note::\r
80       For doing this, follow the below steps\r
81 \r
82       * First get the bootstrap pod name by running this: kubectl get pods -n onap | grep bootstrap\r
83       * Then login to bootstrap pod by running this: kubectl exec -it <bootstrap pod> -n onap -- bash\r
84 \r
85 - VES blueprint is available under  /blueprints directory ``k8s-ves.yaml``. A corresponding input file is also pre-loaded into bootstrap pod under /inputs/k8s-ves-inputs.yaml\r
86 \r
87 - Edit ``k8s-ves.yaml`` blueprint by adding section below ``docker_config:`` tag:\r
88     .. code-block:: bash\r
89 \r
90         volumes:\r
91         - container:\r
92             bind: /opt/app/VESCollector/etc/externalRepo/3gpp/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI\r
93           config_volume:\r
94             name: dcae-external-repo-configmap-sa88-rel16\r
95         - container:\r
96             bind: /opt/app/VESCollector/etc/externalRepo/\r
97           config_volume:\r
98             name: dcae-external-repo-configmap-schema-map\r
99 \r
100 - After all ``docker_config:`` section in blueprint should looks like:\r
101     .. code-block:: bash\r
102 \r
103       docker_config:\r
104         healthcheck:\r
105           endpoint: /healthcheck\r
106           interval: 15s\r
107           timeout: 1s\r
108           type: http\r
109         volumes:\r
110         - container:\r
111             bind: /opt/app/VESCollector/etc/externalRepo/3gpp/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI\r
112           config_volume:\r
113             name: dcae-external-repo-configmap-sa88-rel16\r
114         - container:\r
115             bind: /opt/app/VESCollector/etc/externalRepo/\r
116           config_volume:\r
117             name: dcae-external-repo-configmap-schema-map\r
118 \r
119 .. note::\r
120 \r
121     To undeploy ves-http if it is deployed, steps are noted below\r
122 \r
123     Uninstall running ves-http and delete deployment\r
124         .. code-block:: bash\r
125 \r
126             cfy uninstall ves-http\r
127 \r
128     The deployment uninstall will also delete the blueprint. In some case you might notice 400 error reported indicating active deployment exist such as below\r
129     ** An error occurred on the server: 400: Can't delete blueprint ves-http - There exist deployments for this blueprint; Deployments ids: ves-http**\r
130 \r
131     In this case blueprint can be deleted explicitly using this command.\r
132 \r
133         .. code-block:: bash\r
134 \r
135             cfy blueprint delete ves-http\r
136 \r
137 To deploy modified ves-http, steps are noted below\r
138 \r
139 - Load blueprint:\r
140     .. code-block:: bash\r
141 \r
142         cfy blueprints upload -b ves-http /blueprints/k8s-ves.yaml\r
143 \r
144 - Deploy blueprint\r
145     .. code-block:: bash\r
146 \r
147         cfy install -b ves-http -d ves-http -i /inputs/k8s-ves-inputs.yaml /blueprints/k8s-ves.yaml\r
148 \r
149 Using external TLS certificates obtained using CMP v2 protocol\r
150 --------------------------------------------------------------\r
151 \r
152 In order to use the X.509 certificates obtained from the CMP v2 server (so called "operator`s certificates"), refer to the following description:\r
153 \r
154 .. toctree::\r
155     :maxdepth: 1\r
156 \r
157       Enabling TLS with external x.509 certificates <../../tls_enablement>\r