Documentation for generalised DFC 17/91317/2
authormaximesson <maxime.bonneau@est.tech>
Tue, 23 Jul 2019 09:40:54 +0000 (09:40 +0000)
committermaximesson <maxime.bonneau@est.tech>
Tue, 23 Jul 2019 09:40:54 +0000 (09:40 +0000)
Change-Id: Ic240ebf83c58b2f0dd231bd3933838614f716ff8
Issue-ID: DCAEGEN2-1662
Signed-off-by: maximesson <maxime.bonneau@est.tech>
docs/sections/images/DFC_config.png [new file with mode: 0644]
docs/sections/services/dfc/architecture.rst
docs/sections/services/dfc/configuration.rst
docs/sections/services/dfc/release-notes.rst

diff --git a/docs/sections/images/DFC_config.png b/docs/sections/images/DFC_config.png
new file mode 100644 (file)
index 0000000..517c6c9
Binary files /dev/null and b/docs/sections/images/DFC_config.png differ
index f25b855..5592bf2 100644 (file)
@@ -40,4 +40,10 @@ The event is received from the Message Router (MR), the files are fetched from a
 (DR).
 Both fetching of a file and publishing is retried a number of times with an increasing delay between each attempt.
 After a number of attempts, the DFC will log an error message and give up. Failing of processing of one file does not
