001346682c0304aac3587cd32cae708523c71bd3
[cps/cps-temporal.git] / docs / content / deployment.rst
1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4 ..
5 .. Copyright (C) 2021-2022 Bell Canada
6 .. Modifications Copyright (C) 2021 Nordix Foundation
7
8 =======================
9 CPS Temporal Deployment
10 =======================
11
12 * Deployment_
13 * Configuration_
14 * `Running With Docker`_
15
16 Deployment
17 ==========
18
19 Refer to :ref:`CPS-Deployment<onap-cps:deployment>`
20 page for deployment documentation related to CPS Temporal and all CPS components.
21
22 Once CPS Temporal is successfully deployed and running 2 pods are started,
23 one for running the service and another one for running the database instance:
24
25 .. code:: text
26
27     NAME                                            READY   STATUS             RESTARTS   AGE
28     cps-temporal-d4cf495b9-bbn7b                    1/1     Running            0          8h
29     cps-temporal-db-0                               1/1     Running            0          8h
30
31 Configuration
32 =============
33
34 Application Properties
35 ----------------------
36
37 The following table lists some properties that can be specified as Helm chart
38 values to configure the application to be deployed. This list is not
39 exhaustive.
40
41 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
42 | Property                              | Description                                                                                             | Default Value                 |
43 +=======================================+=========================================================================================================+===============================+
44 | config.appUserName                    | User name used by CPS Temporal service to configure the authentication for REST API it exposes.         | ``cpstemporaluser``           |
45 |                                       |                                                                                                         |                               |
46 |                                       | This is the user name to be used by CPS Temporal REST clients to authenticate themselves.               |                               |
47 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
48 | config.appUserPassword                | Password used by CPS Temporal service to configure the authentication for REST API it exposes.          | Not defined                   |
49 |                                       | This is the password to be used by CPS Temporal REST clients to authenticate themselves.                |                               |
50 |                                       | If not defined, the password is generated when deploying the application.                               |                               |
51 |                                       | See also :ref:`CPS Credentials Retrieval<onap-cps:cps_common_credentials_retrieval>`                    |                               |
52 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
53 | timescaledb.config.pgUserName         | Internal user name used bt CPS Temporal to connect to its own database.                                 | ``cpstemporal``               |
54 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
55 | timescaledb.config.pgUserPassword     | Internal password used bt CPS Temporal to connect to its own database.                                  | Not defined                   |
56 |                                       |                                                                                                         |                               |
57 |                                       | If not defined, the password is generated when deploying the application.                               |                               |
58 |                                       |                                                                                                         |                               |
59 |                                       | See also :ref:`credentials` section.                                                                    |                               |
60 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
61 | config.eventConsumption.              | Kafka hostname and port                                                                                 | ``message-router-kafka:9092`` |
62 | spring.kafka.bootstrap-servers        |                                                                                                         |                               |
63 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
64 | config.eventConsumption.              | Kafka consumer group id                                                                                 | ``cps-temporal-group``        |
65 | spring.kafka.consumer.group-id        |                                                                                                         |                               |
66 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
67 | config.eventConsumption.              | Kafka topic to listen to                                                                                | ``cps.data-updated-events``   |
68 | app.listener.data-updated.topic       |                                                                                                         |                               |
69 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
70 | config.eventConsumption.              | Kafka security protocol.                                                                                | ``PLAINTEXT``                 |
71 | spring.kafka.security.protocol        | Some possible values are:                                                                               |                               |
72 |                                       |                                                                                                         |                               |
73 |                                       | * ``PLAINTEXT``                                                                                         |                               |
74 |                                       | * ``SASL_PLAINTEXT``, for authentication                                                                |                               |
75 |                                       | * ``SASL_SSL``, for authentication and encryption                                                       |                               |
76 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
77 | config.eventConsumption.              | Kafka security SASL mechanism. Required for SASL_PLAINTEXT and SASL_SSL protocols.                      | Not defined                   |
78 | spring.kafka.properties.              | Some possible values are:                                                                               |                               |
79 | sasl.mechanism                        |                                                                                                         |                               |
80 |                                       | * ``PLAIN``, for PLAINTEXT                                                                              |                               |
81 |                                       | * ``SCRAM-SHA-512``, for SSL                                                                            |                               |
82 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
83 | config.eventConsumption.              | Kafka security SASL JAAS configuration. Required for SASL_PLAINTEXT and SASL_SSL protocols.             | Not defined                   |
84 | spring.kafka.properties.              | Some possible values are:                                                                               |                               |
85 | sasl.jaas.config                      |                                                                                                         |                               |
86 |                                       | * ``org.apache.kafka.common.security.plain.PlainLoginModule required username="..." password="...";``,  |                               |
87 |                                       |   for PLAINTEXT                                                                                         |                               |
88 |                                       | * ``org.apache.kafka.common.security.scram.ScramLoginModule required username="..." password="...";``,  |                               |
89 |                                       |   for SSL                                                                                               |                               |
90 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
91 | config.eventConsumption.              | Kafka security SASL SSL store type. Required for SASL_SSL protocol.                                     | Not defined                   |
92 | spring.kafka.ssl.trust-store-type     | Some possible values are:                                                                               |                               |
93 |                                       |                                                                                                         |                               |
94 |                                       | * ``JKS``                                                                                               |                               |
95 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
96 | config.eventConsumption.              | Kafka security SASL SSL store file location. Required for SASL_SSL protocol.                            | Not defined                   |
97 | spring.kafka.ssl.trust-store-location |                                                                                                         |                               |
98 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
99 | config.eventConsumption.              | Kafka security SASL SSL store password. Required for SASL_SSL protocol.                                 | Not defined                   |
100 | spring.kafka.ssl.trust-store-password |                                                                                                         |                               |
101 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
102 | config.eventConsumption.              | Kafka security SASL SSL broker hostname identification verification. Required for SASL_SSL protocol.    | Not defined                   |
103 | spring.kafka.properties.              | Possible value is:                                                                                      |                               |
104 | ssl.endpoint.identification.algorithm |                                                                                                         |                               |
105 |                                       | * ``""``, empty string to disable                                                                       |                               |
106 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
107 | config.additional.                    | Maximum number of elements that can be retrieved by a single REST API query request                     | ``20``                        |
108 | app.query.response.max-page-size      | using pagination feature.                                                                               |                               |
109 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
110 | config.additional.                    | Maximum number of database connections in the connection pool.                                          | ``10``                        |
111 | spring.datasource.hikari.             |                                                                                                         |                               |
112 | maximumPoolSize                       |                                                                                                         |                               |
113 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
114
115 .. _credentials:
116
117 Credentials
118 -----------
119
120 Once the deployment is completed, refer to :ref:`CPS Credentials Retrieval<onap-cps:cps_common_credentials_retrieval>`
121  for more information related to credentials retrieval.
122
123 Running With Docker
124 ===================
125
126 For development purposes, CPS Temporal can be ran on any environment using
127 Docker. Refer to `README.md <https://github.com/onap/cps-cps-temporal/blob/master/README.md>`_
128 and `docker-compose.yml <https://github.com/onap/cps-cps-temporal/blob/master/docker-compose.yml>`_
129 files for more details.
130
131 Upgrade
132 =======
133
134 **Cps data-updated-event schema v2**
135
136 Cps data-updated-event schema v2 used in Jakarta is backward compatible with data-updated-event schema v1 used in Istanbul.
137
138 It means that consumers using the schema v2 can process events generated by producers using the schema v2 or v1.
139
140 This implies that cps temporal (consumer) must be upgraded from Istanbul to Jakarta at the same time or before cps core (producer) is upgraded from Istanbul to Jakarta.