Merge "Added policyNodes, db, tls support"
[dcaegen2/platform.git] / mod / bpgenerator / TestCases / helloworld / blueprint / helloworld_changed_with_dmaap.yaml
1 #  ============LICENSE_START=======================================================
2 #    org.onap.dcae
3 #    ================================================================================
4 #    Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
5 #    ================================================================================
6 #    Licensed under the Apache License, Version 2.0 (the "License");
7 #    you may not use this file except in compliance with the License.
8 #    You may obtain a copy of the License at
9 #
10 #    http://www.apache.org/licenses/LICENSE-2.0
11 #
12 #    Unless required by applicable law or agreed to in writing, software
13 #    distributed under the License is distributed on an "AS IS" BASIS,
14 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 #    See the License for the specific language governing permissions and
16 #    limitations under the License.
17 #    ============LICENSE_END=========================================================
18 #
19 #description: Hello World mS for subscribing the data from local DMaaP, DR or MR, processing them and publishing them as PM files to local DMaaP DR
20 #blueprint_version: 1.0.1
21 ---
22 tosca_definitions_version: cloudify_dsl_1_3
23 description: Hello World mS for subscribing the data from local DMaaP, DR or MR, processing
24   them and publishing them as PM files to local DMaaP DR
25 imports:
26 - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
27 - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.1/k8splugin_types.yaml
28 - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml
29 inputs:
30   DCAE-HELLO-WORLD-PUB-DR_DCAE-HELLO-WORLD-PUB-DR_feed_location:
31     type: string
32   DCAE-HELLO-WORLD-PUB-DR_feed_name:
33     type: string
34   DCAE-HELLO-WORLD-PUB-MR_DCAE-HELLO-WORLD-PUB-MR_topic_aaf_password:
35     type: string
36   DCAE-HELLO-WORLD-PUB-MR_DCAE-HELLO-WORLD-PUB-MR_topic_aaf_username:
37     type: string
38   DCAE-HELLO-WORLD-PUB-MR_DCAE-HELLO-WORLD-PUB-MR_topic_client_role:
39     type: string
40   DCAE-HELLO-WORLD-PUB-MR_DCAE-HELLO-WORLD-PUB-MR_topic_location:
41     type: string
42   DCAE-HELLO-WORLD-PUB-MR_topic_name:
43     type: string
44   DCAE-HELLO-WORLD-SUB-DR_DCAE-HELLO-WORLD-SUB-DR_feed_decompress:
45     type: string
46   DCAE-HELLO-WORLD-SUB-DR_DCAE-HELLO-WORLD-SUB-DR_feed_location:
47     type: string
48   DCAE-HELLO-WORLD-SUB-DR_DCAE-HELLO-WORLD-SUB-DR_feed_password:
49     type: string
50   DCAE-HELLO-WORLD-SUB-DR_DCAE-HELLO-WORLD-SUB-DR_feed_priviliged:
51     type: string
52   DCAE-HELLO-WORLD-SUB-DR_DCAE-HELLO-WORLD-SUB-DR_feed_username:
53     type: string
54   DCAE-HELLO-WORLD-SUB-DR_feed_name:
55     type: string
56   DCAE-HELLO-WORLD-SUB-MR_DCAE-HELLO-WORLD-SUB-MR_topic_aaf_password:
57     type: string
58   DCAE-HELLO-WORLD-SUB-MR_DCAE-HELLO-WORLD-SUB-MR_topic_aaf_username:
59     type: string
60   DCAE-HELLO-WORLD-SUB-MR_DCAE-HELLO-WORLD-SUB-MR_topic_client_role:
61     type: string
62   DCAE-HELLO-WORLD-SUB-MR_DCAE-HELLO-WORLD-SUB-MR_topic_location:
63     type: string
64   DCAE-HELLO-WORLD-SUB-MR_topic_name:
65     type: string
66   dcae.collectors.vcc.helloworld.pm_cpu_limit:
67     type: string
68     default: "250m"
69   dcae.collectors.vcc.helloworld.pm_cpu_request:
70     type: string
71     default: "250m"
72   dcae.collectors.vcc.helloworld.pm_memory_limit:
73     type: string
74     default: "128Mi"
75   dcae.collectors.vcc.helloworld.pm_memory_request:
76     type: string
77     default: "128Mi"
78   dcaes_database_name:
79     type: string
80     description: db name
81     default: ""
82   dcaes_database_writerfqdn:
83     type: string
84     description: db writerfqdn
85     default: ""
86   dti_database_name:
87     type: string
88     description: db name
89     default: ""
90   dti_database_writerfqdn:
91     type: string
92     description: db writerfqdn
93     default: ""
94   envs:
95     default: &envs {}
96   replicas:
97     type: integer
98     description: number of instances
99     default: 1
100   repo_database_name:
101     type: string
102     description: db name
103     default: ""
104   repo_database_writerfqdn:
105     type: string
106     description: db writerfqdn
107     default: ""
108   service_component_name_override:
109     type: string
110     default: ""
111   tag_version:
112     type: string
113     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest"
114   tca_policy_00_policy_id:
115     type: string
116     description: policy_id
117     default: ""
118   tca_policy_11_policy_id:
119     type: string
120     description: policy_id
121     default: "tca_policy_id_11"
122   use_tls:
123     type: boolean
124     description: flag to indicate tls enable/disable
125     default: true
126   vcc_hello_name:
127     type: string
128     default: "fsdfa"
129 node_templates:
130   DCAE-HELLO-WORLD-PUB-DR_feed:
131     type: ccsdk.nodes.Feed
132     properties:
133       feed_name:
134         get_input: DCAE-HELLO-WORLD-PUB-DR_feed_name
135   DCAE-HELLO-WORLD-PUB-MR_topic:
136     type: ccsdk.nodes.Topic
137     properties:
138       topic_name:
139         get_input: DCAE-HELLO-WORLD-PUB-MR_topic_name
140   DCAE-HELLO-WORLD-SUB-DR_feed:
141     type: ccsdk.nodes.Feed
142     properties:
143       feed_name:
144         get_input: DCAE-HELLO-WORLD-SUB-DR_feed_name
145   DCAE-HELLO-WORLD-SUB-MR_topic:
146     type: ccsdk.nodes.Topic
147     properties:
148       topic_name:
149         get_input: DCAE-HELLO-WORLD-SUB-MR_topic_name
150   dcae.collectors.vcc.helloworld.pm:
151     type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
152     interfaces:
153       cloudify.interfaces.lifecycle:
154         start:
155           inputs:
156             ports: []
157             envs:
158               <<: *envs
159               DCAES_DB_NAME:
160                 get_input: dcaes_database_name
161               DCAES_DB_ADMIN_HOST:
162                 get_attribute:
163                 - dcaes_pgaasdb
164                 - admin
165                 - host
166               DCAES_DB_ADMIN_USER:
167                 get_attribute:
168                 - dcaes_pgaasdb
169                 - admin
170                 - user
171               DCAES_DB_ADMIN_PASS:
172                 get_attribute:
173                 - dcaes_pgaasdb
174                 - admin
175                 - password
176               DTI_DB_NAME:
177                 get_input: dti_database_name
178               DTI_DB_ADMIN_HOST:
179                 get_attribute:
180                 - dti_pgaasdb
181                 - admin
182                 - host
183               DTI_DB_ADMIN_USER:
184                 get_attribute:
185                 - dti_pgaasdb
186                 - admin
187                 - user
188               DTI_DB_ADMIN_PASS:
189                 get_attribute:
190                 - dti_pgaasdb
191                 - admin
192                 - password
193               REPO_DB_NAME:
194                 get_input: repo_database_name
195               REPO_DB_ADMIN_HOST:
196                 get_attribute:
197                 - repo_pgaasdb
198                 - admin
199                 - host
200               REPO_DB_ADMIN_USER:
201                 get_attribute:
202                 - repo_pgaasdb
203                 - admin
204                 - user
205               REPO_DB_ADMIN_PASS:
206                 get_attribute:
207                 - repo_pgaasdb
208                 - admin
209                 - password
210     properties:
211       application_config:
212         service_calls: []
213         streams_publishes:
214           DCAE-HELLO-WORLD-PUB-DR:
215             dmaap_info: <<DCAE-HELLO-WORLD-PUB-DR_feed>>
216             type: data_router
217           DCAE-HELLO-WORLD-PUB-MR:
218             dmaap_info: <<DCAE-HELLO-WORLD-PUB-MR_topic>>
219             type: message_router
220             pass:
221               get_input: DCAE-HELLO-WORLD-PUB-MR_DCAE-HELLO-WORLD-PUB-MR_topic_aaf_password
222             user:
223               get_input: DCAE-HELLO-WORLD-PUB-MR_DCAE-HELLO-WORLD-PUB-MR_topic_aaf_username
224         streams_subscribes:
225           DCAE-HELLO-WORLD-SUB-DR:
226             dmaap_info: <<DCAE-HELLO-WORLD-SUB-DR_feed>>
227             type: data_router
228           DCAE-HELLO-WORLD-SUB-MR:
229             dmaap_info: <<DCAE-HELLO-WORLD-SUB-MR_topic>>
230             type: message_router
231             pass:
232               get_input: DCAE-HELLO-WORLD-SUB-MR_DCAE-HELLO-WORLD-SUB-MR_topic_aaf_password
233             user:
234               get_input: DCAE-HELLO-WORLD-SUB-MR_DCAE-HELLO-WORLD-SUB-MR_topic_aaf_username
235         isSelfServeComponent: false
236         service_component_name_override:
237           get_input: service_component_name_override
238         useDtiConfig: false
239         vcc_hello_name:
240           get_input: vcc_hello_name
241       docker_config:
242         healthcheck:
243           interval: 60s
244           timeout: 20s
245           script: /opt/app/vcc/bin/common/HealthCheck_HelloWorld.sh
246           type: docker
247         volumes:
248         - container:
249             bind: /opt/app/dcae-certificate
250           host:
251             path: /opt/app/dcae-certificate
252         - container:
253             bind: /opt/logs/DCAE/dmd/AGENT
254           host:
255             path: /opt/logs/DCAE/helloworldpm/dmd/AGENT
256         - container:
257             bind: /opt/logs/DCAE/dmd/WATCHER
258           host:
259             path: /opt/logs/DCAE/helloworldpm/dmd/WATCHER
260         - container:
261             bind: /opt/app/vcc/logs/DCAE
262           host:
263             path: /opt/logs/DCAE/helloworldpm/vcc-logs
264         - container:
265             bind: /opt/app/vcc/archive/data
266           host:
267             path: /opt/data/DCAE/helloworldpm/vcc-archive
268       image:
269         get_input: tag_version
270       service_component_type: dcae-collectors-vcc-helloworld-pm
271       log_info:
272         log_directory: /opt/app/VESCollector/logs/ecomp
273       replicas:
274         get_input: replicas
275       streams_publishes:
276       - name: DCAE-HELLO-WORLD-PUB-DR_feed
277         location:
278           get_input: DCAE-HELLO-WORLD-PUB-DR_DCAE-HELLO-WORLD-PUB-DR_feed_location
279         type: data_router
280       - name: DCAE-HELLO-WORLD-PUB-MR_topic
281         location:
282           get_input: DCAE-HELLO-WORLD-PUB-MR_DCAE-HELLO-WORLD-PUB-MR_topic_location
283         client_role:
284           get_input: DCAE-HELLO-WORLD-PUB-MR_DCAE-HELLO-WORLD-PUB-MR_topic_client_role
285         type: message_router
286       streams_subscribes:
287       - name: DCAE-HELLO-WORLD-SUB-MR_topic
288         location:
289           get_input: DCAE-HELLO-WORLD-SUB-MR_DCAE-HELLO-WORLD-SUB-MR_topic_location
290         client_role:
291           get_input: DCAE-HELLO-WORLD-SUB-MR_DCAE-HELLO-WORLD-SUB-MR_topic_client_role
292         type: message_router
293       - name: DCAE-HELLO-WORLD-SUB-DR_feed
294         location:
295           get_input: DCAE-HELLO-WORLD-SUB-DR_DCAE-HELLO-WORLD-SUB-DR_feed_location
296         type: data_router
297         username:
298           get_input: DCAE-HELLO-WORLD-SUB-DR_DCAE-HELLO-WORLD-SUB-DR_feed_username
299         password:
300           get_input: DCAE-HELLO-WORLD-SUB-DR_DCAE-HELLO-WORLD-SUB-DR_feed_password
301         privileged:
302           get_input: DCAE-HELLO-WORLD-SUB-DR_DCAE-HELLO-WORLD-SUB-DR_feed_priviliged
303         decompress:
304           get_input: DCAE-HELLO-WORLD-SUB-DR_DCAE-HELLO-WORLD-SUB-DR_feed_decompress
305         route: /DCAE-HELLO-WORLD-SUB-DR
306         scheme: https
307       tls_info:
308         cert_directory: /opt/app/dh/etc/cert
309         use_tls:
310           get_input: use_tls
311       resource_config:
312         limits:
313           cpu:
314             get_input: dcae.collectors.vcc.helloworld.pm_cpu_limit
315           memory:
316             get_input: dcae.collectors.vcc.helloworld.pm_memory_limit
317         requests:
318           cpu:
319             get_input: dcae.collectors.vcc.helloworld.pm_cpu_request
320           memory:
321             get_input: dcae.collectors.vcc.helloworld.pm_memory_request
322     relationships:
323     - type: ccsdk.relationships.publish_files
324       target: DCAE-HELLO-WORLD-PUB-DR_feed
325     - type: ccsdk.relationships.publish_events
326       target: DCAE-HELLO-WORLD-PUB-MR_topic
327     - type: ccsdk.relationships.subscribe_to_events
328       target: DCAE-HELLO-WORLD-SUB-MR_topic
329     - type: ccsdk.relationships.subscribe_to_files
330       target: DCAE-HELLO-WORLD-SUB-DR_feed
331     - type: cloudify.relationships.depends_on
332       target: tca_policy_00
333     - type: cloudify.relationships.depends_on
334       target: tca_policy_11
335     - type: cloudify.relationships.depends_on
336       target: dcaes_pgaasdb
337     - type: cloudify.relationships.depends_on
338       target: dti_pgaasdb
339     - type: cloudify.relationships.depends_on
340       target: repo_pgaasdb
341   dcaes_pgaasdb:
342     type: dcae.nodes.pgaas.database
343     properties:
344       writerfqdn:
345         get_input: dcaes_database_writerfqdn
346       name:
347         get_input: dcaes_database_name
348       use_existing: true
349   dti_pgaasdb:
350     type: dcae.nodes.pgaas.database
351     properties:
352       writerfqdn:
353         get_input: dti_database_writerfqdn
354       name:
355         get_input: dti_database_name
356       use_existing: true
357   repo_pgaasdb:
358     type: dcae.nodes.pgaas.database
359     properties:
360       writerfqdn:
361         get_input: repo_database_writerfqdn
362       name:
363         get_input: repo_database_name
364       use_existing: true
365   tca_policy_00:
366     type: clamp.nodes.policy
367     properties:
368       policy_id:
369         get_input: tca_policy_00_policy_id
370       policy_model_id: onap.policies.monitoring.cdap.tca.hi.lo.app
371   tca_policy_11:
372     type: clamp.nodes.policy
373     properties:
374       policy_id:
375         get_input: tca_policy_11_policy_id
376       policy_model_id: onap.policies.monitoring.cdap.tca.hi.lo.app