aboutsummaryrefslogtreecommitdiffstats
path: root/docs/sections/architecture.rst
blob: a04626df67846b630dca9371e30994a44f60a22e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. Copyright (C) 2022 Nordix Foundation

Architecture
============

..
   * This section is used to describe a software component from a high level
     view of capability, common usage scenarios, and interactions with other
     components required in the usage scenarios.

   * The architecture section is typically: provided in a platform-component
     and sdk collections; and referenced from developer and user guides.

   * This note must be removed after content has been added.


Capabilities
------------

The SDC Distribution client is a library that applications can use to simplify the handling of
distribution related notifications from/to SDC and to download artifacts from SDC based on those notification.

.. note::

    As of version 2.0.0, the client uses kafka as it's message bus to publish/subscribe to/from the
    relevant SDC distribution topics.

    All previous releases of the client use DMaaP Message Router as it's message bus.

Usage Scenarios
---------------
- **Get Distribution Notification event**

    The client polls the relevant NOTIFICATION topic for distribution events sent from SDC.

- **Get Deployment Artifact from SDC**

    Once a new notification event is received, the client will download the relevant artifacts that it
    has defined as part of it configuration.

- **Send Distribution Status event**

    As part of the processing of the downloaded artifacts, the client will publish it's progress to SDC
    via the relevant STATUS topic.
    Once the download has ben successfully completed, the client must publish it's final response
    COMPONENT_DONE_OK to the STATUS topic.


Interactions
------------

Kafka
^^^^^
The client uses kafka as it's messaging bus to publish and subscribe to the relevant SDC topics.

.. _SDCE-6 Swagger api: https://docs.onap.org/projects/onap-sdc/en/latest/_downloads/4eca2a3848d70e58566570a5ef889efb/swagger-sdce-6.json
.. _SDCE-7 Swagger api: https://docs.onap.org/projects/onap-sdc/en/latest/_downloads/542e76906472dae2e00adfad5fc7d879/swagger-sdce-7.json

SDC
^^^
**The client interacts with the following SDC apis on initialization:**

- ``/sdc/v1/artifactTypes``

    Get the current artifact types from SDC to validate against the clients configured list.

    See `SDCE-6 Swagger api`_ for more details

- ``/sdc/v1/distributionKafkaData``

    Get the kafka distribution config from SDC to be used during publish and subscribe

    See `SDCE-6 Swagger api`_ for more details

.. image:: ../images/sdc_client_init.png




**The client interacts with the following SDC apis during distribution:**

- ``/sdc/v1/catalog/services/{serviceName}/{serviceVersion}/resourceInstances/{resourceInstanceName}/artifacts/{artifactName}``

    Get the artifact for a particular resource instance defined in the artifactUrl of the notification event

    See `SDCE-7 Swagger api`_ for more details

- ``/sdc/v1/catalog/services/{serviceName}/{serviceVersion}/artifacts/{artifactName}``

    Get the artifact defined in the artifactUrl of the notification event

    See `SDCE-7 Swagger api`_ for more details


.. image:: ../images/sdc_distrib_flow.png