Documentation for generalised DFC
[dcaegen2.git] / docs / sections / services / dfc / configuration.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
2 .. http://creativecommons.org/licenses/by/4.0\r
3 \r
4 =============================\r
5 Configuration and Performance\r
6 =============================\r
7 \r
8 Configuration\r
9 ^^^^^^^^^^^^^\r
10 By default, DFC handles the "PM_MEAS_FILES" change identifier and publishes these files on the "bulk_pm_feed" feed.\r
11 But it can also be configured to handle other change identifiers and publish them to other feeds, see picture below.\r
12 \r
13 .. image:: ../../images/DFC_config.png\r
14 \r
15 The configuration of DFC is controlled via a blueprint.\r
16 \r
17 Blueprint Configuration Explained\r
18 """""""""""""""""""""""""""""""""\r
19 \r
20 For the communication with the Message Router, the user must provide the **host name**, **port**, and **protocol** of the DMaaP Message router.\r
21 \r
22 .. code-block:: yaml\r
23   :emphasize-lines: 2,6,10\r
24 \r
25     inputs:\r
26       dmaap_mr_host:\r
27         type: string\r
28         description: dmaap messagerouter host\r
29         default: message-router.onap.svc.cluster.local\r
30       dmaap_mr_port:\r
31         type: integer\r
32         description: dmaap messagerouter port\r
33         default: 3904\r
34       dmaap_mr_protocol:\r
35         type: string\r
36         description: dmaap messagerouter protocol\r
37         default: "http"\r
38 \r
39 The user can also specify which version of DFC to use.\r
40 \r
41 .. code-block:: yaml\r
42   :emphasize-lines: 2\r
43 \r
44     inputs:\r
45       tag_version:\r
46         type: string\r
47         description: DFC image tag/version\r
48         default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.2.0"\r
49 \r
50 The user can also enable secure communication with the DMaaP Message Router.\r
51 \r
52 .. code-block:: yaml\r
53   :emphasize-lines: 2\r
54 \r
55     inputs:\r
56       secureEnableCert:\r
57         type: boolean\r
58         description: enable certificate based connection with DMaap\r
59         default: false\r
60 \r
61 DFC can handle multiple change identifiers. This will require to create manually a new block for each change identifier.\r
62 \r
63 .. code-block:: yaml\r
64   :emphasize-lines: 2\r
65   \r
66     streams_publishes:\r
67       dfcFeed00ChangeIdentifier:\r
68         dmaap_info: <<bulk_pm_feed>>\r
69         type: data_router\r
70 \r
71 For each feed related to a change identifier the user must provide the **feed name**, and **feed description**.\r
72 \r
73 .. code-block:: yaml\r
74   :emphasize-lines: 2,6\r
75 \r
76     inputs:\r
77       dfcFeed00Name:\r
78         type: string\r
79         description: The name of the feed the files will be published to. Should be used by the subscriber.\r
80         default: "bulk_pm_feed"\r
81       dfcFeed00Description:\r
82         type: string\r
83         description: A description of the feed the files will be published to.\r
84         default: "Feed for Bulk PM files"\r
85 \r
86 **Note!** The feed name provided should be used by the subscriber/s to set up the subscription to the feed.\r
87 \r
88 To dynamically create the feeds, DFC uses the DCAE DMaaP plugin. This means that for each feed the user must also add an\r
89 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
90 \r
91 .. code-block:: yaml\r
92   :emphasize-lines: 2\r
93 \r
94     node_templates:\r
95       dfcFeed00:\r
96         type: ccsdk.nodes.Feed\r
97         properties:\r
98           feed_name: { get_input: dfcFeed00Name }\r
99           feed_description: { get_input: dfcFeed00Description }\r
100 \r
101 To configure DFC micro service itself, the user must also add the change identifier and the feed identifier to the "**application_config**" section\r
102 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
103 \r
104 .. code-block:: yaml\r
105   :emphasize-lines: 4\r
106 \r
107           application_config:\r
108             dmaap.dmaapProducerConfiguration:\r
109               - changeIdentifier: {get_input: dfcFeed00ChangeIdentifier}\r
110                 feedInfo: <<dfcFeed00>>\r
111 \r
112 And, lastly, to set up the publication to the feed, the feed identifier must be added to the "**streams_publishes**" section\r
113 of the blueprint.\r
114 \r
115 .. code-block:: yaml\r
116   :emphasize-lines: 2\r
117 \r
118           streams_publishes:\r
119             - name: dfcFeed00\r
120               type: data_router\r
121               location: "loc00"\r
122 \r
123 Sample blueprint configuration\r
124 """"""""""""""""""""""""""""""\r
125 \r
126 The format of the blueprint configuration that drives all behavior of DFC is probably best described using an example.\r
127 The blueprint below configures DFC to handle the two feeds shown in the picture above.\r
128 \r
129 .. code-block:: yaml\r
130 \r
131     inputs:\r
132       dmaap_mr_host:\r
133         type: string\r
134         description: dmaap messagerouter host\r
135         default: message-router.onap.svc.cluster.local\r
136       dmaap_mr_port:\r
137         type: integer\r
138         description: dmaap messagerouter port\r
139         default: 3904\r
140       dmaap_mr_protocol:\r
141         type: string\r
142         description: dmaap messagerouter protocol\r
143         default: "http"\r
144       tag_version:\r
145         type: string\r
146         description: DFC image tag/version\r
147         default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.2.0"\r
148       replicas:\r
149         type: integer\r
150         description: number of instances\r
151         default: 1\r
152       secureEnableCert:\r
153         type: boolean\r
154         description: enable certificate based connection with DMaap\r
155         default: false\r
156       dfcFeed00Name:\r
157         type: string\r
158         description: The name of the feed the files will be published to. Should be used by the subscriber.\r
159         default: "bulk_pm_feed"\r
160       dfcFeed00Description:\r
161         type: string\r
162         description: A description of the feed the files will be published to.\r
163         default: "Feed for Bulk PM files"\r
164       dfcFeed01Name:\r
165         type: string\r
166         description: The name of the feed the files will be published to. Should be used by the subscriber.\r
167         default: "log_feed"\r
168       dfcFeed01Description:\r
169         type: string\r
170         description: A description of the feed the files will be published to.\r
171         default: "Feed for log files"\r
172 \r
173     node_templates:\r
174       dfcFeed00:\r
175         type: ccsdk.nodes.Feed\r
176         properties:\r
177           feed_name: { get_input: dfcFeed00Name }\r
178           feed_description: { get_input: dfcFeed00Description }\r
179       dfcFeed01:\r
180         type: ccsdk.nodes.Feed\r
181         properties:\r
182           feed_name: { get_input: dfcFeed01Name }\r
183           feed_description: { get_input: dfcFeed01Description }\r
184 \r
185       datafile-collector:\r
186         type: dcae.nodes.ContainerizedServiceComponentUsingDmaap\r
187 \r
188         relationships:\r
189           - type: ccsdk.relationships.publish_files\r
190             target: dfcFeed00\r
191           - type: ccsdk.relationships.publish_files\r
192             target: dfcFeed01\r
193 \r
194         interfaces:\r
195           cloudify.interfaces.lifecycle:\r
196             start:\r
197               inputs:\r
198                 ports:\r
199                   - concat: ["8100:0"]\r
200                   - concat: ["8433:0"]\r
201 \r
202         properties:\r
203           service_component_type: 'dcae-datafile'\r
204           application_config:\r
205             dmaap.security.enableDmaapCertAuth: { get_input: secureEnableCert }\r
206             streams_publishes:\r
207               dfcFeed00ChangeIdentifier:\r
208                 dmaap_info: <<dfcFeed00>>\r
209                 type: data_router\r
210               dfcFeed01ChangeIdentifier:\r
211                 dmaap_info: <<dfcFeed01>>\r
212                 type: data_router\r
213             streams_subscribes:\r
214               dmaap_subscriber:\r
215                 type:\r
216                   "message_router"\r
217                 dmaap_info:\r
218                   topic_url:\r
219                     { concat: [{ get_input: dmaap_mr_protocol },"://",{ get_input: dmaap_mr_host },\r
220                                ":",{ get_input: dmaap_mr_port },"/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"]}\r
221           streams_publishes:\r
222             - name: dfcFeed00\r
223               type: data_router\r
224               location: "loc00"\r
225             - name: dfcFeed01\r
226               type: data_router\r
227               location: "loc00"\r
228 \r
229 Performance\r
230 ^^^^^^^^^^^\r
231 \r
232 To see the performance of DFC, see "`Datafile Collector (DFC) performance baseline results`_".\r
233 \r
234 .. _Datafile Collector (DFC) performance baseline results: https://wiki.onap.org/display/DW/Datafile+Collector+%28DFC%29+performance+baseline+results