Disable plain http protocol on production interface
[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 # =============================================================================
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   - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
24   - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R6/k8splugin/1.7.2/k8splugin_types.yaml
25
26 inputs:
27   tag_version:
28     type: string
29     default: 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.4.0'
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   kafka_username:
49     type: string
50     default: 'admin'
51   kafka_password:
52     type: string
53     default: 'admin_secret'
54   perf3gpp_kafka_topic:
55     type: string
56     default: 'HV_VES_PERF3GPP'
57   log_level:
58     type: string
59     default: 'INFO'
60   server_idle_timeout_sec:
61     type: integer
62     default: 300
63   cbs_request_interval_sec:
64     type: integer
65     default: 5
66   security_ssl_disable:
67     type: boolean
68     default: false
69   security_keys_key_store_file:
70     type: string
71     default: '/etc/ves-hv/ssl/cert.jks'
72   security_keys_key_store_password_file:
73     type: string
74     default: '/etc/ves-hv/ssl/jks.pass'
75   security_keys_trust_store_file:
76     type: string
77     default: '/etc/ves-hv/ssl/trust.jks'
78   security_keys_trust_store_password_file:
79     type: string
80     default: '/etc/ves-hv/ssl/trust.pass'
81   use_tls:
82     type: boolean
83     default: true
84 node_templates:
85   hv-ves:
86     interfaces:
87       cloudify.interfaces.lifecycle:
88         start:
89           inputs:
90             envs:
91               JAVA_OPTS: { concat: [ '-Dlogback.configurationFile=/etc/ONAP/', { get_input: hv_ves_name }, '/logback.xml' ] }
92     properties:
93       application_config:
94         logLevel: { get_input: log_level }
95         server.idleTimeoutSec: { get_input: server_idle_timeout_sec }
96         server.listenPort: { get_input: container_port }
97         cbs.requestIntervalSec: { get_input: cbs_request_interval_sec}
98         security.sslDisable: { get_input: security_ssl_disable }
99         security.keys.keyStoreFile: { get_input: security_keys_key_store_file }
100         security.keys.keyStorePasswordFile: { get_input: security_keys_key_store_password_file }
101         security.keys.trustStoreFile: { get_input: security_keys_trust_store_file }
102         security.keys.trustStorePasswordFile: { get_input: security_keys_trust_store_password_file }
103         streams_publishes:
104           perf3gpp:
105             type: kafka
106             aaf_credentials:
107               username: { get_input: kafka_username }
108               password: { get_input: kafka_password }
109             kafka_info:
110               bootstrap_servers: { get_input: kafka_bootstrap_servers }
111               topic_name: { get_input: perf3gpp_kafka_topic }
112       docker_config:
113         healthcheck:
114           type: script
115           script: "/opt/ves-hv-collector/healthcheck.sh"
116           interval: 15s
117           timeout: 2s
118       image: { get_input: tag_version }
119       replicas: { get_input: replicas }
120       name: { get_input: hv_ves_name }
121       dns_name: { get_input: hv_ves_name }
122       container_port: { get_input: container_port }
123       host_port: { get_input: host_port }
124       log_info:
125         log_directory: { concat: [ '/var/log/ONAP/', { get_input: hv_ves_name } ] }
126       tls_info:
127         cert_directory: '/etc/ves-hv/ssl'
128         use_tls: { get_input: use_tls }
129     type: dcae.nodes.ContainerizedPlatformComponent