-affect the handling of others.
\ No newline at end of file
+affect the handling of others.
+
+Generalized  DFC
+""""""""""""""""
+From version 1.2.1 and onwards, the DFC has more general use. Instead of only managing PM files, any kind of files
+are handled. The 'changeIdentifier' parameter in the file ready VES event (which is reported from the PNFs) is used
+to define the file type of file to be handled.
\ No newline at end of file
index 76e822e..bb60fa2 100644 (file)
 .. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
 .. http://creativecommons.org/licenses/by/4.0\r
 \r
+=============================\r
 Configuration and Performance\r
 =============================\r
 \r
-**datafile** configuration is controlled via a single JSON file called datafile_endpoints.json.\r
-This is located under datafile-app-server/config.\r
-\r
-Json Configuration Explained\r
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r
-\r
-Variables of interest (e.g. variables that should be inspected/modified for a specific runtime environment) are listed below for convenience.  The entire file is provided later in this page for reference.\r
-\r
-dmaapConsumerConfiguration\r
-""""""""""""""""""""""""""\r
-\r
-.. code-block:: json\r
-\r
-  "dmaapHostName": <name of DMaaP/MR host>\r
-  "dmaapPortNumber": <DMaaP/MR host port>\r
-  "dmaapTopicName": "/events/unauthenticated.VES_NOTIFICATION_OUTPUT"\r
-  "dmaapProtocol": "http"\r
-  "dmaapUserName": ""\r
-  "dmaapUserPassword": ""\r
-  "dmaapContentType": "application/json"\r
-  "consumerId": "C12"\r
-  "consumerGroup": "OpenDcae-c12"\r
-  "timeoutMS": -1\r
-  "messageLimit": 1\r
-\r
-dmaapProducerConfiguration\r
-""""""""""""""""""""""""""\r
-\r
-.. code-block:: json\r
-\r
-  "dmaapHostName": <name of DMaaP/DR host>\r
-  "dmaapPortNumber": <DMaaP/DR host port>\r
-  "dmaapTopicName": "publish"\r
-  "dmaapProtocol": "https"\r
-  "dmaapUserName": "dradmin"\r
-  "dmaapUserPassword": "dradmin"\r
-  "dmaapContentType": "application/octet-stream"\r
-\r
-ftpesConfiguration\r
-""""""""""""""""""\r
-\r
-.. code-block:: json\r
-\r
-  "keyCert": <path to DFC certificate>\r
-  "keyPassword": <password for DFC certificate>\r
-  "trustedCa": <path to xNF certificate>\r
-  "trustedCaPassword": <password for xNF certificate>\r
-\r
-securityConfiguration\r
-"""""""""""""""""""""\r
-\r
-.. code-block:: json\r
-\r
-  "trustStorePath": <path to trust store>\r
-  "trustStorePasswordPath": <path to trust store password>\r
-  "keyStorePath": <path to key store>\r
-  "keyStorePasswordPath": <path to key store password>\r
-  "enableDmaapCertAuth": <boolean>. If false, all information above are ignored.\r
-\r
-\r
-\r
-Sample JSON configuration\r
-"""""""""""""""""""""""""\r
-\r
-The format of the JSON configuration that drives all behavior of DFC is probably best described using an example:\r
-\r
-.. code-block:: json\r
-\r
-  {\r
-    "configs": {\r
-      "dmaap": {\r
-        "dmaapConsumerConfiguration": {\r
-          "dmaapHostName": "localhost",\r
-          "dmaapPortNumber": 2222,\r
-          "dmaapTopicName": "/events/unauthenticated.VES_NOTIFICATION_OUTPUT",\r
-          "dmaapProtocol": "http",\r
-          "dmaapUserName": "",\r
-          "dmaapUserPassword": "",\r
-          "dmaapContentType": "application/json",\r
-          "consumerId": "C12",\r
-          "consumerGroup": "OpenDcae-c12",\r
-          "timeoutMS": -1,\r
-          "messageLimit": 1\r
-        },\r
-        "dmaapProducerConfiguration": {\r
-          "dmaapHostName": "localhost",\r
-          "dmaapPortNumber": 3907,\r
-          "dmaapTopicName": "publish",\r
-          "dmaapProtocol": "https",\r
-          "dmaapUserName": "dradmin",\r
-          "dmaapUserPassword": "dradmin",\r
-          "dmaapContentType": "application/octet-stream"\r
-        }\r
-      },\r
-      "ftp": {\r
-            "ftpesConfiguration": {\r
-                "keyCert": "config/dfc.jks",\r
-                "keyPassword": "secret",\r
-                "trustedCa": "config/ftp.jks",\r
-                "trustedCaPassword": "secret"\r
-            }\r
-      },\r
-        "security": {\r
-            "trustStorePath" : "change it",\r
-            "trustStorePasswordPath" : "change it",\r
-            "keyStorePath" : "change it",\r
-            "keyStorePasswordPath" : "change it",\r
-            "enableDmaapCertAuth" : "false"\r
-        }\r
-    }\r
-  }\r
+Configuration\r
+^^^^^^^^^^^^^\r
+By default, DFC handles the "PM_MEAS_FILES" change identifier and publishes these files on the "bulk_pm_feed" feed.\r
+But it can also be configured to handle other change identifiers and publish them to other feeds, see picture below.\r
+\r
+.. image:: ../../images/DFC_config.png\r
+\r
+The configuration of DFC is controlled via a blueprint.\r
+\r
+Blueprint Configuration Explained\r
+"""""""""""""""""""""""""""""""""\r
+\r
+For the communication with the Message Router, the user must provide the **host name**, **port**, and **protocol** of the DMaaP Message router.\r
+\r
+.. code-block:: yaml\r
+  :emphasize-lines: 2,6,10\r
+\r
+    inputs:\r
+      dmaap_mr_host:\r
+        type: string\r
+        description: dmaap messagerouter host\r
+        default: message-router.onap.svc.cluster.local\r
+      dmaap_mr_port:\r
+        type: integer\r
+        description: dmaap messagerouter port\r
+        default: 3904\r
+      dmaap_mr_protocol:\r
+        type: string\r
+        description: dmaap messagerouter protocol\r
+        default: "http"\r
+\r
+The user can also specify which version of DFC to use.\r
+\r
+.. code-block:: yaml\r
+  :emphasize-lines: 2\r
+\r
+    inputs:\r
+      tag_version:\r
+        type: string\r
+        description: DFC image tag/version\r
+        default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.2.0"\r
+\r
+The user can also enable secure communication with the DMaaP Message Router.\r
+\r
+.. code-block:: yaml\r
+  :emphasize-lines: 2\r
+\r
+    inputs:\r
+      secureEnableCert:\r
+        type: boolean\r
+        description: enable certificate based connection with DMaap\r
+        default: false\r
+\r
+DFC can handle multiple change identifiers. This will require to create manually a new block for each change identifier.\r
+\r
+.. code-block:: yaml\r
+  :emphasize-lines: 2\r
+  \r
+    streams_publishes:\r
+      dfcFeed00ChangeIdentifier:\r
+        dmaap_info: <<bulk_pm_feed>>\r
+        type: data_router\r
+\r
+For each feed related to a change identifier the user must provide the **feed name**, and **feed description**.\r
+\r
+.. code-block:: yaml\r
+  :emphasize-lines: 2,6\r
+\r
+    inputs:\r
+      dfcFeed00Name:\r
+        type: string\r
+        description: The name of the feed the files will be published to. Should be used by the subscriber.\r
+        default: "bulk_pm_feed"\r
+      dfcFeed00Description:\r
+        type: string\r
+        description: A description of the feed the files will be published to.\r
+        default: "Feed for Bulk PM files"\r
+\r
+**Note!** The feed name provided should be used by the subscriber/s to set up the subscription to the feed.\r
+\r
+To dynamically create the feeds, DFC uses the DCAE DMaaP plugin. This means that for each feed the user must also add an\r
+item under the "**node_templates**" section of the blueprint. The feed is identified within the blueprint with a feed identifier, "**dfcFeed00**" in the example.\r
+\r
+.. code-block:: yaml\r
+  :emphasize-lines: 2\r
+\r
+    node_templates:\r
+      dfcFeed00:\r
+        type: ccsdk.nodes.Feed\r
+        properties:\r
+          feed_name: { get_input: dfcFeed00Name }\r
+          feed_description: { get_input: dfcFeed00Description }\r
+\r
+To configure DFC micro service itself, the user must also add the change identifier and the feed identifier to the "**application_config**" section\r
+under the tag "**dmaap.dmaapProducerConfiguration**" in the blueprint. **Note!** The identifier should be surrounded by **<<>>** for the feed's configuration to be bound to the DFC configuration in CBS.\r
+\r
+.. code-block:: yaml\r
+  :emphasize-lines: 4\r
+\r
+          application_config:\r
+            dmaap.dmaapProducerConfiguration:\r
+              - changeIdentifier: {get_input: dfcFeed00ChangeIdentifier}\r
+                feedInfo: <<dfcFeed00>>\r
+\r
+And, lastly, to set up the publication to the feed, the feed identifier must be added to the "**streams_publishes**" section\r
+of the blueprint.\r
+\r
+.. code-block:: yaml\r
+  :emphasize-lines: 2\r
+\r
+          streams_publishes:\r
+            - name: dfcFeed00\r
+              type: data_router\r
+              location: "loc00"\r
+\r
+Sample blueprint configuration\r
+""""""""""""""""""""""""""""""\r
+\r
+The format of the blueprint configuration that drives all behavior of DFC is probably best described using an example.\r
+The blueprint below configures DFC to handle the two feeds shown in the picture above.\r
+\r
+.. code-block:: yaml\r
+\r
+    inputs:\r
+      dmaap_mr_host:\r
+        type: string\r
+        description: dmaap messagerouter host\r
+        default: message-router.onap.svc.cluster.local\r
+      dmaap_mr_port:\r
+        type: integer\r
+        description: dmaap messagerouter port\r
+        default: 3904\r
+      dmaap_mr_protocol:\r
+        type: string\r
+        description: dmaap messagerouter protocol\r
+        default: "http"\r
+      tag_version:\r
+        type: string\r
+        description: DFC image tag/version\r
+        default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.2.0"\r
+      replicas:\r
+        type: integer\r
+        description: number of instances\r
+        default: 1\r
+      secureEnableCert:\r
+        type: boolean\r
+        description: enable certificate based connection with DMaap\r
+        default: false\r
+      dfcFeed00Name:\r
+        type: string\r
+        description: The name of the feed the files will be published to. Should be used by the subscriber.\r
+        default: "bulk_pm_feed"\r
+      dfcFeed00Description:\r
+        type: string\r
+        description: A description of the feed the files will be published to.\r
+        default: "Feed for Bulk PM files"\r
+      dfcFeed01Name:\r
+        type: string\r
+        description: The name of the feed the files will be published to. Should be used by the subscriber.\r
+        default: "log_feed"\r
+      dfcFeed01Description:\r
+        type: string\r
+        description: A description of the feed the files will be published to.\r
+        default: "Feed for log files"\r
+\r
+    node_templates:\r
+      dfcFeed00:\r
+        type: ccsdk.nodes.Feed\r
+        properties:\r
+          feed_name: { get_input: dfcFeed00Name }\r
+          feed_description: { get_input: dfcFeed00Description }\r
+      dfcFeed01:\r
+        type: ccsdk.nodes.Feed\r
+        properties:\r
+          feed_name: { get_input: dfcFeed01Name }\r
+          feed_description: { get_input: dfcFeed01Description }\r
+\r
+      datafile-collector:\r
+        type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\r
+\r
+        relationships:\r
+          - type: ccsdk.relationships.publish_files\r
+            target: dfcFeed00\r
+          - type: ccsdk.relationships.publish_files\r
+            target: dfcFeed01\r
+\r
+        interfaces:\r
+          cloudify.interfaces.lifecycle:\r
+            start:\r
+              inputs:\r
+                ports:\r
+                  - concat: ["8100:0"]\r
+                  - concat: ["8433:0"]\r
+\r
+        properties:\r
+          service_component_type: 'dcae-datafile'\r
+          application_config:\r
+            dmaap.security.enableDmaapCertAuth: { get_input: secureEnableCert }\r
+            streams_publishes:\r
+              dfcFeed00ChangeIdentifier:\r
+                dmaap_info: <<dfcFeed00>>\r
+                type: data_router\r
+              dfcFeed01ChangeIdentifier:\r
+                dmaap_info: <<dfcFeed01>>\r
+                type: data_router\r
+            streams_subscribes:\r
+              dmaap_subscriber:\r
+                type:\r
+                  "message_router"\r
+                dmaap_info:\r
+                  topic_url:\r
+                    { concat: [{ get_input: dmaap_mr_protocol },"://",{ get_input: dmaap_mr_host },\r
+                               ":",{ get_input: dmaap_mr_port },"/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"]}\r
+          streams_publishes:\r
+            - name: dfcFeed00\r
+              type: data_router\r
+              location: "loc00"\r
+            - name: dfcFeed01\r
+              type: data_router\r
+              location: "loc00"\r
 \r
 Performance\r
 ^^^^^^^^^^^\r
index a0277d8..0025b83 100644 (file)
@@ -4,6 +4,12 @@
 Release Notes
 =============
 
+Version 1.2.1
+-------------
+
+The DFC is now generalized: it can handle any kind of files, not only PM files.
+
+
 Version 1.1.3
 -------------