summaryrefslogtreecommitdiffstats
path: root/docs/sections/services/heartbeat-ms
diff options
context:
space:
mode:
authorHansen, Tony (th1395) <th1395@att.com>2023-05-23 21:27:17 +0000
committerHansen, Tony (th1395) <th1395@att.com>2023-05-31 21:01:29 +0000
commit663df2c1b8d9176094a62b00b7e80de096180621 (patch)
tree849841dc428fcfba07d9c39494f95ccd1f25da8a /docs/sections/services/heartbeat-ms
parentbcd436a1be4fbe2c8ad7ce074d86b94b8ff44f4e (diff)
clean up some sphinx warnings
Change-Id: I8c2d925e8b27b4740227af0be3ab5d6f7153ec38 Signed-off-by: Hansen, Tony (th1395) <th1395@att.com> Issue-ID: DCAEGEN2-3399 Signed-off-by: Hansen, Tony (th1395) <th1395@att.com> Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com> Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
Diffstat (limited to 'docs/sections/services/heartbeat-ms')
-rw-r--r--docs/sections/services/heartbeat-ms/architecture.rst6
-rw-r--r--docs/sections/services/heartbeat-ms/build_setup.rst36
-rw-r--r--docs/sections/services/heartbeat-ms/design.rst30
-rw-r--r--docs/sections/services/heartbeat-ms/index.rst4
-rw-r--r--docs/sections/services/heartbeat-ms/installation.rst52
-rw-r--r--docs/sections/services/heartbeat-ms/testprocedure.rst5
6 files changed, 57 insertions, 76 deletions
diff --git a/docs/sections/services/heartbeat-ms/architecture.rst b/docs/sections/services/heartbeat-ms/architecture.rst
index af96af32..16cf2d6b 100644
--- a/docs/sections/services/heartbeat-ms/architecture.rst
+++ b/docs/sections/services/heartbeat-ms/architecture.rst
@@ -9,7 +9,7 @@ configuration from CBS and parses these entries and saves them in the
postgres database having table name **vnf_table_1**. Each entry in the
configuration is for a particular eventName. Each entry has missed
heartbeat count, heartbeat interval, Control loop name etc. along with
-many other parameters.
+many other parameters.
Whenever a heartbeat event is received, the sourceName, lastEpochTime
and other information is stored in another postgres database having
@@ -38,8 +38,8 @@ function/method to download the CBS configuration.
The heartbeat microservice has 2 states
-**Reconfiguration state** – Download configuration from CBS and update
+**Reconfiguration state** - Download configuration from CBS and update
the vnf_table_1 is in progress.
-**Running state** – Normal working that comprises of receiving of HB
+**Running state** - Normal working that comprises of receiving of HB
events and sending of control loop event if required conditions are met.
diff --git a/docs/sections/services/heartbeat-ms/build_setup.rst b/docs/sections/services/heartbeat-ms/build_setup.rst
index 5df47234..e1465dcd 100644
--- a/docs/sections/services/heartbeat-ms/build_setup.rst
+++ b/docs/sections/services/heartbeat-ms/build_setup.rst
@@ -25,7 +25,7 @@ Docker build procedure
Clone the code using below command
::
- git clone --depth 1 https://gerrit.onap.org/r/dcaegen2/services/heartbeat
+ git clone --depth 1 https://gerrit.onap.org/r/dcaegen2/services/heartbeat
give executable permission to mvn-phase-script.sh if not there
already
@@ -54,10 +54,10 @@ CBS polling. The following environment variables are to be set.**
consumerID=1
If the postgres parameters are not there in environment setting file,
- then it takes the values from miss_htbt_service/config/hbproperties.yaml
- file. Make sure that postgres running in the machine where pg_ipAddress
- parameter is mentioned.
-
+ then it takes the values from miss_htbt_service/config/hbproperties.yaml
+ file. Make sure that postgres running in the machine where pg_ipAddress
+ parameter is mentioned.
+
Run below netstat command to check postgres port number and IP address are fine.
::
@@ -75,7 +75,7 @@ CBS polling. The following environment variables are to be set.**
are as follows
::
-
+
pg_ipAddress: 10.0.4.1
pg_portNum: 5432
pg_userName: postgres
@@ -89,25 +89,25 @@ CBS polling. The following environment variables are to be set.**
correctly. Usually groupID remains the same for all instance of HB
where as consumerID would be changed for each instance of HB Micro
service. If groupID and consumerID is not provided, then it takes
- “DefaultGroup” and “1” respectively.
+ "DefaultGroup" and "1" respectively.
**Setting CBS configuration parameters using the consule KV URL.**
The sample consul KV is as below.
::
-
+
http://10.12.6.50:8500/ui/#/dc1/kv/mvp-dcaegen2-heartbeat-static
Go to the above link and click on KEY/VALUE tab
Click on mvp-dcaegen2-heartbeat-static
- Copy the configuration in the box provided and click on update.
-
+ Copy the configuration in the box provided and click on update.
+
The sample configuration is as below
-
+
.. code-block:: json
-
+
{
"heartbeat_config": {
"vnfs": [{
@@ -177,7 +177,7 @@ mentioned in the above section.**
heartbeat.test1:latest
To check the logs, run below command
-
+
::
sudo Docker logs -f hb1
@@ -191,17 +191,17 @@ mentioned in the above section.**
sudo Docker ps -a \| grep heartbeat.test1
Run below commands to stop the Docker run
-
+
::
-
+
sudo Docker stop <Docker container ID)
sudo Docker rm -f hb1
**Initiate the maven build**
To run the maven build, execute any one of them.
-
-::
+
+::
sudo mvn -s settings.xml deploy
OR
@@ -211,5 +211,5 @@ mentioned in the above section.**
libxml-xpath as below. If the issue is something else, follow the
link given as part of the build failure.
-::
+::
sudo apt install libxml-xpath-perl
diff --git a/docs/sections/services/heartbeat-ms/design.rst b/docs/sections/services/heartbeat-ms/design.rst
index 837b8fc2..5618c53c 100644
--- a/docs/sections/services/heartbeat-ms/design.rst
+++ b/docs/sections/services/heartbeat-ms/design.rst
@@ -8,7 +8,7 @@ There are 4 processes created as below
Main process
------------
-
+
This is the initial process which does the following.
- Download CBS configuration and update the vnf_table_1
@@ -56,7 +56,7 @@ CBS polling process
-------------------
If the local configuration file (config/hbproperties.yaml) indicates
-that CBS polling is required, then main process would create the CBS
+that CBS polling is required, then main process would create the CBS
polling process. It does the following.
- It takes the CBS polling interval from the configuration file.
@@ -85,12 +85,12 @@ services instances, processes would work differently as mentioned below.
- Download CBS configuration and process it
- Spawns processes
- Periodically update hb_common with last accessed time to indicate that active instance is Alive.
-
+
Inactive Instance:
- Spawns processes
- Constantly check hb_common entry for last accessed time
- - If the last accessed time is more than a minute or so, then it assumes the role of active instance
-
+ - If the last accessed time is more than a minute or so, then it assumes the role of active instance
+
**HB worker process:** Both active and inactive instance behaves the sames as metnioned in the Design section.
**DB Monitoring process:** Both active periodically checks its process ID/hostname with hb_common data to know whether it is an active instance or not. If inactive instance it does nothing. If active instance, it behaves as mentioned in design section.
@@ -100,7 +100,7 @@ services instances, processes would work differently as mentioned below.
Handling of some of the failure scenarios
-----------------------------------------
-Failure to download the configuration from CBS – In this case, local
+Failure to download the configuration from CBS - In this case, local
configuration file etc/config.json is considered as the configuration
file and vnf_table_1 is updated accordingly.
@@ -119,7 +119,7 @@ Postgres Database
There are 3 tables maintained.
-**Vnf_table_1 table:**
+**Vnf_table_1 table:**
This is table is indexed by eventName. Each entry
has following parameters in it.
@@ -137,8 +137,8 @@ has following parameters in it.
- closedLoopControlName
- version
-**Vnf_table_2 table:**
-For each sourceName there would be an entry in vnf_table_2.
+**Vnf_table_2 table:**
+For each sourceName there would be an entry in vnf_table_2.
This is indexed by eventName and SourceName. Each entry has
below parameters
@@ -147,18 +147,18 @@ below parameters
- Control loop event raised flag. 0 indicates not raised, 1 indicates
CL event raised
-**hb_common table:**
+**hb_common table:**
This is a single entry table.
- The configuration status which would have one of the below.
- - **RECONFIGURATION** – indicates CBS configuration processing is in
+ - **RECONFIGURATION** - indicates CBS configuration processing is in
progress.
- - **RUNNING** – CBS configuration is completed and ready to process HB
+ - **RUNNING** - CBS configuration is completed and ready to process HB
event and send CL event.
-- The process ID – This indicates the main process ID of the active HB
+- The process ID - This indicates the main process ID of the active HB
instance which is responsible to take care of reconfiguration
-- The source Name – It has 2 parts, hostname and service name. The
+- The source Name - It has 2 parts, hostname and service name. The
hostname is the Docker container ID. The service name is the
environment variable set for SERVICE_NAME
-- The last accessed time – The time last accessed by the main process
+- The last accessed time - The time last accessed by the main process
having the above process ID.
diff --git a/docs/sections/services/heartbeat-ms/index.rst b/docs/sections/services/heartbeat-ms/index.rst
index d8a77fa5..d70493db 100644
--- a/docs/sections/services/heartbeat-ms/index.rst
+++ b/docs/sections/services/heartbeat-ms/index.rst
@@ -6,7 +6,7 @@ Heartbeat Microservice
The main objective of **Heartbeat Microservice** is to receive the periodic
heartbeat from the configured eventNames and report the loss of heartbeat
-onto DMaap if number of consecutive missed heartbeat count is more than
+onto DMaap if number of consecutive missed heartbeat count is more than
the configured missed heartbeat count
Heartbeat Microservice overview and functions
@@ -14,7 +14,7 @@ Heartbeat Microservice overview and functions
.. toctree::
:maxdepth: 1
-
+
./architecture.rst
./design.rst
./build_setup.rst
diff --git a/docs/sections/services/heartbeat-ms/installation.rst b/docs/sections/services/heartbeat-ms/installation.rst
index 62953cae..78e2239a 100644
--- a/docs/sections/services/heartbeat-ms/installation.rst
+++ b/docs/sections/services/heartbeat-ms/installation.rst
@@ -3,50 +3,32 @@
.. _heartbeat-installation:
-Installation
-============
+Helm Installation
+=================
+The Heartbeat microservice can be deployed using helm charts in the oom repository.
-Following are steps if manual deployment/undeployment required.
+Deployment steps
+~~~~~~~~~~~~~~~~
-Steps to deploy are shown below
+- Default app config values can be updated in oom/kubernetes/dcaegen2-services/components/dcae-heartbeat/values.yaml.
-- Heartbeat MS blueprint is available under bootstrap pod (under /blueprints/k8s-heartbeat.yaml). The blueprint is also maintained in gerrit and can be downloaded from https://git.onap.org/dcaegen2/platform/blueprints/tree/blueprints/k8s-heartbeat.yaml
-
-
-- Create an input file in DCAE bootstrap POD under / directory. Sample input file can be found under https://git.onap.org/dcaegen2/services/heartbeat/tree/dpo/k8s-heartbeat-inputs.yaml
+- Make the chart and deploy using the following command:
+ .. code-block:: bash
-- Enter the Bootstrap POD
-- Validate blueprint
- .. code-block:: bash
-
- cfy blueprints validate /blueprints/k8s-heartbeat.yaml
-- Upload validated blueprint
- .. code-block:: bash
-
+ cd oom/kubernetes/
+ make dcaegen2-services
+ helm install dev-dcaegen2-services dcaegen2-services --namespace <namespace> --set global.masterPassword=<password>
- cfy blueprints upload -b heartbeat /blueprints/k8s-heartbeat.yaml
-- Create deployment
- .. code-block:: bash
-
+- To deploy only RESTConf:
- cfy deployments create -b heartbeat -i /k8s-heartbeat-input.yaml heartbeat
-- Deploy blueprint
- .. code-block:: bash
-
+ .. code-block:: bash
- cfy executions start -d heartbeat install
+ helm install dev-dcae-heartbeat dcaegen2-services/components/dcae-heartbeat --namespace <namespace> --set global.masterPassword=<password>
-To undeploy heartbeat, steps are shown below
+- To Uninstall
-- Uninstall running heartbeat and delete deployment
- .. code-block:: bash
-
+ .. code-block:: bash
- cfy uninstall heartbeat
-- Delete blueprint
- .. code-block:: bash
-
-
- cfy blueprints delete heartbeat \ No newline at end of file
+ helm uninstall dev-dcae-heartbeat
diff --git a/docs/sections/services/heartbeat-ms/testprocedure.rst b/docs/sections/services/heartbeat-ms/testprocedure.rst
index c312ee51..4054ecf0 100644
--- a/docs/sections/services/heartbeat-ms/testprocedure.rst
+++ b/docs/sections/services/heartbeat-ms/testprocedure.rst
@@ -40,7 +40,7 @@ Sample output is as below
postgres=# \c hb_vnf
You are now connected to database "hb_vnf" as user "postgres".
- hb_vnf=#
+ hb_vnf=#
Delete all tables before starting Docker run or local run
---------------------------------------------------------
@@ -174,7 +174,7 @@ Testing Control loop event
- Modify the Json as below
Modify the lastEpochTime and startEpochTime with current time in Test1.json
- Modify the eventName in Test1.json to one of the eventName in vnf_table_1
+ Modify the eventName in Test1.json to one of the eventName in vnf_table_1
- Inject the Test1.json as mentioned in above section
@@ -432,4 +432,3 @@ The postgres DB also have a CL_flag set indicating control loop event with ONSET
2018-12-12 12:45:51,291 | __main__ | htbtworker | process_msg | 77 | INFO | HBT:Getting :http://10.12.5.252:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/group1/1?timeout=15000
2018-12-12 12:45:51,292 | urllib3.connectionpool | connectionpool | _new_conn | 208 | DEBUG | Starting new HTTP connection (1): 10.12.5.252
2018-12-12 12:46:00,585 | __main__ | db_monitoring | db_monitoring | 53 | INFO | DBM: Active DB Monitoring Instance
-