Update Dmaap plugin version to >=1.5.1,<2.0.0
[dcaegen2/platform/blueprints.git] / blueprints / k8s-datafile.yaml
1 #
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2021 Nokia
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the 'License');
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an 'AS IS' BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19 #
20
21 #description: Docker application to collect log file from PNF
22 #blueprint_version: 1.0.0
23 ---
24 tosca_definitions_version: cloudify_dsl_1_3
25 description: Docker application to collect log file from PNF
26 imports:
27 - http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
28 - plugin:k8splugin?version=>=3.4.3,<4.0.0
29 - plugin:dmaap?version=>=1.5.1,<2.0.0
30 inputs:
31   PM_MEAS_FILES_feed0_location:
32     type: string
33     default: "loc00"
34   cert_directory:
35     type: string
36     default: "/opt/app/datafile/etc/cert/"
37   datafile-collector_cpu_limit:
38     type: string
39     default: "500m"
40   datafile-collector_cpu_request:
41     type: string
42     default: "500m"
43   datafile-collector_memory_limit:
44     type: string
45     default: "768Mi"
46   datafile-collector_memory_request:
47     type: string
48     default: "768Mi"
49   envs:
50     default: {}
51   external_port:
52     type: string
53     default: ":0"
54   feed0_name:
55     type: string
56     default: "bulk_pm_feed"
57   topic_name:
58     type: string
59     default: "unauthenticated.VES_NOTIFICATION_OUTPUT"
60   consumer_group:
61     type: string
62     default: "OpenDcae-c12"
63   consumer_id:
64     type: string
65     default: "C12"
66   log_directory:
67     type: string
68     default: "/var/log/ONAP"
69   replicas:
70     type: integer
71     description: number of instances
72     default: 1
73   tag_version:
74     type: string
75     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.5.5"
76   use_tls:
77     type: boolean
78     default: true
79   external_cert_ca_name:
80     type: string
81     description: Name of Certificate Authority configured on CertService side.
82     default: "RA"
83   external_cert_cert_type:
84     type: string
85     description: Format of provided certificates
86     default: "P12"
87   external_cert_common_name:
88     type: string
89     description: Common name which should be present in certificate.
90     default: "dcae-datafile-collector"
91   external_cert_sans:
92     type: string
93     description: '"List of Subject Alternative Names (SANs) which should be present
94       in certificate. Delimiter - , Should contain common_name value and other FQDNs
95       under which given component is accessible."'
96     default: "dcae-datafile-collector,datafile-collector,datafile"
97   external_cert_use_external_tls:
98     type: boolean
99     description: Flag to indicate external tls enable/disable.
100     default: false
101 node_templates:
102   datafile-collector:
103     type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
104     interfaces:
105       cloudify.interfaces.lifecycle:
106         start:
107           inputs:
108             envs:
109               get_input: envs
110     properties:
111       application_config:
112         service_calls: []
113         streams_publishes:
114           PM_MEAS_FILES:
115             dmaap_info: <<feed0>>
116             type: data_router
117         dmaap.certificateConfig.keyCert: /opt/app/datafile/etc/cert/cert.p12
118         dmaap.certificateConfig.keyPasswordPath: /opt/app/datafile/etc/cert/p12.pass
119         dmaap.certificateConfig.trustedCa: /opt/app/datafile/etc/cert/trust.jks
120         dmaap.certificateConfig.trustedCaPasswordPath: /opt/app/datafile/etc/cert/trust.pass
121         dmaap.security.enableDmaapCertAuth: true
122         dmaap.security.keyStorePasswordPath: /opt/app/datafile/etc/cert/jks.pass
123         dmaap.security.keyStorePath: /opt/app/datafile/etc/cert/cert.jks
124         dmaap.security.trustStorePasswordPath: /opt/app/datafile/etc/cert/trust.pass
125         dmaap.security.trustStorePath: /opt/app/datafile/etc/cert/trust.jks
126         dmaap.dmaapConsumerConfiguration.consumerGroup:
127           get_input: consumer_group
128         dmaap.dmaapConsumerConfiguration.consumerId:
129           get_input: consumer_id
130         dmaap.dmaapConsumerConfiguration.timeoutMs: -1
131         sftp.security.strictHostKeyChecking: true
132         streams_subscribes:
133           dmaap_subscriber:
134             type: message_router
135             dmaap_info:
136               topic_url: { concat: ['https://message-router:3905/events/',{ get_input: topic_name }] }
137       docker_config:
138         healthcheck:
139           interval: 15s
140           timeout: 1s
141           type: http
142           endpoint: /heartbeat
143         ports:
144         - concat: ["8100", {get_input: external_port}]
145         - concat: ["8433", {get_input: external_port}]
146       image:
147         get_input: tag_version
148       service_component_type: datafile-collector
149       log_info:
150         log_directory:
151           get_input: log_directory
152       replicas:
153         get_input: replicas
154       streams_publishes:
155       - name: feed0
156         location:
157           get_input: PM_MEAS_FILES_feed0_location
158         type: data_router
159       tls_info:
160         cert_directory:
161           get_input: cert_directory
162         use_tls:
163           get_input: use_tls
164       external_cert:
165         external_cert_directory:
166           get_input: cert_directory
167         use_external_tls:
168           get_input: external_cert_use_external_tls
169         ca_name:
170           get_input: external_cert_ca_name
171         cert_type:
172           get_input: external_cert_cert_type
173         external_certificate_parameters:
174           common_name:
175             get_input: external_cert_common_name
176           sans:
177             get_input: external_cert_sans
178       resource_config:
179         limits:
180           cpu:
181             get_input: datafile-collector_cpu_limit
182           memory:
183             get_input: datafile-collector_memory_limit
184         requests:
185           cpu:
186             get_input: datafile-collector_cpu_request
187           memory:
188             get_input: datafile-collector_memory_request
189     relationships:
190     - type: dcaegen2.relationships.publish_files
191       target: feed0
192   feed0:
193     type: dcaegen2.nodes.Feed
194     properties:
195       feed_name:
196         get_input: feed0_name
197       useExisting: true