kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 2 | .. http://creativecommons.org/licenses/by/4.0 |
| 3 | |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 4 | .. _deployment: |
| 5 | |
| 6 | Deployment |
| 7 | ============ |
| 8 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 9 | To run HV-VES Collector container you need to specify required command line options and environment variables. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 10 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 11 | Command 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`. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 12 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 13 | Command line options have precedence over environment variables in cases when both are present. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 14 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 15 | Currently HV-VES requires single command line parameter which points to base configuration file. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 16 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 17 | .. csv-table:: |
| 18 | :widths: auto |
| 19 | :delim: ; |
| 20 | :header: Long form , Short form , Arg , Env form , Description |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 21 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 22 | configuration-file ; c ; yes ; VESHV_CONFIGURATION_FILE ; Path to JSON file containing HV-VES configuration |
| 23 | |
Jakub Dudycz | 0c99792 | 2019-05-09 13:17:34 +0200 | [diff] [blame] | 24 | Environment variables that are required by HV-VES are used by collector for provisioning of run-time configuration and are provided by DCAE platform. |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 25 | |
| 26 | .. csv-table:: |
| 27 | :widths: auto |
| 28 | :delim: ; |
| 29 | :header: Environment variable name , Description |
| 30 | |
| 31 | CONSUL_HOST ; Hostname under which Consul service is available |
| 32 | CONFIG_BINDING_SERVICE ; Hostname under which Config Binding Service is available |
| 33 | HOSTNAME ; Configuration key of HV-VES as seen by CBS, usually *dcae-hv-ves-collector* |
| 34 | |
| 35 | There is also optional command line parameter which configures container-internal port for Healthcheck Server API (see :ref:`healthcheck_and_monitoring`). |
| 36 | |
| 37 | .. csv-table:: |
| 38 | :widths: auto |
| 39 | :delim: ; |
| 40 | :header: Long form , Short form , Arg , Env form , Description |
| 41 | |
| 42 | health-check-api-port ; H ; yes ; VESHV_HEALTH_CHECK_API_PORT ; Health check rest api listen port |
| 43 | |
| 44 | .. _configuration_file: |
| 45 | |
| 46 | Configuration file |
| 47 | ------------------ |
| 48 | |
| 49 | File must provide base configuration for HV-VES Collector in JSON format. |
| 50 | |
| 51 | Some 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.** |
| 52 | |
| 53 | Following JSON shows every possible configuration option. Default file shipped with HV-VES container can be found in the collector's repository (see :ref:`repositories`). |
| 54 | |
| 55 | .. literalinclude:: resources/base-configuration.json |
| 56 | :language: json |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 57 | |
| 58 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 59 | The configuration is split into smaller sections. |
| 60 | Tables show restrictions on fields in file configuration and short description. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 61 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 62 | .. csv-table:: |
| 63 | :widths: auto |
| 64 | :delim: ; |
| 65 | :header-rows: 2 |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 66 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 67 | Server |
| 68 | Key ; Value type ; Description |
| 69 | server.listenPort ; number ; Port on which HV-VES listens internally |
Jakub Dudycz | 0c99792 | 2019-05-09 13:17:34 +0200 | [diff] [blame] | 70 | server.idleTimeoutSec ; number ; Idle timeout for remote hosts. After given time without any data exchange, the connection is closed |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 71 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 72 | .. csv-table:: |
| 73 | :widths: auto |
| 74 | :delim: ; |
| 75 | :header-rows: 2 |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 76 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 77 | Config Binding Service |
| 78 | Key ; Value type ; Description |
| 79 | cbs.firstRequestDelaySec ; number ; Delay of first request to Config Binding Service in seconds |
| 80 | cbs.requestIntervalSec ; number ; Interval of configuration requests in seconds |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 81 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 82 | .. csv-table:: |
| 83 | :widths: auto |
| 84 | :delim: ; |
| 85 | :header-rows: 2 |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 86 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 87 | Security |
| 88 | Key ; Value type ; Description |
| 89 | security.sslDisable ; boolean ; Disables SSL encryption |
| 90 | security.keys.keyStoreFile ; String ; Key store path used in HV-VES incoming connections |
| 91 | security.keys.keyStorePasswordFile ; String ; Key store password file used in HV-VES incoming connections |
| 92 | security.keys.trustStoreFile ; String ; Path to file with trusted certificates bundle used in HV-VES incoming connections |
| 93 | security.keys.trustStorePasswordFile ; String ; Trust store password file used in HV-VES incoming connections |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 94 | |
Jakub Dudycz | 0c99792 | 2019-05-09 13:17:34 +0200 | [diff] [blame] | 95 | All 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`. |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 96 | |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 97 | .. csv-table:: |
| 98 | :widths: auto |
| 99 | :delim: ; |
| 100 | :header-rows: 2 |
| 101 | |
| 102 | Uncategorized |
| 103 | Key ; Value type ; Description |
| 104 | logLevel ; String ; Log level on which HV-VES publishes all log messages. Valid argument values are (case insensitive): ERROR, WARN, INFO, DEBUG, TRACE. |
| 105 | |
kjaniak | 53ba170 | 2018-10-25 14:25:13 +0200 | [diff] [blame] | 106 | |
Filip Krzywka | e4dc8b6 | 2019-01-17 11:13:23 +0100 | [diff] [blame] | 107 | Horizontal Scaling |
Filip Krzywka | 12acf3e | 2019-03-19 15:53:15 +0100 | [diff] [blame] | 108 | ------------------ |
Filip Krzywka | e4dc8b6 | 2019-01-17 11:13:23 +0100 | [diff] [blame] | 109 | |
| 110 | Kubernetes command line tool (`kubectl`) is recommended for manual horizontal scaling of HV-VES Collector. |
| 111 | |
| 112 | To scale HV-VES deployment you need to determine its name and namespace in which it is deployed. |
| 113 | For default OOM deployment, HV-VES full deployment name is `deployment/dep-dcae-hv-ves-collector` and it is installed under `onap` namespace. |
| 114 | |
| 115 | 1. If the namespace is unknown, execute the following command to determine possible namespaces. |
| 116 | |
| 117 | .. code-block:: bash |
| 118 | |
| 119 | kubectl get namespaces |
| 120 | |
| 121 | 2. Find desired deployment (in case of huge output you can try final call in combination with `grep hv-ves` command). |
| 122 | You can also see current replicas amount under a corresponding column. |
| 123 | |
| 124 | .. code-block:: bash |
| 125 | |
| 126 | ONAP_NAMESPACE=onap |
| 127 | kubectl get --namespace ${ONAP_NAMESPACE} deployment |
| 128 | |
Jakub Dudycz | 0c99792 | 2019-05-09 13:17:34 +0200 | [diff] [blame] | 129 | 3. To scale deployment, execute the following commands: |
Filip Krzywka | e4dc8b6 | 2019-01-17 11:13:23 +0100 | [diff] [blame] | 130 | |
| 131 | .. code-block:: bash |
| 132 | |
| 133 | DEPLOYMENT_NAME=deployment/dep-dcae-hv-ves-collector |
| 134 | DESIRED_REPLICAS_AMOUNT=5 |
| 135 | kubectl scale --namespace ${ONAP_NAMESPACE} ${DEPLOYMENT_NAME} --replicas=${DESIRED_REPLICAS_AMOUNT} |
| 136 | |
| 137 | Result: |
| 138 | |
| 139 | .. code-block:: bash |
| 140 | |
| 141 | kubectl get pods --namespace ${ONAP_NAMESPACE} --selector app=dcae-hv-ves-collector |