blob: 1bc0cd8208df2f6b60416e55c37e679bd91a1b93 [file] [log] [blame]
efiacor248a9f12022-10-25 11:46:34 +01001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. Copyright (C) 2022 Nordix Foundation
4
5Architecture
6============
7
8..
9 * This section is used to describe a software component from a high level
10 view of capability, common usage scenarios, and interactions with other
11 components required in the usage scenarios.
12
13 * The architecture section is typically: provided in a platform-component
14 and sdk collections; and referenced from developer and user guides.
15
16 * This note must be removed after content has been added.
17
18
19Capabilities
20------------
21
22The SDC Distribution client is a library that applications can use to simplify the handling of
23distribution related notifications from/to SDC and to download artifacts from SDC based on those notification.
24
25.. note::
26
27 As of version 2.0.0, the client uses kafka as it's message bus to publish/subscribe to/from the
28 relevant SDC distribution topics.
29
30 All previous releases of the client use DMaaP Message Router as it's message bus.
31
32Usage Scenarios
33---------------
34- **Get Distribution Notification event**
35
36 The client polls the relevant NOTIFICATION topic for distribution events sent from SDC.
37
38- **Get Deployment Artifact from SDC**
39
40 Once a new notification event is received, the client will download the relevant artifacts that it
41 has defined as part of it configuration.
42
43- **Send Distribution Status event**
44
45 As part of the processing of the downloaded artifacts, the client will publish it's progress to SDC
46 via the relevant STATUS topic.
47 Once the download has ben successfully completed, the client must publish it's final response
48 COMPONENT_DONE_OK to the STATUS topic.
49
50
51Interactions
52------------
53
54Kafka
55^^^^^
56The client uses kafka as it's messaging bus to publish and subscribe to the relevant SDC topics.
57
vasraza9070d12023-02-21 11:50:01 +000058.. _SDCE-6 Swagger api: https://docs.onap.org/projects/onap-sdc/en/latest/_downloads/ebe3a425ddf8fa5f372ee1cb7ec8409e/openapi-sdce-6.json
59.. _SDCE-7 Swagger api: https://docs.onap.org/projects/onap-sdc/en/latest/_downloads/48c3493c63ae93ebd9d55025f0ba2e85/openapi-sdce-7.json
efiacor248a9f12022-10-25 11:46:34 +010060
61SDC
62^^^
63**The client interacts with the following SDC apis on initialization:**
64
65- ``/sdc/v1/artifactTypes``
66
67 Get the current artifact types from SDC to validate against the clients configured list.
68
69 See `SDCE-6 Swagger api`_ for more details
70
71- ``/sdc/v1/distributionKafkaData``
72
73 Get the kafka distribution config from SDC to be used during publish and subscribe
74
75 See `SDCE-6 Swagger api`_ for more details
76
77.. image:: ../images/sdc_client_init.png
78
79
80
81
82**The client interacts with the following SDC apis during distribution:**
83
84- ``/sdc/v1/catalog/services/{serviceName}/{serviceVersion}/resourceInstances/{resourceInstanceName}/artifacts/{artifactName}``
85
86 Get the artifact for a particular resource instance defined in the artifactUrl of the notification event
87
88 See `SDCE-7 Swagger api`_ for more details
89
90- ``/sdc/v1/catalog/services/{serviceName}/{serviceVersion}/artifacts/{artifactName}``
91
92 Get the artifact defined in the artifactUrl of the notification event
93
94 See `SDCE-7 Swagger api`_ for more details
95
96
97.. image:: ../images/sdc_distrib_flow.png