Merge "Link DCAE MOD design tool to Acumos Adapter"
[dcaegen2/platform.git] / mod / bpgenerator / TestCases / helloworld / blueprint / helloworld_changed_without_dmaap_yaml.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 imports:
24 - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
25 - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.1/k8splugin_types.yaml
26 - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml
27 inputs:
28   DCAE-HELLO-WORLD-PUB-DR_delivery_url:
29     type: string
30   DCAE-HELLO-WORLD-PUB-DR_location:
31     type: string
32   DCAE-HELLO-WORLD-PUB-DR_password:
33     type: string
34   DCAE-HELLO-WORLD-PUB-DR_subscriber_id:
35     type: string
36   DCAE-HELLO-WORLD-PUB-DR_username:
37     type: string
38   DCAE-HELLO-WORLD-SUB-DR_delivery_url:
39     type: string
40   DCAE-HELLO-WORLD-SUB-DR_location:
41     type: string
42   DCAE-HELLO-WORLD-SUB-DR_password:
43     type: string
44   DCAE-HELLO-WORLD-SUB-DR_subscriber_id:
45     type: string
46   DCAE-HELLO-WORLD-SUB-DR_username:
47     type: string
48   DCAE_HELLO_WORLD_PUB_MR_publish_url:
49     type: string
50   DCAE_HELLO_WORLD_SUB_MR_subscribe_url:
51     type: string
52   always_pull_image:
53     type: boolean
54     description: Set to true if the image should always be pulled
55     default: true
56   dcae.collectors.vcc.helloworld.pm_cpu_limit:
57     type: string
58     default: "250m"
59   dcae.collectors.vcc.helloworld.pm_cpu_request:
60     type: string
61     default: "250m"
62   dcae.collectors.vcc.helloworld.pm_memory_limit:
63     type: string
64     default: "128Mi"
65   dcae.collectors.vcc.helloworld.pm_memory_request:
66     type: string
67     default: "128Mi"
68   dcaes_database_name:
69     type: string
70     description: db name
71     default: ""
72   dcaes_database_writerfqdn:
73     type: string
74     description: db writerfqdn
75     default: ""
76   dti_database_name:
77     type: string
78     description: db name
79     default: ""
80   dti_database_writerfqdn:
81     type: string
82     description: db writerfqdn
83     default: ""
84   envs:
85     default: &envs {}
86   image:
87     type: string
88     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest"
89   location_id:
90     type: string
91     default: ""
92   replicas:
93     type: integer
94     description: number of instances
95     default: 1
96   repo_database_name:
97     type: string
98     description: db name
99     default: ""
100   repo_database_writerfqdn:
101     type: string
102     description: db writerfqdn
103     default: ""
104   service_component_name_override:
105     type: string
106     default: ""
107   tca_policy_00_policy_id:
108     type: string
109     description: policy_id
110     default: ""
111   tca_policy_11_policy_id:
112     type: string
113     description: policy_id
114     default: "tca_policy_id_11"
115   use_tls:
116     type: boolean
117     description: flag to indicate tls enable/disable
118     default: true
119   vcc_hello_name:
120     type: string
121     default: "fsdfa"
122 node_templates:
123   dcae.collectors.vcc.helloworld.pm:
124     type: dcae.nodes.ContainerizedPlatformComponent
125     interfaces:
126       cloudify.interfaces.lifecycle:
127         start:
128           inputs:
129             ports: []
130             envs:
131               <<: *envs
132               DCAES_DB_NAME:
133                 get_input: dcaes_database_name
134               DCAES_DB_ADMIN_HOST:
135                 get_attribute:
136                 - dcaes_pgaasdb
137                 - admin
138                 - host
139               DCAES_DB_ADMIN_USER:
140                 get_attribute:
141                 - dcaes_pgaasdb
142                 - admin
143                 - user
144               DCAES_DB_ADMIN_PASS:
145                 get_attribute:
146                 - dcaes_pgaasdb
147                 - admin
148                 - password
149               DTI_DB_NAME:
150                 get_input: dti_database_name
151               DTI_DB_ADMIN_HOST:
152                 get_attribute:
153                 - dti_pgaasdb
154                 - admin
155                 - host
156               DTI_DB_ADMIN_USER:
157                 get_attribute:
158                 - dti_pgaasdb
159                 - admin
160                 - user
161               DTI_DB_ADMIN_PASS:
162                 get_attribute:
163                 - dti_pgaasdb
164                 - admin
165                 - password
166               REPO_DB_NAME:
167                 get_input: repo_database_name
168               REPO_DB_ADMIN_HOST:
169                 get_attribute:
170                 - repo_pgaasdb
171                 - admin
172                 - host
173               REPO_DB_ADMIN_USER:
174                 get_attribute:
175                 - repo_pgaasdb
176                 - admin
177                 - user
178               REPO_DB_ADMIN_PASS:
179                 get_attribute:
180                 - repo_pgaasdb
181                 - admin
182                 - password
183     properties:
184       application_config:
185         service_calls: []
186         streams_publishes:
187           DCAE-HELLO-WORLD-PUB-DR:
188             dmaap_info:
189               username:
190                 get_input: DCAE-HELLO-WORLD-PUB-DR_username
191               password:
192                 get_input: DCAE-HELLO-WORLD-PUB-DR_password
193               location:
194                 get_input: DCAE-HELLO-WORLD-PUB-DR_location
195               delivery_url:
196                 get_input: DCAE-HELLO-WORLD-PUB-DR_delivery_url
197               subscriber_id:
198                 get_input: DCAE-HELLO-WORLD-PUB-DR_subscriber_id
199             type: data_router
200           DCAE-HELLO-WORLD-PUB-MR:
201             dmaap_info:
202               topic_url:
203                 get_input: DCAE_HELLO_WORLD_PUB_MR_publish_url
204             type: message_router
205         streams_subscribes:
206           DCAE-HELLO-WORLD-SUB-DR:
207             dmaap_info:
208               username:
209                 get_input: DCAE-HELLO-WORLD-SUB-DR_username
210               password:
211                 get_input: DCAE-HELLO-WORLD-SUB-DR_password
212               location:
213                 get_input: DCAE-HELLO-WORLD-SUB-DR_location
214               delivery_url:
215                 get_input: DCAE-HELLO-WORLD-SUB-DR_delivery_url
216               subscriber_id:
217                 get_input: DCAE-HELLO-WORLD-SUB-DR_subscriber_id
218             type: data_router
219           DCAE-HELLO-WORLD-SUB-MR:
220             dmaap_info:
221               topic_url:
222                 get_input: DCAE_HELLO_WORLD_SUB_MR_subscribe_url
223             type: message_router
224         isSelfServeComponent: false
225         service_component_name_override:
226           get_input: service_component_name_override
227         useDtiConfig: false
228         vcc_hello_name:
229           get_input: vcc_hello_name
230       docker_config:
231         healthcheck:
232           interval: 60s
233           timeout: 20s
234           script: /opt/app/vcc/bin/common/HealthCheck_HelloWorld.sh
235           type: docker
236         volumes:
237         - container:
238             bind: /opt/app/dcae-certificate
239           host:
240             path: /opt/app/dcae-certificate
241         - container:
242             bind: /opt/logs/DCAE/dmd/AGENT
243           host:
244             path: /opt/logs/DCAE/helloworldpm/dmd/AGENT
245         - container:
246             bind: /opt/logs/DCAE/dmd/WATCHER
247           host:
248             path: /opt/logs/DCAE/helloworldpm/dmd/WATCHER
249         - container:
250             bind: /opt/app/vcc/logs/DCAE
251           host:
252             path: /opt/logs/DCAE/helloworldpm/vcc-logs
253         - container:
254             bind: /opt/app/vcc/archive/data
255           host:
256             path: /opt/data/DCAE/helloworldpm/vcc-archive
257       image:
258         get_input: image
259       location_id:
260         get_input: location_id
261       log_info:
262         log_directory: /opt/app/VESCollector/logs/ecomp
263       dns_name: dcae.collectors.vcc.helloworld.pm
264       replicas:
265         get_input: replicas
266       name: dcae.collectors.vcc.helloworld.pm
267       tls_info:
268         cert_directory: /opt/app/dh/etc/cert
269         use_tls:
270           get_input: use_tls
271       resource_config:
272         limits:
273           cpu:
274             get_input: dcae.collectors.vcc.helloworld.pm_cpu_limit
275           memory:
276             get_input: dcae.collectors.vcc.helloworld.pm_memory_limit
277         requests:
278           cpu:
279             get_input: dcae.collectors.vcc.helloworld.pm_cpu_request
280           memory:
281             get_input: dcae.collectors.vcc.helloworld.pm_memory_request
282       always_pull_image:
283         get_input: always_pull_image
284     relationships:
285     - type: cloudify.relationships.depends_on
286       target: tca_policy_00
287     - type: cloudify.relationships.depends_on
288       target: tca_policy_11
289     - type: cloudify.relationships.depends_on
290       target: dcaes_pgaasdb
291     - type: cloudify.relationships.depends_on
292       target: dti_pgaasdb
293     - type: cloudify.relationships.depends_on
294       target: repo_pgaasdb
295   dcaes_pgaasdb:
296     type: dcae.nodes.pgaas.database
297     properties:
298       writerfqdn:
299         get_input: dcaes_database_writerfqdn
300       name:
301         get_input: dcaes_database_name
302       use_existing: true
303   dti_pgaasdb:
304     type: dcae.nodes.pgaas.database
305     properties:
306       writerfqdn:
307         get_input: dti_database_writerfqdn
308       name:
309         get_input: dti_database_name
310       use_existing: true
311   repo_pgaasdb:
312     type: dcae.nodes.pgaas.database
313     properties:
314       writerfqdn:
315         get_input: repo_database_writerfqdn
316       name:
317         get_input: repo_database_name
318       use_existing: true
319   tca_policy_00:
320     type: clamp.nodes.policy
321     properties:
322       policy_id:
323         get_input: tca_policy_00_policy_id
324       policy_model_id: onap.policies.monitoring.cdap.tca.hi.lo.app
325   tca_policy_11:
326     type: clamp.nodes.policy
327     properties:
328       policy_id:
329         get_input: tca_policy_11_policy_id
330       policy_model_id: onap.policies.monitoring.cdap.tca.hi.lo.app