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`). |
efiacor | 9c1961e | 2022-12-12 12:07:42 +0000 | [diff] [blame^] | 10 | |
| 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 | |
| 15 | These objects contain information necessary to route received VES Events to correct Kafka topic. |
| 16 | This metadata will be later referred to as Routing definition. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 17 | |
Jakub Dudycz | 0c99792 | 2019-05-09 13:17:34 +0200 | [diff] [blame] | 18 | Collector uses DCAE-SDK internally, to fetch configuration from Config Binding Service. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 19 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 20 | 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] | 21 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 22 | 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] | 23 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 24 | 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] | 25 | |
| 26 | |
| 27 | Configuration format |
| 28 | -------------------- |
| 29 | |
| 30 | Following JSON format presents dynamic configuration options recognized by HV-VES Collector. |
Filip Krzywka | 566342c | 2019-03-29 11:25:07 +0100 | [diff] [blame] | 31 | |
| 32 | .. literalinclude:: resources/dynamic-configuration.json |
| 33 | :language: json |
| 34 | |
Jakub Dudycz | 0c99792 | 2019-05-09 13:17:34 +0200 | [diff] [blame] | 35 | Fields 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 Krzywka | 566342c | 2019-03-29 11:25:07 +0100 | [diff] [blame] | 38 | |
| 39 | Routing |
| 40 | ------- |
| 41 | |
| 42 | 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**. |
| 43 | |
Michal Banka | 0e967e2 | 2021-04-14 09:29:35 +0200 | [diff] [blame] | 44 | When 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 Krzywka | 566342c | 2019-03-29 11:25:07 +0100 | [diff] [blame] | 45 | |
Jakub Dudycz | 0c99792 | 2019-05-09 13:17:34 +0200 | [diff] [blame] | 46 | For more information, see :ref:`supported_domains`. |
Filip Krzywka | 566342c | 2019-03-29 11:25:07 +0100 | [diff] [blame] | 47 | |
| 48 | Providing configuration during OOM deployment |
| 49 | --------------------------------------------- |
| 50 | |
| 51 | The 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 |
efiacor | 9c1961e | 2022-12-12 12:07:42 +0000 | [diff] [blame^] | 54 | :language: yaml |