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