Add mod/runtimeapi
[dcaegen2/platform.git] / mod / runtimeapi / runtime-web / src / test / data / blueprints_samples / helloworld_test_2.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: 'sample_topic_1'
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       image:
185         get_input: image
186       location_id:
187         get_input: dcae_service_location
188       service_component_type: dcae-collectors-vcc-helloworld-pm
189       replicas:
190         get_input: replicas
191       streams_subscribes:
192       - name: topic0
193         type: message_router
194         client_role:
195           get_input: DCAE-HELLO-WORLD-SUB-MR_topic0_client_role
196         location:
197           get_input: DCAE-HELLO-WORLD-SUB-MR_topic0_location
198         route: DCAE-HELLO-WORLD-SUB-MR
199         scheme: https
200       - name: feed1
201         type: data_router
202         location:
203           get_input: dcae_service_location
204         scheme: https
205         route: DCAE-HELLO-WORLD-SUB-DR
206       streams_publishes:
207       - name: feed2
208         type: data_router
209         location:
210           get_input: dcae_service_location
211       - name: topic3
212         type: message_router
213         client_role:
214           get_input: DCAE-HELLO-WORLD-PUB-MR_topic3_client_role
215         location:
216           get_input: DCAE-HELLO-WORLD-PUB-MR_topic3_location
217       service_component_name_override:
218         concat:
219         - get_secret: location_id
220         - '-'
221         - get_input: service_component_name_override
222       configuration:
223         file_content:
224           apiVersion: v1
225           clusters:
226           - name: default-cluster
227             cluster:
228               server:
229                 concat:
230                 - https://
231                 - get_secret: kc-kubernetes_master_ip
232                 - ':'
233                 - get_secret: kc-kubernetes_master_port
234               insecure-skip-tls-verify: true
235           contexts:
236           - name: default-context
237             context:
238               cluster: default-cluster
239               namespace:
240                 get_input: namespace
241               user: default-user
242           kind: Config
243           preferences: {}
244           users:
245           - name: default-user
246             user:
247               token:
248                 get_secret: dcae-mechid-k8s-token
249           current-context: default-context
250       resource_config:
251         limits:
252           cpu:
253             get_input: dcae-collectors-vcc-helloworld-pm_cpu_limit
254           memory:
255             get_input: dcae-collectors-vcc-helloworld-pm_memory_limit
256         requests:
257           cpu:
258             get_input: dcae-collectors-vcc-helloworld-pm_cpu_request
259           memory:
260             get_input: dcae-collectors-vcc-helloworld-pm_memory_request
261       aaf_tls_info:
262         use_aaf_tls:
263           get_input: use_aaf_tls
264         cert_directory: /opt/app/aafcertman
265         image: aaf-init-container:1.0.1
266         env:
267         - name: NAMESPACE
268           valueFrom:
269             fieldRef:
270               fieldPath: metadata.namespace
271         - name: deployer_id
272           valueFrom:
273             secretKeyRef:
274               name:
275                 concat:
276                 - get_input: namespace
277                 - -cert-secret
278               key: deployerid
279         - name: deployer_pass
280           valueFrom:
281             secretKeyRef:
282               name:
283                 concat:
284                 - get_input: namespace
285                 - -cert-secret
286               key: deployerpass
287         - name: cert_id
288           valueFrom:
289             secretKeyRef:
290               name:
291                 concat:
292                 - get_input: namespace
293                 - -cert-secret
294               key: certid
295         - name: cm_url
296           valueFrom:
297             secretKeyRef:
298               name:
299                 concat:
300                 - get_input: namespace
301                 - -cert-secret
302               key: cmurl
303         - name: idns_fqdn
304           value:
305             get_input: idns_fqdn
306         - name: app_service_names
307           value:
308             concat:
309             - get_secret: location_id
310             - '-'
311             - get_input: service_component_name_override
312         args:
313         - place
314         - cmtemplate
315         - -idnsfqdn=$(idns_fqdn)
316         - -cmurl=$(cm_url)
317         - -deployerid=$(deployer_id)
318         - -deployerpass=$(deployer_pass)
319         - -certid=$(cert_id)
320         - -namespace=$(NAMESPACE)
321         - -services=$(app_service_names)
322         - concat:
323           - -additionalsans=
324           - get_input: additionalsans
325         use_aaf_tls_renewal: true
326         renewal_args:
327         - renew
328         - -idnsfqdn=$(idns_fqdn)
329         - -cmurl=$(cm_url)
330         resource_config:
331           limits:
332             cpu: 250m
333             memory: 256Mi
334           requests:
335             cpu: 100m
336             memory: 256Mi
337       annotations:
338         get_input: annotations
339     relationships:
340     - target: topic0
341       type: dcae.relationships.subscribe_to_events
342     - target: feed1
343       type: dcae.relationships.subscribe_to_files
344     - target: feed2
345       type: dcae.relationships.publish_files
346     - target: topic3
347       type: dcae.relationships.publish_events
348   feed1:
349     type: dcae.nodes.Feed
350     properties:
351       feed_name:
352         get_input: DCAE-HELLO-WORLD-SUB-DR_feed1_feed_name
353       useExisting: true
354   feed2:
355     type: dcae.nodes.Feed
356     properties:
357       feed_name:
358         get_input: DCAE-HELLO-WORLD-PUB-DR_feed2_feed_name
359       useExisting: true
360   topic0:
361     type: dcae.nodes.Topic
362     properties:
363       topic_name:
364         get_input: DCAE-HELLO-WORLD-SUB-MR_topic0_name
365       useExisting: true
366   topic3:
367     type: dcae.nodes.Topic
368     properties:
369       topic_name:
370         get_input: DCAE-HELLO-WORLD-PUB-MR_topic3_name
371       useExisting: true