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