8b134f3d8d0da041b6657f76ba75fff2df887a9f
[dcaegen2/platform/blueprints.git] / blueprints / k8s-ves.yaml
1 # -*- indent-tabs-mode: nil -*- # vi: set expandtab:
2 #
3 # ============LICENSE_START====================================================
4 # =============================================================================
5 # Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.
6 # Copyright (c) 2020 Nokia. All rights reserved.
7 # =============================================================================
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 #
12 #      http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
19 # ============LICENSE_END======================================================
20
21 tosca_definitions_version: cloudify_dsl_1_3
22
23 imports:
24   - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
25   - plugin:k8splugin?version=3.4.2
26
27 inputs:
28   ves_other_publish_url:
29     type: string
30     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_OTHER_OUTPUT"
31   ves_heartbeat_publish_url:
32     type: string
33     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT"
34   ves_fault_publish_url:
35     type: string
36     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_FAULT_OUTPUT"
37   ves_measurement_publish_url:
38     type: string
39     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT"
40   ves_notification_publish_url:
41     type: string
42     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
43   ves_pnfRegistration_publish_url:
44     type: string
45     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT"
46   ves_3gpp_fault_supervision_publish_url:
47     type: string
48     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT"
49   ves_3gpp_provisioning_publish_url:
50     type: string
51     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT"
52   ves_3gpp_hearbeat_publish_url:
53     type: string
54     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT"
55   ves_3gpp_performance_assurance_publish_url:
56     type: string
57     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT"
58   tag_version:
59     type: string
60     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.7.9"
61   internal_port:
62     type: string
63     description: Kubernetes node port on which collector is exposed
64     default: "8080"
65   external_port:
66     type: string
67     description: Kubernetes node port on which collector is exposed
68     default: "30235"
69   internal_port_tls:
70     type: string
71     description: Kubernetes node port on which collector is exposed
72     default: "8443"
73   external_port_tls:
74     type: string
75     description: Kubernetes node port on which collector is exposed
76     default: "30417"
77   auth_method:
78     type: string
79     default: "noAuth"
80   service_component_type:
81     type: string
82     default: "dcae-ves-collector"
83   service_id:
84     type: string
85     default: "dcae-ves-collector"
86   service_component_name_override:
87     type: string
88     default: "dcae-ves-collector"
89   enable_tls:
90     type: boolean
91     default: false
92   external_cert_cert_type:
93     type: string
94     description: Output type
95     default: "JKS"
96   external_cert_ca_name:
97     type: string
98     description: Name of Certificate Authority configured on CertService side.
99     default: "RA"
100   external_cert_common_name:
101     type: string
102     description: Common name which should be present in certificate.
103     default: "dcae-ves-collector"
104   external_cert_sans:
105     type: string
106     description: "List of Subject Alternative Names (SANs) which should be present
107       in certificate. Delimiter - : Should contain common_name value and other FQDNs
108       under which given component is accessible."
109     default: "dcae-ves-collector:ves-collector:ves"
110   external_cert_use_external_tls:
111     type: boolean
112     description: Flag to indicate external tls enable/disable.
113     default: false
114   replicas:
115     type: integer
116     description: number of instances
117     default: 1
118   user_list:
119     type: string
120     description: List of user,password separated by pipe; pwd should be generated by using crypt-password tool (https://nexus.onap.org/#nexus-search;quick~crypt-password)
121     default: "sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6|demouser,$2a$10$1cc.COcqV/d3iT2N7BjPG.S6ZKv2jpb9a5MV.o7lMih/GpjJRX.Ce"
122   collector_externalSchema_checkflag:
123     type: integer
124     default: 1
125   collector_externalSchema_schemasLocation:
126     type: string
127     default: "./etc/externalRepo/"
128   collector_externalSchema_mappingFileLocation:
129     type: string
130     default: "./etc/externalRepo/schema-map.json"
131 node_templates:
132   ves:
133     interfaces:
134       cloudify.interfaces.lifecycle:
135         start:
136           inputs:
137             ports:
138               - concat: [{get_input: internal_port},":",{get_input: external_port}]
139               - concat: [{get_input: internal_port_tls},":",{get_input: external_port_tls}]
140     properties:
141       application_config:
142         collector.dmaap.streamid: fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurement=ves-measurement|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance
143         collector.inputQueue.maxPending: "8096"
144         collector.keystore.file.location: /opt/app/dcae-certificate/cert.jks
145         collector.keystore.passwordfile: /opt/app/dcae-certificate/jks.pass
146         collector.truststore.file.location: /opt/app/dcae-certificate/trust.jks
147         collector.truststore.passwordfile: /opt/app/dcae-certificate/trust.pass
148         collector.schema.checkflag: "1"
149         collector.schema.file: "{\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.2_ONAP.json\"}"
150         collector.externalSchema.checkflag:
151           get_input: collector_externalSchema_checkflag
152         collector.externalSchema.schemasLocation:
153           get_input: collector_externalSchema_schemasLocation
154         collector.externalSchema.mappingFileLocation:
155           get_input: collector_externalSchema_mappingFileLocation
156         event.externalSchema.schemaRefPath: $.event.stndDefinedFields.schemaReference
157         event.externalSchema.stndDefinedDataPath: $.event.stndDefinedFields.data
158         collector.service.port: "8080"
159         collector.service.secure.port: "8443"
160         event.transform.flag: "0"
161         auth.method:
162           get_input: auth_method
163         header.authlist:
164           get_input: user_list
165         services_calls: []
166         streams_publishes:
167           ves-fault:
168             dmaap_info:
169               topic_url:
170                 get_input: ves_fault_publish_url
171             type: message_router
172           ves-measurement:
173             dmaap_info:
174               topic_url:
175                 get_input: ves_measurement_publish_url
176             type: message_router
177           ves-notification:
178             dmaap_info:
179               topic_url:
180                 get_input: ves_notification_publish_url
181             type: message_router
182           ves-pnfRegistration:
183             dmaap_info:
184               topic_url:
185                 get_input: ves_pnfRegistration_publish_url
186             type: message_router
187           ves-heartbeat:
188             dmaap_info:
189               topic_url:
190                 get_input: ves_heartbeat_publish_url
191             type: message_router
192           ves-other:
193             dmaap_info:
194               topic_url:
195                 get_input: ves_other_publish_url
196             type: message_router
197           ves-3gpp-fault-supervision:
198             dmaap_info:
199               topic_url:
200                 get_input: ves_3gpp_fault_supervision_publish_url
201             type: message_router
202           ves-3gpp-provisioning:
203             dmaap_info:
204               topic_url:
205                 get_input: ves_3gpp_provisioning_publish_url
206             type: message_router
207           ves-3gpp-heartbeat:
208             dmaap_info:
209               topic_url:
210                 get_input: ves_3gpp_hearbeat_publish_url
211             type: message_router
212           ves-3gpp-performance-assurance:
213             dmaap_info:
214               topic_url:
215                 get_input: ves_3gpp_performance_assurance_publish_url
216             type: message_router
217         collector.dynamic.config.update.frequency: "5"
218       docker_config:
219         healthcheck:
220           endpoint: /healthcheck
221           interval: 15s
222           timeout: 1s
223           type: http
224       image:
225         get_input: tag_version
226       replicas: {get_input: replicas}
227       service_component_type: { get_input: service_component_type }
228       service_id: { get_input: service_id }
229       service_component_name_override: { get_input: service_component_name_override }
230       log_info:
231         log_directory: "/opt/app/VESCollector/logs"
232       tls_info:
233         cert_directory: '/opt/app/dcae-certificate/'
234         use_tls:
235           get_input: enable_tls
236       external_cert:
237         external_cert_directory: '/opt/app/dcae-certificate/'
238         use_external_tls:
239           get_input: external_cert_use_external_tls
240         cert_type:
241           get_input: external_cert_cert_type
242         ca_name:
243           get_input: external_cert_ca_name
244         external_certificate_parameters:
245           common_name:
246             get_input: external_cert_common_name
247           sans:
248             get_input: external_cert_sans
249     type: dcae.nodes.ContainerizedServiceComponent