kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 1 | .. 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 | |
| 6 | Run-Time configuration |
| 7 | ====================== |
| 8 | |
Filip Krzywka | 566342c | 2019-03-29 11:25:07 +0100 | [diff] [blame] | 9 | HV-VES dynamic configuration is primarily meant to provide DMaaP Connection Objects (see :ref:`dmaap-connection-objects`). |
| 10 | These objects contain information necessary to route received VES Events to correct Kafka topic. This metadata will be later referred to as Routing definition. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 11 | |
Filip Krzywka | 566342c | 2019-03-29 11:25:07 +0100 | [diff] [blame] | 12 | Collector internally uses DCAE-SDK to fetch configuration from Config Binding Service. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 13 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 14 | 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). |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 15 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 16 | After first request, HV-VES asks for configuration in fixed intervals, configurable from file configuration (**requestInterval**). By default interval is set to 5 seconds. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 17 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 18 | 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. |
Filip Krzywka | 566342c | 2019-03-29 11:25:07 +0100 | [diff] [blame] | 19 | |
| 20 | |
| 21 | Configuration format |
| 22 | -------------------- |
| 23 | |
| 24 | Following JSON format presents dynamic configuration options recognized by HV-VES Collector. |
| 25 | Note that 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. |
| 26 | |
| 27 | .. literalinclude:: resources/dynamic-configuration.json |
| 28 | :language: json |
| 29 | |
| 30 | Fields have same meaning as in file configuration with only difference being Routing definition. |
| 31 | |
| 32 | Routing |
| 33 | ------- |
| 34 | |
| 35 | 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**. |
| 36 | |
| 37 | Collector when receiving VES Event from client checks if domain from the event corresponds to any from Routing and publishes this event onto 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 will be used. |
| 38 | |
| 39 | For more informations see :ref:`supported_domains` |
| 40 | |
| 41 | Providing configuration during OOM deployment |
| 42 | --------------------------------------------- |
| 43 | |
| 44 | The configuration is created from HV-VES Cloudify blueprint by specifying **application_config** node during ONAP OOM/Kubernetes deployment. Example of the node specification: |
| 45 | |
| 46 | .. literalinclude:: resources/blueprint-snippet.yaml |
| 47 | :language: yaml |