blob: caad39783b9121e1b736bbe003ee8aac1c7412df [file] [log] [blame]
kjaniak53ba1702018-10-25 14:25:13 +02001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3
4
5.. _deployment:
6
7Deployment
8============
9
Filip Krzywka12acf3e2019-03-19 15:53:15 +010010To run HV-VES Collector container you need to specify required command line options and environment variables.
kjaniak53ba1702018-10-25 14:25:13 +020011
Filip Krzywka12acf3e2019-03-19 15:53:15 +010012Command line parameters can be specified either by using long form (--long-form) or short form (-s) followed by argument if needed (see `Arg` column in table below). These parameters can be omitted if corresponding environment variables are set. These variables are named after command line option name rewritten using `UPPER_SNAKE_CASE` and prepended with `VESHV_` prefix, for example `VESHV_CONFIGURATION_FILE`.
kjaniak53ba1702018-10-25 14:25:13 +020013
Filip Krzywka12acf3e2019-03-19 15:53:15 +010014Command line options have precedence over environment variables in cases when both are present.
kjaniak53ba1702018-10-25 14:25:13 +020015
Filip Krzywka12acf3e2019-03-19 15:53:15 +010016Currently HV-VES requires single command line parameter which points to base configuration file.
kjaniak53ba1702018-10-25 14:25:13 +020017
Filip Krzywka12acf3e2019-03-19 15:53:15 +010018.. csv-table::
19 :widths: auto
20 :delim: ;
21 :header: Long form , Short form , Arg , Env form , Description
kjaniak53ba1702018-10-25 14:25:13 +020022
Filip Krzywka12acf3e2019-03-19 15:53:15 +010023 configuration-file ; c ; yes ; VESHV_CONFIGURATION_FILE ; Path to JSON file containing HV-VES configuration
24
Jakub Dudycz0c997922019-05-09 13:17:34 +020025Environment variables that are required by HV-VES are used by collector for provisioning of run-time configuration and are provided by DCAE platform.
Filip Krzywka12acf3e2019-03-19 15:53:15 +010026
27.. csv-table::
28 :widths: auto
29 :delim: ;
30 :header: Environment variable name , Description
31
32 CONSUL_HOST ; Hostname under which Consul service is available
33 CONFIG_BINDING_SERVICE ; Hostname under which Config Binding Service is available
34 HOSTNAME ; Configuration key of HV-VES as seen by CBS, usually *dcae-hv-ves-collector*
35
36There is also optional command line parameter which configures container-internal port for Healthcheck Server API (see :ref:`healthcheck_and_monitoring`).
37
38.. csv-table::
39 :widths: auto
40 :delim: ;
41 :header: Long form , Short form , Arg , Env form , Description
42
43 health-check-api-port ; H ; yes ; VESHV_HEALTH_CHECK_API_PORT ; Health check rest api listen port
44
45.. _configuration_file:
46
47Configuration file
48------------------
49
50File must provide base configuration for HV-VES Collector in JSON format.
51
52Some entries in configuration can also be obtained from Config Binding Service (see :ref:`run_time_configuration`). **Every entry defined in configuration file will be OVERRIDEN if it is also present in run-time configuration.**
53
54Following JSON shows every possible configuration option. Default file shipped with HV-VES container can be found in the collector's repository (see :ref:`repositories`).
55
56.. literalinclude:: resources/base-configuration.json
57 :language: json
kjaniak53ba1702018-10-25 14:25:13 +020058
59
Filip Krzywka12acf3e2019-03-19 15:53:15 +010060The configuration is split into smaller sections.
61Tables show restrictions on fields in file configuration and short description.
kjaniak53ba1702018-10-25 14:25:13 +020062
Filip Krzywka12acf3e2019-03-19 15:53:15 +010063.. csv-table::
64 :widths: auto
65 :delim: ;
66 :header-rows: 2
kjaniak53ba1702018-10-25 14:25:13 +020067
Filip Krzywka12acf3e2019-03-19 15:53:15 +010068 Server
69 Key ; Value type ; Description
70 server.listenPort ; number ; Port on which HV-VES listens internally
Jakub Dudycz0c997922019-05-09 13:17:34 +020071 server.idleTimeoutSec ; number ; Idle timeout for remote hosts. After given time without any data exchange, the connection is closed
kjaniak53ba1702018-10-25 14:25:13 +020072
Filip Krzywka12acf3e2019-03-19 15:53:15 +010073.. csv-table::
74 :widths: auto
75 :delim: ;
76 :header-rows: 2
kjaniak53ba1702018-10-25 14:25:13 +020077
Filip Krzywka12acf3e2019-03-19 15:53:15 +010078 Config Binding Service
79 Key ; Value type ; Description
80 cbs.firstRequestDelaySec ; number ; Delay of first request to Config Binding Service in seconds
81 cbs.requestIntervalSec ; number ; Interval of configuration requests in seconds
kjaniak53ba1702018-10-25 14:25:13 +020082
Filip Krzywka12acf3e2019-03-19 15:53:15 +010083.. csv-table::
84 :widths: auto
85 :delim: ;
86 :header-rows: 2
kjaniak53ba1702018-10-25 14:25:13 +020087
Filip Krzywka12acf3e2019-03-19 15:53:15 +010088 Security
89 Key ; Value type ; Description
90 security.sslDisable ; boolean ; Disables SSL encryption
91 security.keys.keyStoreFile ; String ; Key store path used in HV-VES incoming connections
92 security.keys.keyStorePasswordFile ; String ; Key store password file used in HV-VES incoming connections
93 security.keys.trustStoreFile ; String ; Path to file with trusted certificates bundle used in HV-VES incoming connections
94 security.keys.trustStorePasswordFile ; String ; Trust store password file used in HV-VES incoming connections
kjaniak53ba1702018-10-25 14:25:13 +020095
Jakub Dudycz0c997922019-05-09 13:17:34 +020096All security entries are mandatory with `security.sslDisable` set to `false`. Otherwise only `security.sslDisable` needs to be specified. If `security.sslDisable` flag is missing, then it is interpreted as it was set to `false`.
kjaniak53ba1702018-10-25 14:25:13 +020097
Filip Krzywka12acf3e2019-03-19 15:53:15 +010098.. csv-table::
99 :widths: auto
100 :delim: ;
101 :header-rows: 2
102
103 Uncategorized
104 Key ; Value type ; Description
105 logLevel ; String ; Log level on which HV-VES publishes all log messages. Valid argument values are (case insensitive): ERROR, WARN, INFO, DEBUG, TRACE.
106
kjaniak53ba1702018-10-25 14:25:13 +0200107
Filip Krzywkae4dc8b62019-01-17 11:13:23 +0100108Horizontal Scaling
Filip Krzywka12acf3e2019-03-19 15:53:15 +0100109------------------
Filip Krzywkae4dc8b62019-01-17 11:13:23 +0100110
111Kubernetes command line tool (`kubectl`) is recommended for manual horizontal scaling of HV-VES Collector.
112
113To scale HV-VES deployment you need to determine its name and namespace in which it is deployed.
114For default OOM deployment, HV-VES full deployment name is `deployment/dep-dcae-hv-ves-collector` and it is installed under `onap` namespace.
115
1161. If the namespace is unknown, execute the following command to determine possible namespaces.
117
118.. code-block:: bash
119
120 kubectl get namespaces
121
1222. Find desired deployment (in case of huge output you can try final call in combination with `grep hv-ves` command).
123You can also see current replicas amount under a corresponding column.
124
125.. code-block:: bash
126
127 ONAP_NAMESPACE=onap
128 kubectl get --namespace ${ONAP_NAMESPACE} deployment
129
Jakub Dudycz0c997922019-05-09 13:17:34 +02001303. To scale deployment, execute the following commands:
Filip Krzywkae4dc8b62019-01-17 11:13:23 +0100131
132.. code-block:: bash
133
134 DEPLOYMENT_NAME=deployment/dep-dcae-hv-ves-collector
135 DESIRED_REPLICAS_AMOUNT=5
136 kubectl scale --namespace ${ONAP_NAMESPACE} ${DEPLOYMENT_NAME} --replicas=${DESIRED_REPLICAS_AMOUNT}
137
138Result:
139
140.. code-block:: bash
141
142 kubectl get pods --namespace ${ONAP_NAMESPACE} --selector app=dcae-hv-ves-collector