Merge "Modify cmHandle registration for alternateId"
[cps.git] / docs / deployment.rst
index 06e1ddc..eb5804e 100644 (file)
@@ -1,6 +1,6 @@
 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
 .. http://creativecommons.org/licenses/by/4.0
-.. Copyright (C) 2021 Nordix Foundation
+.. Copyright (C) 2021-2022 Nordix Foundation
 .. Modifications Copyright (C) 2021 Bell Canada.
 
 .. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
@@ -19,11 +19,10 @@ This chart includes different cps components referred as <cps-component-name> fu
 
 .. container:: ulist
 
-  - `cps-core <https://github.com/onap/oom/tree/master/kubernetes/cps/components/cps-core>`_
-  - `cps-temporal <https://github.com/onap/oom/tree/master/kubernetes/cps/components/cps-temporal>`_
-  - `ncmp-dmi-plugin <https://github.com/onap/oom/tree/master/kubernetes/cps/components/ncmp-dmi-plugin>`_
+  - `cps-core <https://github.com/onap/oom/tree/master/kubernetes/cps/components/cps-core>`__
+  - `ncmp-dmi-plugin <https://github.com/onap/oom/tree/master/kubernetes/cps/components/ncmp-dmi-plugin>`__
 
-Please refer to the `OOM documentation <https://docs.onap.org/projects/onap-oom/en/latest/oom_user_guide.html>`_ on how to install and deploy ONAP.
+Please refer to the `OOM documentation <https://docs.onap.org/projects/onap-oom/en/latest/sections/guides/user_guides/oom_user_guide.html>`_ on how to install and deploy ONAP.
 
 Installing or Upgrading CPS Components
 ======================================
@@ -110,9 +109,8 @@ values.yaml file to be used across different components as :
 
 .. container:: ulist
 
-  - `cps-core <https://github.com/onap/oom/blob/master/kubernetes/cps/components/cps-core/values.yaml#L18>`_
-  - `cps-temporal <https://github.com/onap/oom/blob/master/kubernetes/cps/components/cps-temporal/values.yaml#L28>`_
-  - `ncmp-dmi-plugin <https://github.com/onap/oom/blob/master/kubernetes/cps/components/ncmp-dmi-plugin/values.yaml#L22>`_
+  - `cps-core <https://github.com/onap/oom/blob/master/kubernetes/cps/components/cps-core/values.yaml>`_
+  - `ncmp-dmi-plugin <https://github.com/onap/oom/blob/master/kubernetes/cps/components/ncmp-dmi-plugin/values.yaml>`_
 
 Below are the list of secrets for different cps components.
 
@@ -123,17 +121,13 @@ Below are the list of secrets for different cps components.
 +--------------------------+---------------------------------+---------------------------------------------------+
 | cps-core                 | Rest API Authentication         | <my-helm-release>-cps-core-app-user-creds         |
 +--------------------------+---------------------------------+---------------------------------------------------+
-| cps-temporal             | Rest API Authentication         | <my-helm-release>-cps-temporal-app-user-creds     |
-+--------------------------+---------------------------------+---------------------------------------------------+
-| cps-temporal             | Database authentication         | <my-helm-release>-cps-temporal-pg-user-creds      |
-+--------------------------+---------------------------------+---------------------------------------------------+
 | ncmp-dmi-plugin          | Rest API Authentication         | <my-helm-release>-cps-dmi-plugin-user-creds       |
 +--------------------------+---------------------------------+---------------------------------------------------+
 | ncmp-dmi-plugin          | SDNC authentication             | <my-helm-release>-ncmp-dmi-plugin-sdnc-creds      |
 +--------------------------+---------------------------------+---------------------------------------------------+
 
 The credential values from these secrets are configured in running container as environment variables. Eg:
-`cps core deployment.yaml <https://github.com/onap/oom/blob/master/kubernetes/cps/components/cps-core/templates/deployment.yaml#L46>`_
+`cps core deployment.yaml <https://github.com/onap/oom/blob/master/kubernetes/cps/components/cps-core/templates/deployment.yaml>`_
 
 If no specific passwords are provided to the chart as override values for deployment, then passwords are automatically
 generated when deploying the Helm release. Below command can be used to retrieve application property credentials
@@ -157,8 +151,10 @@ To get a listing of the cps-core Pods, run the following command:
   dev-cps-core-postgres-primary-f7766d46c-s9d5b         1/1     Running            0          24h
   dev-cps-core-postgres-replica-84659d68f9-6qnt4        1/1     Running            0          24h
 
