[DCAE] INFO.yaml update
[dcaegen2/platform/blueprints.git] / blueprints / k8s-hv-ves.yaml
1 # -*- indent-tabs-mode: nil -*- # vi: set expandtab:
2 #
3 # ============LICENSE_START========================================================
4 # =================================================================================
5 # Copyright (C) 2018-2019 NOKIA
6 # Modifications Copyright (c) 2020-2021 AT&T Intellectual Property.  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.3,<4.0.0
26
27 inputs:
28   tag_version:
29     type: string
30     default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.9.1'
31   service_component_type:
32     type: string
33     default: 'dcae-hv-ves-collector'
34   service_id:
35     type: string
36     default: "dcae-hv-ves-collector"
37   replicas:
38     type: integer
39     description: number of instances
40     default: 1
41   host_port:
42     type: integer
43     description: Network port that the platform service is expecting to expose on the host
44     default: 30222
45   container_port:
46     type: integer
47     description: Network port that the platform service exposes in the container
48     default: 6061
49   kafka_bootstrap_servers:
50     type: string
51     default: 'message-router-kafka:9092'
52   kafka_username:
53     type: string
54     default: 'admin'
55   kafka_password:
56     type: string
57     default: 'admin_secret'
58   perf3gpp_kafka_topic:
59     type: string
60     default: 'HV_VES_PERF3GPP'
61   log_level:
62     type: string
63     default: 'INFO'
64   server_idle_timeout_sec:
65     type: integer
66     default: 300
67   cbs_request_interval_sec:
68     type: integer
69     default: 5
70   security_ssl_disable:
71     type: boolean
72     default: false
73   security_keys_key_store_file:
74     type: string
75     default: '/etc/ves-hv/ssl/cert.jks'
76   security_keys_key_store_password_file:
77     type: string
78     default: '/etc/ves-hv/ssl/jks.pass'
79   security_keys_trust_store_file:
80     type: string
81     default: '/etc/ves-hv/ssl/trust.jks'
82   security_keys_trust_store_password_file:
83     type: string
84     default: '/etc/ves-hv/ssl/trust.pass'
85   use_tls:
86     type: boolean
87     default: true
88   service_component_name_override:
89     type: string
90     default: "dcae-hv-ves-collector"
91   external_cert_cert_type:
92     type: string
93     description: Output type
94     default: "JKS"
95   external_cert_ca_name:
96     type: string
97     description: Name of Certificate Authority configured on CertService side.
98     default: "RA"
99   external_cert_common_name:
100     type: string
101     description: Common name which should be present in certificate.
102     default: "dcae-hv-ves-collector"
103   external_cert_sans:
104     type: string
105     description: "List of Subject Alternative Names (SANs) which should be present
106       in certificate. Delimiter - , Should contain common_name value and other FQDNs
107       under which given component is accessible."
108     default: "dcae-hv-ves-collector,hv-ves-collector,hv-ves"
109   external_cert_use_external_tls:
110     type: boolean
111     description: Flag to indicate external tls enable/disable.
112     default: false
113 node_templates:
114   hv-ves:
115     interfaces:
116       cloudify.interfaces.lifecycle:
117         start:
118           inputs:
119             envs:
120               JAVA_OPTS: { concat: [ '-Dlogback.configurationFile=/etc/ONAP/', { get_input: service_component_type }, '/logback.xml' ] }
121     properties:
122       application_config:
123         logLevel: { get_input: log_level }
124         server.idleTimeoutSec: { get_input: server_idle_timeout_sec }
125         server.listenPort: { get_input: container_port }
126         cbs.requestIntervalSec: { get_input: cbs_request_interval_sec}
127         security.sslDisable: { get_input: security_ssl_disable }
128         security.keys.keyStoreFile: { get_input: security_keys_key_store_file }
129         security.keys.keyStorePasswordFile: { get_input: security_keys_key_store_password_file }
130         security.keys.trustStoreFile: { get_input: security_keys_trust_store_file }
131         security.keys.trustStorePasswordFile: { get_input: security_keys_trust_store_password_file }
132         streams_publishes:
133           perf3gpp:
134             type: kafka
135             aaf_credentials:
136               username: { get_input: kafka_username }
137               password: { get_input: kafka_password }
138             kafka_info:
139               bootstrap_servers: { get_input: kafka_bootstrap_servers }
140               topic_name: { get_input: perf3gpp_kafka_topic }
141       docker_config:
142         healthcheck:
143           type: script
144           script: "/opt/ves-hv-collector/healthcheck.sh"
145           interval: 15s
146           timeout: 2s
147         ports:
148           - { concat: [ { get_input: container_port }, ':', { get_input: host_port } ] }
149       image: { get_input: tag_version }
150       replicas: { get_input: replicas }
151       service_component_type: { get_input: service_component_type }
152       service_id: { get_input: service_id }
153       service_component_name_override: { get_input: service_component_name_override }
154       log_info:
155         log_directory: { concat: [ '/var/log/ONAP/', { get_input: service_component_type } ] }
156       tls_info:
157         cert_directory: '/etc/ves-hv/ssl'
158         use_tls: { get_input: use_tls }
159       external_cert:
160         external_cert_directory: '/etc/ves-hv/ssl'
161         use_external_tls:
162           get_input: external_cert_use_external_tls
163         cert_type:
164           get_input: external_cert_cert_type
165         ca_name:
166           get_input: external_cert_ca_name
167         external_certificate_parameters:
168           common_name:
169             get_input: external_cert_common_name
170           sans:
171             get_input: external_cert_sans
172     type: dcae.nodes.ContainerizedServiceComponent