update link to upper-constraints.txt
[dcaegen2.git] / docs / sections / services / pm-mapper / installation-helm.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. _pm-mapper-installation-helm:
4
5 PM-Mapper Helm Installation
6 ===========================
7
8 PM mapper is a microservice that can be installed via Helm.
9 The chart files are hosted in `OOM <https://gerrit.onap.org/r/gitweb?p=oom.git;a=tree;f=kubernetes/dcaegen2-services/components/dcae-pm-mapper>`_ repository.
10
11     Example command:
12
13 .. code-block:: bash
14
15         helm -n onap install dev-dcaegen2-services-pm-mapper -f <custom values filename> --set global.centralizedLoggingEnabled=false dcaegen2-services/components/dcae-pm-mapper/
16
17
18 Dependencies
19 ^^^^^^^^^^^^
20
21 List of services which should be running prior PM-Mapper installation:
22
23     - DMaaP Message Router
24     - DMaaP Data Router
25     - DMaaP Bus Controller post install jobs should have completed successfully (executed as part of an OOM install).
26     - Data File Collector
27
28 Configuration
29 ^^^^^^^^^^^^^
30
31 PM-Mapper uses SDK's Config Binding Service client for initial and periodical configuration application.
32 Consul is not needed anymore. It is used as a second choice source of configuration (if the default one is unavailable).
33 By default, a ConfigMap is used to load, and later change the configuration in runtime.
34
35 The location of the configuration file should be set in ``CBS_CLIENT_CONFIG_PATH`` env, for example:
36
37     ``CBS_CLIENT_CONFIG_PATH: /app-config-input/application_config.yaml``
38
39 Example yaml file with PM-Mapper configuration:
40
41 .. code-block:: yaml
42
43     pm-mapper-filter:
44       filters:
45         - pmDefVsn: "1.0"
46           nfType: "gnb"
47           vendor: "Nokia"
48           measTypes:
49           - attTCHSeizures
50           - succTCHSeizures2
51           - succImmediateAssignProcs8
52     key_store_path: "/opt/app/pm-mapper/etc/certs/cert.jks"
53     key_store_pass_path: "/opt/app/pm-mapper/etc/certs/jks.pass"
54     trust_store_path: "/opt/app/pm-mapper/etc/certs/trust.jks"
55     trust_store_pass_path: "/opt/app/pm-mapper/etc/certs/trust.pass"
56     dmaap_dr_delete_endpoint: "https://dmaap-dr-node:8443/delete"
57     dmaap_dr_feed_name: "1"
58     aaf_identity: "aaf_admin@people.osaaf.org"
59     aaf_password: "demo123456!"
60     enable_http: true,
61     streams_publishes:
62       dmaap_publisher:
63         type: "message_router"
64         dmaap_info:
65           topic_url: "http://message-router:3904/events/org.onap.dmaap.mr.VES_PM"
66           client_role: "org.onap.dcae.pmPublisher"
67           location: "csit-pmmapper"
68           client_id: "1562763644939"
69     streams_subscribes:
70       dmaap_subscriber:
71         type: "data_router"
72         dmaap_info:
73           username: "username"
74           password: "password"
75           location: "csit-pmmapper"
76           delivery_url: "http://dcae-pm-mapper:8081/delivery"
77           subscriber_id: 1
78
79 Configuration update
80 ^^^^^^^^^^^^^^^^^^^^
81
82 The configuration update process is very straightforward.
83 The only step is to modify the Config Map which contains the configuration and save the change. PM-Mapper will detect the new configuration values after a while.
84 It should be visible in PM-Mapper logs, for example:
85
86 .. code-block:: none
87
88     ...
89     2022-02-11T08:04:02.627Z    main    INFO    org.onap.dcaegen2.services.sdk.rest.services.cbs.client.impl.CbsClientConfigMap         Got successful output from ConfigMap file
90     2022-02-11T08:04:02.627Z    main    INFO    org.onap.dcaegen2.services.pmmapper.config.ConfigHandler                Attempt to process configuration object
91     2022-02-11T08:04:02.643Z    main    INFO    org.onap.dcaegen2.services.pmmapper.config.ConfigHandler                PM-mapper configuration processed successful
92     2022-02-11T08:04:02.643Z    main    INFO    org.onap.dcaegen2.services.pmmapper.config.ConfigHandler                Mapper configuration:\nMapperConfig{enableHttp=true, keyStorePath='/opt/app/pm-mapper/etc/certs/cert.jks', keyStorePassPath='/opt/app/pm-mapper/etc/certs/jks.pass', trustStorePath='/opt/app/pm-mapper/etc/certs/trust.jks', trustStorePassPath='/opt/app/pm-mapper/etc/certs/trust.pass', dmaapDRDeleteEndpoint='https://dmaap-dr-node:8443/delete', filterConfig=MeasFilterConfig(filters=[]), aafUsername='aaf_admin@people.osaaf.org', aafPassword= *****, subscriberConfig=SubscriberConfig{username=username, password= *****, drLocation='csit-pmmapper', deliveryUrl='http://dcae-pm-mapper:8081/delivery', subscriberId='1'}, publisherConfig=PublisherConfig(topicUrl=http://message-router:3904/events/org.onap.dmaap.mr.VES_PM, clientRole=org.onap.dcae.pmPublisher, clientId=1562763644939, clusterLocation=csit-pmmapper)}
93     ...
94
95 This logs fragment proves that the configuration source is Config Map: ``Got successful output from ConfigMap file``.
96 It also prints the current configuration (the last log line above). PM-Mapper keeps checking the configuration file periodically (every 60s).