blueprint syncup
[dcaegen2/platform/blueprints.git] / blueprints / k8s-hv-ves.yaml-template
1 # -*- indent-tabs-mode: nil -*- # vi: set expandtab:
2 #
3 # ============LICENSE_START====================================================
4 # =============================================================================
5 # Copyright (C) 2018-2019 NOKIA
6 # =============================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #      http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END======================================================
19
20 tosca_definitions_version: cloudify_dsl_1_3
21
22 imports:
23   - 'http://www.getcloudify.org/spec/cloudify/3.4/types.yaml'
24   - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml
25
26 inputs:
27   tag_version:
28     type: string
29     default: '{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.1.0-SNAPSHOT'
30   hv_ves_name:
31     type: string
32     default: 'dcae-hv-ves-collector'
33   replicas:
34     type: integer
35     description: number of instances
36     default: 1
37   host_port:
38     type: integer
39     description: Network port that the platform service is expecting to expose on the host
40     default: 30222
41   container_port:
42     type: integer
43     description: Network port that the platform service exposes in the container
44     default: 6061
45   kafka_bootstrap_servers:
46     type: string
47     default: 'message-router-kafka:9092'
48   perf3gpp_kafka_topic:
49     type: string
50     default: 'HV_VES_PERF3GPP'
51   log_level:
52     type: string
53     default: 'INFO'
54   server_idle_timeout_sec:
55     type: integer
56     default: 300
57   cbs_request_interval_sec:
58     type: integer
59     default: 5
60   security_ssl_disable:
61     type: boolean
62     default: true
63   security_keys_key_store_file:
64     type: string
65     default: '/etc/ves-hv/ssl/cert.jks'
66   security_keys_key_store_password_file:
67     type: string
68     default: '/etc/ves-hv/ssl/jks.pass'
69   security_keys_trust_store_file:
70     type: string
71     default: '/etc/ves-hv/ssl/trust.jks'
72   security_keys_trust_store_password_file:
73     type: string
74     default: '/etc/ves-hv/ssl/trust.pass'
75 node_templates:
76   hv-ves:
77     interfaces:
78       cloudify.interfaces.lifecycle:
79         start:
80           inputs:
81             envs:
82               JAVA_OPTS: { concat: [ '-Dlogback.configurationFile=/etc/ONAP/', { get_input: hv_ves_name }, '/logback.xml' ] }
83     properties:
84       application_config:
85         logLevel: { get_input: log_level }
86         server.idleTimeoutSec: { get_input: server_idle_timeout_sec }
87         server.listenPort: { get_input: container_port }
88         cbs.requestIntervalSec: { get_input: cbs_request_interval_sec}
89         security.sslDisable: { get_input: security_ssl_disable }
90         security.keys.keyStoreFile: { get_input: security_keys_trust_store_file }
91         security.keys.keyStorePasswordFile: { get_input: security_keys_key_store_password_file }
92         security.keys.trustStoreFile: { get_input: security_keys_trust_store_file }
93         security.keys.trustStorePasswordFile: { get_input: security_keys_trust_store_password_file }
94         streams_publishes:
95           perf3gpp:
96             type: kafka
97             kafka_info:
98               bootstrap_servers: { get_input: kafka_bootstrap_servers }
99               topic_name: { get_input: perf3gpp_kafka_topic }
100       docker_config:
101         healthcheck:
102           type: script
103           script: "/opt/ves-hv-collector/healthcheck.sh"
104           interval: 15s
105           timeout: 2s
106       image: { get_input: tag_version }
107       replicas: { get_input: replicas }
108       name: { get_input: hv_ves_name }
109       dns_name: { get_input: hv_ves_name }
110       container_port: { get_input: container_port }
111       host_port: { get_input: host_port }
112       log_info:
113         log_directory: { concat: [ '/var/log/ONAP/', { get_input: hv_ves_name } ] }
114       tls_info:
115         cert_directory: '/etc/ves-hv/ssl/'
116         use_tls: false
117     type: dcae.nodes.ContainerizedPlatformComponent