blob: 830ed66498e7a32359d625b01216395bdcce803d [file] [log] [blame]
kjaniak53ba1702018-10-25 14:25:13 +02001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3
4.. _run_time_configuration:
5
6Run-Time configuration
7======================
8
Filip Krzywka566342c2019-03-29 11:25:07 +01009HV-VES dynamic configuration is primarily meant to provide DMaaP Connection Objects (see :ref:`dmaap-connection-objects`).
efiacor9c1961e2022-12-12 12:07:42 +000010
11.. note:: Kafka config info.
12 In the case of HV-VES, this configuration method is purely used as a generic reference.
13 The underlying kafka connection config is managed as part of the dcea helm configuration.
14
15These objects contain information necessary to route received VES Events to correct Kafka topic.
16This metadata will be later referred to as Routing definition.
kjaniak53ba1702018-10-25 14:25:13 +020017
Jakub Dudycz0c997922019-05-09 13:17:34 +020018Collector uses DCAE-SDK internally, to fetch configuration from Config Binding Service.
kjaniak53ba1702018-10-25 14:25:13 +020019
Filip Krzywka12acf3e2019-03-19 15:53:15 +010020HV-VES waits 10 seconds (default, configurable during deployment with **firstRequestDelay** option, see :ref:`configuration_file`) before the first attempt to retrieve configuration from CBS. This is to prevent possible synchronization issues. During that time HV-VES declines any connection attempts from xNF (VNF/PNF).
kjaniak53ba1702018-10-25 14:25:13 +020021
Filip Krzywka12acf3e2019-03-19 15:53:15 +010022After first request, HV-VES asks for configuration in fixed intervals, configurable from file configuration (**requestInterval**). By default interval is set to 5 seconds.
kjaniak53ba1702018-10-25 14:25:13 +020023
Filip Krzywka12acf3e2019-03-19 15:53:15 +010024In case of failing to retrieve configuration, collector retries the action. After five unsuccessful attempts, container becomes unhealthy and cannot recover. HV-VES in this state is unusable and the container should be restarted.
Filip Krzywka566342c2019-03-29 11:25:07 +010025
26
27Configuration format
28--------------------
29
30Following JSON format presents dynamic configuration options recognized by HV-VES Collector.
Filip Krzywka566342c2019-03-29 11:25:07 +010031
32.. literalinclude:: resources/dynamic-configuration.json
33 :language: json
34
Jakub Dudycz0c997922019-05-09 13:17:34 +020035Fields have the same meaning as in the configuration file with only difference being Routing definition.
36
37.. note:: There is no verification of the data correctness (e.g. if specified security files are present on machine) and thus invalid data can result in service malfunctioning or even container shutdown.
Filip Krzywka566342c2019-03-29 11:25:07 +010038
39Routing
40-------
41
42For every JSON key-object pair defined in **"stream_publishes"**, the key is used as domain and related object is used to setup Kafka's bootstrap servers and Kafka topic **for this domain**.
43
Michal Banka0e967e22021-04-14 09:29:35 +020044When receiving a VES Event from client, collector checks if domain (or stndDefinedNamespace when domain is 'stndDefined') from the event corresponds to any domain from Routing and publishes this event into related topic. If there is no match, the event is dropped. If there are two routes from the same domain to different topics, then it is undefined which route is used.
Filip Krzywka566342c2019-03-29 11:25:07 +010045
Jakub Dudycz0c997922019-05-09 13:17:34 +020046For more information, see :ref:`supported_domains`.
Filip Krzywka566342c2019-03-29 11:25:07 +010047
48Providing configuration during OOM deployment
49---------------------------------------------
50
51The configuration is created from HV-VES Cloudify blueprint by specifying **application_config** node during ONAP OOM/Kubernetes deployment. Example of the node specification:
52
53.. literalinclude:: resources/blueprint-snippet.yaml
efiacor9c1961e2022-12-12 12:07:42 +000054 :language: yaml