summaryrefslogtreecommitdiffstats
path: root/docs/sections/services/ves-hv/run-time-configuration.rst
blob: bac68ecf125dd11ab66bc8c37fb14089320b4f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0

.. _run_time_configuration:

Run-Time configuration
======================

HV-VES dynamic configuration is primarily meant to provide DMaaP Connection Objects (see :ref:`dmaap-connection-objects`).
These objects contain information necessary to route received VES Events to correct Kafka topic. This metadata will be later referred to as Routing definition.

Collector uses DCAE-SDK internally, to fetch configuration from Config Binding Service.

HV-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).

After first request, HV-VES asks for configuration in fixed intervals, configurable from file configuration (**requestInterval**). By default interval is set to 5 seconds.

In 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.


Configuration format
--------------------

Following JSON format presents dynamic configuration options recognized by HV-VES Collector.

.. literalinclude:: resources/dynamic-configuration.json
    :language: json

Fields have the same meaning as in the configuration file with only difference being Routing definition.

.. 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.

Routing
-------

For 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**.

When receiving a VES Event from client, collector checks if domain 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.

For more information, see :ref:`supported_domains`.

Providing configuration during OOM deployment
---------------------------------------------

The configuration is created from HV-VES Cloudify blueprint by specifying **application_config** node during ONAP OOM/Kubernetes deployment. Example of the node specification:

.. literalinclude:: resources/blueprint-snippet.yaml
    :language: yaml