+.. note::
+    The CPS Service will have to be restarted each time a change is made to a configurable property.
 
-Additional Cps-Core Customizations
+Additional CPS-Core Customizations
 ==================================
 
 The following table lists some properties that can be specified as Helm chart
@@ -175,16 +171,6 @@ Any spring supported property can be configured by providing in ``config.additio
 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
 | config.appUserPassword                | Password used by cps-core service to configure the authentication for REST API it exposes.              | Not defined                   |
 |                                       |                                                                                                         |                               |
-|                                       | This is the password to be used by CPS Temporal REST clients to authenticate themselves.                |                               |
-|                                       |                                                                                                         |                               |
-|                                       | If not defined, the password is generated when deploying the application.                               |                               |
-|                                       |                                                                                                         |                               |
-|                                       | See also :ref:`cps_common_credentials_retrieval`.                                                       |                               |
-+---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.dmiPluginUserName              | User name used by cps-core to authenticate themselves for using ncmp-dmi-plugin service.                | ``dmiuser``                   |
-+---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.dmiPluginUserPassword          | Internal password used by cps-core to connect to ncmp-dmi-plugin service.                               | Not defined                   |
-|                                       |                                                                                                         |                               |
 |                                       | If not defined, the password is generated when deploying the application.                               |                               |
 |                                       |                                                                                                         |                               |
 |                                       | See also :ref:`cps_common_credentials_retrieval`.                                                       |                               |
@@ -203,8 +189,8 @@ Any spring supported property can be configured by providing in ``config.additio
 | logging.level                         | Logging level set in cps-core                                                                           | info                          |
 |                                       |                                                                                                         |                               |
 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.useStrimziKafka                | If targeting a custom kafka cluster, ie useStrimziKakfa: false, the config.eventPublisher.spring.kafka  | true                          |
-|                                       | values must be set.                                                                                     |                               |
+| config.useStrimziKafka                | If targeting a custom kafka cluster, i.e. useStrimziKafka: false, the                                   | true                          |
+|                                       | config.eventPublisher.spring.kafka values below must be set.                                            |                               |
 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
 | config.eventPublisher.                | Kafka hostname and port                                                                                 | ``<kafka-bootstrap>:9092``    |
 | spring.kafka.bootstrap-servers        |                                                                                                         |                               |
@@ -249,18 +235,8 @@ Any spring supported property can be configured by providing in ``config.additio
 | ssl.endpoint.identification.algorithm |                                                                                                         |                               |
 |                                       | * ``""``, empty string to disable                                                                       |                               |
 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.additional.                    | Kafka topic to publish to cps-temporal                                                                  | ``cps.data-updated-events``   |
-| notification.data-updated.topic       |                                                                                                         |                               |
-+---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.additional.                    | If notification from cps-core to cps-temporal is enabled or not.                                        | ``true``                      |
-| notification.data-updated.enabled     | If this is set to false, then the config.publisher properties could be skipped.                         |                               |
-+---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.additional.                    | Dataspaces to be enabled for publishing events to cps-temporal                                          | ````                          |
-| notification.data-updated.filters.    |                                                                                                         |                               |
-| enabled-dataspaces                    |                                                                                                         |                               |
-+---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.additional.                    | If notifications should be processed in synchronous or asynchronous manner                              | ``false``                     |
-| notification.async.enabled            |                                                                                                         |                               |
+| config.additional.                    | If asynchronous messaging, user notifications, and updated event persistence should be enabled          | ``true``                      |
+| notification.data-updated.enabled     |                                                                                                         |                               |
 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
 | config.additional.                    | Core pool size in asynchronous execution of notification.                                               | ``2``                         |
 | notification.async.executor.          |                                                                                                         |                               |
@@ -278,7 +254,7 @@ Any spring supported property can be configured by providing in ``config.additio
 | notification.async.executor.          |                                                                                                         |                               |
 | wait-for-tasks-to-complete-on-shutdown|                                                                                                         |                               |
 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
-| config.additional.                    | Prefix to be added to the thread name in asynchronous execution of notifications.                       | ``async_``                    |
+| config.additional.                    | Prefix to be added to the thread name in asynchronous execution of notifications.                       | ``Async-``                    |
 | notification.async.executor.          |                                                                                                         |                               |
 | thread-name-prefix                    |                                                                                                         |                               |
 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
