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