Doc updates for London
[dcaegen2.git] / docs / sections / services / ves-hv / run-time-configuration.rst
index 76d622c..4da0b10 100644 (file)
@@ -6,54 +6,46 @@
 Run-Time configuration
 ======================
 
-(see :ref:`deployment`)
+HV-VES dynamic configuration is primarily meant to provide DMaaP Connection Objects (see :ref:`dmaap-connection-objects`).
 
-HV-VES can fetch configuration directly from Consul service in the following JSON format:
+.. note:: Kafka config info.
+    In the case of HV-VES, this configuration method is purely used as a generic reference.
+    The underlying kafka connection config is managed as part of the dcea helm configuration.
 
-.. code-block:: json
+These objects contain information necessary to route received VES Events to correct Kafka topic.
+This metadata will be later referred to as Routing definition.
 
-    {
-        "dmaap.kafkaBootstrapServers": "message-router-kafka:9093",
-        "collector.routing": [
-                {
-                    "fromDomain": "perf3gpp",
-                    "toTopic": "HV_VES_PERF3GPP"
-                },
-                {
-                    "fromDomain": "heartbeat",
-                    "toTopic": "HV_VES_HEARTBEAT"
-                },
-                ...
-        ]
-    }
+Collector uses DCAE-SDK internally, to fetch configuration from Config Binding Service.
 
-HV-VES does not verify the correctness of configuration data and uses them as is, in particular:
+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).
 
-- **KafkaBootstrapServers** is used as host name and port for publishing events to Kafka service.
-- Every **routing** array object specifies one event publishing route.
+After first request, HV-VES asks for configuration in fixed intervals, configurable from file configuration (**requestInterval**). By default interval is set to 5 seconds.
 
-  - **fromDomain** node should be a case-sensitive string of single domain taken from VES Common Event Header specification.
-  - **toTopic** should be a case-sensitive string of Kafka topic.
-  - When HV-VES receives VES Event, it checks the domain contained in it. If the route from that domain to any topic exists in configuration, then HV-VES publishes that event to topic in that route.
-  - If there are two routes from the same domain to different topics, then it is undefined which route will be used.
+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.
 
-The configuration is created from HV-VES Cloudify blueprint by specifying **application_config** node during ONAP OOM/Kubernetes deployment. Example of the node specification:
 
-.. code-block:: YAML
+Configuration format
+--------------------
 
-    node_templates:
-      hv-ves:
-        properties:
-          application_config:
-            dmaap.kafkaBootstrapServers: message-router-kafka:9092
-            collector.routing:
-              fromDomain: perf3gpp
-              toTopic: HV_VES_PERF3GPP
+Following JSON format presents dynamic configuration options recognized by HV-VES Collector.
 
-Endpoint on which HV-VES seeks configuration can be set during deployment as described in :ref:`deployment`.
+.. literalinclude:: resources/dynamic-configuration.json
+    :language: json
 
-HV-VES waits 10 seconds (default, configurable during deplyoment with **first-request-delay** option, see :ref:`deployment`) before the first attempt to retrieve configuration from Consul. This is to prevent possible synchronization issues. During that time HV-VES declines any connection attempts from xNF (VNF/PNF).
+Fields have the same meaning as in the configuration file with only difference being Routing definition.
 
-After first request, HV-VES asks for configuration in fixed intervals, configurable from command line (**request-interval**). By defualt interval is set to 5 seconds.
+.. 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.
 
-In case of failing to retrieve configuration, collector temporarily extends this interval and retries. After five unsuccessfull attempts, container becomes unhealthy and cannot recover. HV-VES in this state is unusable and the container should be restarted.
+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 (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.
+
+For more information, see :ref:`supported_domains`.
+
+Providing configuration during OOM deployment
+---------------------------------------------
+
+The configuration is created from HV-VES Helm charts defined under **applicationConfig**  during ONAP OOM/Kubernetes deployment.