.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
+.. _architecture:
Architecture
============
The DMaaP Data Router (DR) provisioning API is an HTTPS-based, REST-like API for creating and managing
DR feeds and subscriptions, which provides a pub/sub architectural model for the transfer of data.
-The DR API also supports `AAF CADI authorization <https://docs.onap.org/en/latest/submodules/aaf/authz.git/docs/sections/architecture/cadi.html#authorization>`_.
-
-To use this feature, the API client must provide a valid AAF AppID / MechID with each request.
-To enable this feature, see the :ref:`configuration` section.
-
-.. note:: In future releases, AAF CADI auth will be enabled by default.
-
Usage Scenarios
---------------
Typically, DR pub clients request the provisioning of a new DR feed.
.. image:: images/dr_pub_flow.png
+Previously, prospective publishers and subscribers would use the DMaaP Bus Controller API, which would call
+the DR provisioning API to manage feeds and subscriptions.
-The DR provisioning API is not meant to be used directly by DR end users (publishers and subscribers)
-for feed / subscription CRUD (create, read, update, delete) operations.
+However, with the deprecation of Message Router, the DMaaP Bus Controller API has also been deprecated and
+DR provisioning has been brought into DR itself. This will be performed through the
+Data Router (DR) provisioning client.
-Instead, prospective publishers and subscribers should use the DMaaP Bus Controller API, which will call
-the DR provisioning API to manage feeds and subscriptions.
+The Data Router (DR) provisioning client runs as a Kubernetes initContainer for ONAP DCAE applications
+that use DR feeds to transfer data between applications. The logic for the client is contained in a script
+that makes requests to the DR provisioning node using the DR provisioning API.
+(See the `API documentation <https://docs.onap.org/projects/onap-dmaap-datarouter/en/london/apis/data-router-api.html#dmaap-data-router-api>`_ for details.)
+
+The DR provisioning client (drprov-client) replaces the DMaaP Bus Controller client (dbc-client).
+The dbc-client used the DMaaP Bus Controller to provision data router feeds and subscribers and
+DMaaP Message Router topics and clients. The Message Router provisioning functionality is no longer needed,
+and Bus Controller will be deprecated and removed from the ONAP tree.
- .. image:: images/dr_bc_prov.png
+The provisioning logic is in a script called drprov-client.sh. This script is set as the
+entrypoint for the initContainer.
+The drprov-client performs two high-level tasks:
-See DMaaP Bus Controller API docs for more information:
+- Makes requests to the DR provisioning API to create feeds and subscriptions and captures the API's responses.
+- Uses the API's response to update a component's configuration file by replacing placeholders in the file
+ (in the form of environment variable names) with values from the API responses.
-`Bus Controller Feeds API <https://onap.readthedocs.io/en/latest/submodules/dmaap/dbcapi.git/docs/api.html#feeds>`_
+The drprov-client script queries the DR provisioning API to determine if a feed already exists (based on the feed
+name and feed version) and does not attempt to create the feed again. Instead, it retrieves the feed information
+for the existing feed and supplies that information to a component.
-`Bus Controller Subs API <https://onap.readthedocs.io/en/latest/submodules/dmaap/dbcapi.git/docs/api.html#dr-subs>`_
+Similarly, the drprov-client script queries the DR provisioning API to determine if a subscription already exists
+(based on the username, password, and delivery URL for the subscription). If one exists, the script does not create
+a new subscription.
+Refer to `README file <https://gerrit.onap.org/r/gitweb?p=dmaap/datarouter.git;a=blob;f=datarouter-prov-client/README.md>`_
+in drprov-client in the datarouter repo for full details.
High level Architecture
-----------------------
DMaaP DR uses MariaDB as it's storage component for the following:
* DR Provisioning data. (feeds, subscribers, etc.)
- * Historical logging data related to feed activity. (Publish, Delivery, etc.)
\ No newline at end of file
+ * Historical logging data related to feed activity. (Publish, Delivery, etc.)