From 1e19c1881574ada75d9c27463204ea1b9271007e Mon Sep 17 00:00:00 2001 From: PrakashH Date: Tue, 22 Jan 2019 11:24:06 +0000 Subject: Heartbeat Microservice User Documentation User Documentation for heartbeat Microservice Issue-ID: DCAEGEN2-280 Change-Id: I1fd627b5026fa850c866a364440ff316db409b5a Signed-off-by: PrakashH --- .../services/heartbeat-ms/architecture.rst | 6 ++-- .../sections/services/heartbeat-ms/build_setup.rst | 32 +++++++++++----------- docs/sections/services/heartbeat-ms/design.rst | 2 -- docs/sections/services/heartbeat-ms/index.rst | 13 ++++----- .../services/heartbeat-ms/testprocedure.rst | 4 +-- 5 files changed, 24 insertions(+), 33 deletions(-) diff --git a/docs/sections/services/heartbeat-ms/architecture.rst b/docs/sections/services/heartbeat-ms/architecture.rst index f97fa24c..af96af32 100644 --- a/docs/sections/services/heartbeat-ms/architecture.rst +++ b/docs/sections/services/heartbeat-ms/architecture.rst @@ -1,12 +1,10 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 -.. _architecture: - High-level architecture of Heartbeat Microservice ================================================= -**Heartbeat Microservice**’s startup script (misshtbtd.py) gets the +**Heartbeat Microservice** startup script (misshtbtd.py) gets the 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 @@ -40,7 +38,7 @@ 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 diff --git a/docs/sections/services/heartbeat-ms/build_setup.rst b/docs/sections/services/heartbeat-ms/build_setup.rst index f2943cc6..6ab6a178 100644 --- a/docs/sections/services/heartbeat-ms/build_setup.rst +++ b/docs/sections/services/heartbeat-ms/build_setup.rst @@ -1,9 +1,6 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 -.. _build_setup: - - Build and Setup procedure ========================= @@ -26,13 +23,14 @@ Docker build procedure ---------------------- Clone the code using below command - .. code-block:: bash + +:: git clone https://gerrit.onap.org/r/dcaegen2/services/heartbeat give executable permission to mvn-phase-script.sh if not there already - .. code-block:: bash +:: chmod +x mvn-phase-script.sh **Setting up the postgres DB, group/consumer IDs, CBS download and @@ -62,7 +60,8 @@ CBS polling. The following environment variables are to be set.** Run below netstat command to check postgres port number and IP address are fine. - .. code-block:: bash +:: + netstat -ant If CBS parameters are not there in the environment setting file, then @@ -74,7 +73,8 @@ CBS polling. The following environment variables are to be set.** The sample values in miss_htbt_service/config/hbproperties.yaml file are as follows - .. code-block:: YAML + +:: pg_ipAddress: 10.0.4.1 pg_portNum: 5432 @@ -156,39 +156,39 @@ CBS polling. The following environment variables are to be set.** **Build the Docker using below command with a image name** - .. code-block:: bash +:: sudo Docker build --no-cache --network=host -f ./Dockerfile -t heartbeat.test1:latest . To check whether image is built or not, run below command - .. code-block:: bash +:: sudo Docker images |grep heartbeat.test1 **Run the Docker using below command which uses the environment file mentioned in the above section.** - .. code-block:: bash +:: sudo Docker run -d --name hb1 --env-file env.list heartbeat.test1:latest To check the logs, run below command - .. code-block:: bash +:: sudo Docker logs -f hb1 **To stop the Docker run** Get the Docker container ID from below command - .. code-block:: bash +:: sudo Docker ps -a \| grep heartbeat.test1 Run below commands to stop the Docker run - .. code-block:: bash +:: sudo Docker stop