@@ -287,8 +263,68 @@ Any spring supported property can be configured by providing in ``config.additio
 | maximumPoolSize                       | including both idle and in-use connections.                                                             |                               |
 +---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
 
+.. _additional-cps-ncmp-customizations:
+
+Additional CPS-NCMP Customizations
+==================================
++---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
+| config.dmiPluginUserName              | User name used by cps-core to authenticate themselves for using ncmp-dmi-plugin service.                | ``dmiuser``                   |
++---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
+| config.dmiPluginUserPassword          | Internal password used by cps-core to connect to ncmp-dmi-plugin service.                               | Not defined                   |
+|                                       |                                                                                                         |                               |
+|                                       | If not defined, the password is generated when deploying the application.                               |                               |
+|                                       |                                                                                                         |                               |
+|                                       | See also :ref:`cps_common_credentials_retrieval`.                                                       |                               |
++---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
+| config.ncmp.timers                    | Specifies the delay in milliseconds in which the module sync watch dog will wake again after finishing. | ``30000``                     |
+| .advised-modules-sync.sleep-time-ms   |                                                                                                         |                               |
+|                                       |                                                                                                         |                               |
++---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
+| config.ncmp.timers                    | Specifies the delay in milliseconds in which the retry mechanism watch dog                              |                               |
+| .locked-modules-sync.sleep-time-ms    | will wake again after finishing.                                                                        | ``300000``                    |
+|                                       |                                                                                                         |                               |
+|                                       |                                                                                                         |                               |
++---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
+| config.ncmp.timers                    | Specifies the delay in milliseconds in which the data sync watch dog will wake again after finishing.   | ``30000``                     |
+| .cm-handle-data-sync.sleep-time-ms    |                                                                                                         |                               |
+|                                       |                                                                                                         |                               |
++---------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------+
+
 CPS-Core Docker Installation
 ============================
 
 CPS-Core can also be installed in a docker environment. Latest `docker-compose <https://github.com/onap/cps/blob/master/docker-compose/docker-compose.yml>`_ is included in the repo to start all the relevant services.
 The latest instructions are covered in the `README <https://github.com/onap/cps/blob/master/docker-compose/README.md>`_.
+
+.. Below Label is used by documentation for other CPS components to link here, do not remove even if it gives a warning
+.. _cps_common_distributed_datastructures:
+
+CPS-Core and NCMP Distributed Datastructures
+============================================
+
+CPS-Core and NCMP both internally uses embedded distributed datastructure to replicate the state across various instances for low latency.
+These instances require some additional ports to be available. The default range starts from 5701 and based on the number of instances configured they are incremented sequentially.
+
+Below are the list of distributed datastructures that we have.
+
++--------------+---------------------------------+----------------------------------------------------------+
+| Component    | Datastructure name              |                 Use                                      |
++==============+=================================+==========================================================+
+| cps-core     | anchorDataCache                 | Used to resolve prefix for the container name.           |
++--------------+---------------------------------+----------------------------------------------------------+
+| cps-ncmp     | moduleSyncStartedOnCmHandles    | Watchdog process to register cmHandles.                  |
++--------------+---------------------------------+----------------------------------------------------------+
+| cps-ncmp     | dataSyncSemaphores              | Watchdog process to sync data from the nodes.            |
++--------------+---------------------------------+----------------------------------------------------------+
+| cps-ncmp     | moduleSyncWorkQueue             | Queue used internally for workers to pick the task.      |
++--------------+---------------------------------+----------------------------------------------------------+
+| cps-ncmp     | forwardedSubscriptionEventCache | Keeps track of the LCM Subscription Events.              |
++--------------+---------------------------------+----------------------------------------------------------+
+| cps-ncmp     | untrustworthyCmHandlesSet       | Stores untrustworthy cmHandles whose TrustLevel is NONE. |
++--------------+---------------------------------+----------------------------------------------------------+
+| cps-ncmp     | trustLevelPerDmiPlugin          | Stores the TrustLevel for the dmi-plugins.               |
++--------------+---------------------------------+----------------------------------------------------------+
+| cps-ncmp     | moduleSetTagCacheMapConfig      | Stores the Module Set Tags for cmHandles.                |
++--------------+---------------------------------+----------------------------------------------------------+
+
+Total number of caches : 8