summaryrefslogtreecommitdiffstats
path: root/docs/sections
diff options
context:
space:
mode:
authorPrakashH <pbhandar@techmahindra.com>2019-01-22 11:24:06 +0000
committerPrakashH <pbhandar@techmahindra.com>2019-01-22 12:15:16 +0000
commit1e19c1881574ada75d9c27463204ea1b9271007e (patch)
tree70f5381701d0262731798e6c63ba9074dd735e3c /docs/sections
parent3bcb00f79c6bacc5c1ed3c3c2fd7642992707f23 (diff)
Heartbeat Microservice User Documentation
User Documentation for heartbeat Microservice Issue-ID: DCAEGEN2-280 Change-Id: I1fd627b5026fa850c866a364440ff316db409b5a Signed-off-by: PrakashH <pbhandar@techmahindra.com>
Diffstat (limited to 'docs/sections')
-rw-r--r--docs/sections/services/heartbeat-ms/architecture.rst6
-rw-r--r--docs/sections/services/heartbeat-ms/build_setup.rst32
-rw-r--r--docs/sections/services/heartbeat-ms/design.rst2
-rw-r--r--docs/sections/services/heartbeat-ms/index.rst13
-rw-r--r--docs/sections/services/heartbeat-ms/testprocedure.rst4
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 <Docker container ID)
sudo Docker rm -f hb1
@@ -197,7 +197,7 @@ mentioned in the above section.**
To run the maven build, execute any one of them.
- .. code-block:: bash
+::
sudo mvn -s settings.xml deploy
OR
sudo mvn -s settings.xml -X deploy
@@ -205,6 +205,6 @@ mentioned in the above section.**
If there is a libxml-xpath related issue, then install the
libxml-xpath as below. If the issue is something else, follow the
link given as part of the build failure.
-
- .. code-block:: bash
+
+::
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 fa4490f4..837b8fc2 100644
--- a/docs/sections/services/heartbeat-ms/design.rst
+++ b/docs/sections/services/heartbeat-ms/design.rst
@@ -1,8 +1,6 @@
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
-.. _design:
-
Design
======
diff --git a/docs/sections/services/heartbeat-ms/index.rst b/docs/sections/services/heartbeat-ms/index.rst
index 4b67e98f..148b8da8 100644
--- a/docs/sections/services/heartbeat-ms/index.rst
+++ b/docs/sections/services/heartbeat-ms/index.rst
@@ -13,12 +13,9 @@ Heartbeat Microservice overview and functions
---------------------------------------------
.. toctree::
- :maxdepth: 1
+ :maxdepth: 1
- architecture
- design
- build_setup
- testprocedure
-
-
-
+ ./architecture.rst
+ ./design.rst
+ ./build_setup.rst
+ ./testprocedure.rst
diff --git a/docs/sections/services/heartbeat-ms/testprocedure.rst b/docs/sections/services/heartbeat-ms/testprocedure.rst
index 6f80fc49..03bcbab1 100644
--- a/docs/sections/services/heartbeat-ms/testprocedure.rst
+++ b/docs/sections/services/heartbeat-ms/testprocedure.rst
@@ -1,8 +1,6 @@
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
-.. _testprocedure:
-
Test procedures and Postgres Database access
============================================
@@ -16,7 +14,7 @@ Run below commands to login into postgres DB and connect to HB Micro service DB.
::
sudo su postgres
psql
- \l hb_vnf
+ \l hb_vnf
Sample output is as below