Merge "Add support for config_volume in blueprint generator"
[dcaegen2/platform.git] / mod / runtimeapi / runtime-core / src / test / data / blueprints / helloworld_no_edits.yaml
1 # ============LICENSE_START=======================================================
2 # Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # ============LICENSE_END=========================================================
16 #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
17 #1.0.1
18 #
19 ---
20 tosca_definitions_version: cloudify_dsl_1_3
21 imports:
22 - http://www.getcloudify.org/spec/cloudify/4.4/types.yaml
23 - /k8splugin/1.4.22/node-type.yaml
24 - /relationship/1.0.1/types.yaml
25 - /cloudifydmaapplugin/1.4.6/node-type.yaml
26 - /dcaepolicyplugin/2.3.1/node-type.yaml
27 - /pgaas/0.3.2/pgaas_types.yaml
28 inputs:
29   DCAE-HELLO-WORLD-PUB-DR_feed2_feed_name:
30     type: string
31     description: Dmaap information needed for deploying a microservice using dmaap
32       (string)
33     default: 'DCAE-HELLO-WORLD-PUB-DR'
34   DCAE-HELLO-WORLD-PUB-MR_topic3_aaf_password:
35     type: string
36   DCAE-HELLO-WORLD-PUB-MR_topic3_aaf_username:
37     type: string
38   DCAE-HELLO-WORLD-PUB-MR_topic3_client_role:
39     type: string
40     description: client or location for dmaap (string)
41   DCAE-HELLO-WORLD-PUB-MR_topic3_location:
42     type: string
43     description: client or location for dmaap (string)
44   DCAE-HELLO-WORLD-PUB-MR_topic3_name:
45     type: string
46     description: Dmaap information needed for deploying a microservice using dmaap
47       (string)
48     default: 'DCAE-HELLO-WORLD-PUB-MR'
49   DCAE-HELLO-WORLD-SUB-DR_feed1_feed_name:
50     type: string
51     description: Dmaap information needed for deploying a microservice using dmaap
52       (string)
53     default: 'DCAE-HELLO-WORLD-SUB-DR'
54   DCAE-HELLO-WORLD-SUB-MR_topic0_aaf_password:
55     type: string
56   DCAE-HELLO-WORLD-SUB-MR_topic0_aaf_username:
57     type: string
58   DCAE-HELLO-WORLD-SUB-MR_topic0_client_role:
59     type: string
60     description: client or location for dmaap (string)
61   DCAE-HELLO-WORLD-SUB-MR_topic0_location:
62     type: string
63     description: client or location for dmaap (string)
64   DCAE-HELLO-WORLD-SUB-MR_topic0_name:
65     type: string
66     description: Dmaap information needed for deploying a microservice using dmaap
67       (string)
68     default: 'DCAE-HELLO-WORLD-SUB-MR'
69   additionalsans:
70     type: string
71     default: ''
72     description: additional sans (string)
73   annotations:
74     default: {}
75   dcae-collectors-vcc-helloworld-pm_cpu_limit:
76     type: string
77     default: '250m'
78     description: cpu limit for deployment (string)
79   dcae-collectors-vcc-helloworld-pm_cpu_request:
80     type: string
81     default: '250m'
82     description: cpu requested for deployment (string)
83   dcae-collectors-vcc-helloworld-pm_memory_limit:
84     type: string
85     default: '128Mi'
86     description: memory limit for deployment (string)
87   dcae-collectors-vcc-helloworld-pm_memory_request:
88     type: string
89     default: '128Mi'
90     description: memory requested for deployment (string)
91   dcae_service_location:
92     type: string
93     description: Docker host override for docker bps (string)
94   idns_fqdn:
95     type: string
96     default: ''
97     description: The idns you will be using for your deployment (string)
98   image:
99     type: string
100     default: 'dcae-controller-vcc-helloworld-pm:18.02-001'
101     description: The docker image for you microservice (string)
102   namespace:
103     type: string
104   replicas:
105     type: integer
106     default: 1
107     description: The number of replicas for your kubernetes deployment (integer)
108   service_component_name_override:
109     type: string
110     default: 'dcae-collectors-vcc-helloworld-pm'
111     description: Unique identifier for your deployment (string)
112   use_aaf_tls:
113     type: boolean
114     default: false
115     description: To use or not use the aaf section (boolean)
116   vcc_hello_name:
117     type: string
118     description: the name entered for specific person
119     default: ''
120 node_templates:
121   dcae-collectors-vcc-helloworld-pm_dcae-collectors-vcc-helloworld-pm:
122     type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
123     properties:
124       application_config:
125         services_calls: []
126         streams_publishes:
127           DCAE-HELLO-WORLD-PUB-DR:
128             dmaap_info: <<feed2>>
129             type: data_router
130           DCAE-HELLO-WORLD-PUB-MR:
131             dmaap_info: <<topic3>>
132             type: message_router
133             aaf_password:
134               get_input: DCAE-HELLO-WORLD-PUB-MR_topic3_aaf_password
135             aaf_username:
136               get_input: DCAE-HELLO-WORLD-PUB-MR_topic3_aaf_username
137         streams_subscribes:
138           DCAE-HELLO-WORLD-SUB-DR:
139             dmaap_info: <<feed1>>
140             type: data_router
141           DCAE-HELLO-WORLD-SUB-MR:
142             dmaap_info: <<topic0>>
143             type: message_router
144             aaf_password:
145               get_input: DCAE-HELLO-WORLD-SUB-MR_topic0_aaf_password
146             aaf_username:
147               get_input: DCAE-HELLO-WORLD-SUB-MR_topic0_aaf_username
148         isSelfServeComponent: false
149         useDtiConfig: false
150         vcc_hello_name:
151           get_input: vcc_hello_name
152       docker_config:
153         healthcheck:
154           interval: 60s
155           timeout: 20s
156           script: /opt/app/vcc/bin/common/HealthCheck_HelloWorld.sh
157           type: docker
158         livehealthcheck:
159           interval: 60s
160           timeout: 20s
161           script: /opt/app/vcc/bin/common/HealthCheck_HelloWorld.sh
162           type: docker
163         volumes:
164         - container:
165             bind: /opt/app/dcae-certificate
166           host:
167             path: /opt/app/dcae-certificate
168         - container:
169             bind: /opt/logs/DCAE/dmd/AGENT
170           host:
171             path: /opt/logs/DCAE/helloworldpm/dmd/AGENT
172         - container:
173             bind: /opt/logs/DCAE/dmd/WATCHER
174           host:
175             path: /opt/logs/DCAE/helloworldpm/dmd/WATCHER
176         - container:
177             bind: /opt/app/vcc/logs/DCAE
178           host:
179             path: /opt/logs/DCAE/helloworldpm/vcc-logs
180         - container:
181             bind: /opt/app/vcc/archive/data
182           host:
183             path: /opt/data/DCAE/helloworldpm/vcc-archive
184         - container:
185             bind: /opt/app/etc/config
186           config_volume:
187             name: myConfig
188       image:
189         get_input: image
190       location_id:
191         get_input: dcae_service_location
192       service_component_type: dcae-collectors-vcc-helloworld-pm
193       replicas:
194         get_input: replicas
195       streams_subscribes:
196       - name: topic0
197         type: message_router
198         client_role:
199           get_input: DCAE-HELLO-WORLD-SUB-MR_topic0_client_role
200         location:
201           get_input: DCAE-HELLO-WORLD-SUB-MR_topic0_location
202         route: DCAE-HELLO-WORLD-SUB-MR
203         scheme: https
204       - name: feed1
205         type: data_router
206         location:
207           get_input: dcae_service_location
208         scheme: https
209         route: DCAE-HELLO-WORLD-SUB-DR
210       streams_publishes:
211       - name: feed2
212         type: data_router
213         location:
214           get_input: dcae_service_location
215       - name: topic3
216         type: message_router
217         client_role:
218           get_input: DCAE-HELLO-WORLD-PUB-MR_topic3_client_role
219         location:
220           get_input: DCAE-HELLO-WORLD-PUB-MR_topic3_location
221       service_component_name_override:
222         concat:
223         - get_secret: location_id
224         - '-'
225         - get_input: service_component_name_override
226       configuration:
227         file_content:
228           apiVersion: v1
229           clusters:
230           - name: default-cluster
231             cluster:
232               server:
233                 concat:
234                 - https://
235                 - get_secret: kc-kubernetes_master_ip
236                 - ':'
237                 - get_secret: kc-kubernetes_master_port
238               insecure-skip-tls-verify: true
239           contexts:
240           - name: default-context
241             context:
242               cluster: default-cluster
243               namespace:
244                 get_input: namespace
245               user: default-user
246           kind: Config
247           preferences: {}
248           users:
249           - name: default-user
250             user:
251               token:
252                 get_secret: dcae-mechid-k8s-token
253           current-context: default-context
254       resource_config:
255         limits:
256           cpu:
257             get_input: dcae-collectors-vcc-helloworld-pm_cpu_limit
258           memory:
259             get_input: dcae-collectors-vcc-helloworld-pm_memory_limit
260         requests:
261           cpu:
262             get_input: dcae-collectors-vcc-helloworld-pm_cpu_request
263           memory:
264             get_input: dcae-collectors-vcc-helloworld-pm_memory_request
265       aaf_tls_info:
266         use_aaf_tls:
267           get_input: use_aaf_tls
268         cert_directory: /opt/app/aafcertman
269         image: aaf-init-container:1.0.1
270         env:
271         - name: NAMESPACE
272           valueFrom:
273             fieldRef:
274               fieldPath: metadata.namespace
275         - name: deployer_id
276           valueFrom:
277             secretKeyRef:
278               name:
279                 concat:
280                 - get_input: namespace
281                 - -cert-secret
282               key: deployerid
283         - name: deployer_pass
284           valueFrom:
285             secretKeyRef:
286               name:
287                 concat:
288                 - get_input: namespace
289                 - -cert-secret
290               key: deployerpass
291         - name: cert_id
292           valueFrom:
293             secretKeyRef:
294               name:
295                 concat:
296                 - get_input: namespace
297                 - -cert-secret
298               key: certid
299         - name: cm_url
300           valueFrom:
301             secretKeyRef:
302               name:
303                 concat:
304                 - get_input: namespace
305                 - -cert-secret
306               key: cmurl
307         - name: idns_fqdn
308           value:
309             get_input: idns_fqdn
310         - name: app_service_names
311           value:
312             concat:
313             - get_secret: location_id
314             - '-'
315             - get_input: service_component_name_override
316         args:
317         - place
318         - cmtemplate
319         - -idnsfqdn=$(idns_fqdn)
320         - -cmurl=$(cm_url)
321         - -deployerid=$(deployer_id)
322         - -deployerpass=$(deployer_pass)
323         - -certid=$(cert_id)
324         - -namespace=$(NAMESPACE)
325         - -services=$(app_service_names)
326         - concat:
327           - -additionalsans=
328           - get_input: additionalsans
329         use_aaf_tls_renewal: true
330         renewal_args:
331         - renew
332         - -idnsfqdn=$(idns_fqdn)
333         - -cmurl=$(cm_url)
334         resource_config:
335           limits:
336             cpu: 250m
337             memory: 256Mi
338           requests:
339             cpu: 100m
340             memory: 256Mi
341       annotations:
342         get_input: annotations
343     relationships:
344     - target: topic0
345       type: dcae.relationships.subscribe_to_events
346     - target: feed1
347       type: dcae.relationships.subscribe_to_files
348     - target: feed2
349       type: dcae.relationships.publish_files
350     - target: topic3
351       type: dcae.relationships.publish_events
352   feed1:
353     type: dcae.nodes.Feed
354     properties:
355       feed_name:
356         get_input: DCAE-HELLO-WORLD-SUB-DR_feed1_feed_name
357       useExisting: true
358   feed2:
359     type: dcae.nodes.Feed
360     properties:
361       feed_name:
362         get_input: DCAE-HELLO-WORLD-PUB-DR_feed2_feed_name
363       useExisting: true
364   topic0:
365     type: dcae.nodes.Topic
366     properties:
367       topic_name:
368         get_input: DCAE-HELLO-WORLD-SUB-MR_topic0_name
369       useExisting: true
370   topic3:
371     type: dcae.nodes.Topic
372     properties:
373       topic_name:
374         get_input: DCAE-HELLO-WORLD-PUB-MR_topic3_name
375       useExisting: true