Add sdlcli chapter to user guide
[ric-plt/sdl.git] / docs / user-guide.rst
index a601b15..57e8bc0 100644 (file)
@@ -238,6 +238,7 @@ configure database backend:
 * DBAAS_SERVICE_PORT
 * DBAAS_SERVICE_SENTINEL_PORT
 * DBAAS_MASTER_NAME
+* DBAAS_NODE_COUNT
 
 After DBaaS service is installed, environment variables are exposed to
 application containers. SDL library will automatically use these environment
@@ -252,17 +253,17 @@ port *6379*::
 
    export DBAAS_SERVICE_HOST=dbaas
    export DBAAS_SERVICE_PORT=6379
+   export DBAAS_NODE_COUNT=1
 
 Besides hostname, IPv4 and IPv6 addresses can be set to *DBAAS_SERVICE_HOST*.
 
 An example how environment variables can be set in bash shell, when Redis
-HA deployment is used. Please note that DBaaS does not support yet HA
-deployment option. Below environment variables are only in the form of an
-example to show how HA deployment would be configured::
+HA deployment is used::
 
-   export DBAAS_MASTER_NAME=my-master-sentinel
+   export DBAAS_MASTER_NAME=my-primary-sentinel
    export DBAAS_SERVICE_HOST=dbaas
    export DBAAS_SERVICE_SENTINEL_PORT=23550
+   export DBAAS_NODE_COUNT=3
 
 .. raw:: pdf
 
@@ -417,11 +418,13 @@ There are two different supported deployment modes for SDL backend data
 storage:
 
 * Standalone (single DB node without redundancy)
-* Redundant (DB node pair working in master/slave redundancy model)
+* Redundant (DB node pair working in primary/replica redundancy model)
 
-SDL does not currently have any intelligent logic (e.g. dynamic scaling) on
-which storage node each namespace data is stored. This area might be developed
-further in the future.
+SDL supports also Redis sentinel based DB cluster where deployment has one or
+more DBAAS Redis sentinel group. Different DBAAS Redis sentinel groups
+can be used to distribute SDL DB operations to different SDL DB instances. When
+more than one DBAAS Redis sentinel group exits the selection of SDL DB instance
+is based on the namespace string hash calculation.
 
 SDL does not prevent backend data storage to be deployed in the same node with
 the SDL client. Such deployments are, however, typically used only in
@@ -495,6 +498,11 @@ Using SDL APIs
   operations. See waitReadyAsync() function
   `doxygen documentation <#doxygen-generated-sdl-api-documentation>`_
   for corresponding asynchronous API for details.
+* Use waitReady() function before doing first operation via synchronous
+  APIs to ensure that SDL and backend data storage are ready to handle
+  operations. See waitReady() function
+  `doxygen documentation <#doxygen-generated-sdl-api-documentation>`_
+  for corresponding synchronous API for details.
 * Avoid using heavy search functions (for example: *AsyncStorage::findKeys()*).
   Rather define your keys so that you know which keys should be read.
 
@@ -525,3 +533,21 @@ Data Management
 .. raw:: pdf
 
    PageBreak
+
+SDLCLI
+******
+
+There is a pre-installed *sdlcli* tool in DBaaS container. With this tool user
+can see statistics of database backend (Redis), check healthiness of DBaaS
+database backend, list database keys and get and set values into database.
+For example to see statistics give below command inside DBaaS container::
+
+    sdlcli statistics
+
+To check healthiness of database::
+
+    sdlcli healthcheck
+
+Use *sdlcli* help to get more information about available commands::
+
+    sdlcli --help