.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
.. http://creativecommons.org/licenses/by/4.0\r
\r
-.. _architecture:\r
-\r
High-level architecture of Heartbeat Microservice\r
=================================================\r
\r
-**Heartbeat Microservice**’s startup script (misshtbtd.py) gets the\r
+**Heartbeat Microservice** startup script (misshtbtd.py) gets the\r
configuration from CBS and parses these entries and saves them in the\r
postgres database having table name **vnf_table_1**. Each entry in the\r
configuration is for a particular eventName. Each entry has missed\r
\r
The heartbeat microservice has 2 states\r
\r
-**Reconfiguration state**– Download configuration from CBS and update\r
+**Reconfiguration state** – Download configuration from CBS and update\r
the vnf_table_1 is in progress.\r
\r
**Running state** – Normal working that comprises of receiving of HB\r
.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
.. http://creativecommons.org/licenses/by/4.0\r
\r
-.. _build_setup:\r
-\r
-\r
Build and Setup procedure\r
=========================\r
\r
----------------------\r
\r
Clone the code using below command\r
- .. code-block:: bash\r
+\r
+::\r
git clone https://gerrit.onap.org/r/dcaegen2/services/heartbeat \r
\r
give executable permission to mvn-phase-script.sh if not there\r
already\r
- .. code-block:: bash\r
\r
+::\r
chmod +x mvn-phase-script.sh\r
\r
**Setting up the postgres DB, group/consumer IDs, CBS download and\r
\r
Run below netstat command to check postgres port number and IP address are fine.\r
\r
- .. code-block:: bash\r
+::\r
+\r
netstat -ant\r
\r
If CBS parameters are not there in the environment setting file, then\r
\r
The sample values in miss_htbt_service/config/hbproperties.yaml file\r
are as follows\r
- .. code-block:: YAML\r
+\r
+::\r
\r
pg_ipAddress: 10.0.4.1\r
pg_portNum: 5432\r
\r
**Build the Docker using below command with a image name**\r
\r
- .. code-block:: bash\r
+::\r
\r
sudo Docker build --no-cache --network=host -f ./Dockerfile -t\r
heartbeat.test1:latest .\r
\r
To check whether image is built or not, run below command\r
\r
- .. code-block:: bash\r
+::\r
sudo Docker images |grep heartbeat.test1\r
\r
**Run the Docker using below command which uses the environment file\r
mentioned in the above section.**\r
\r
- .. code-block:: bash\r
+::\r
sudo Docker run -d --name hb1 --env-file env.list\r
heartbeat.test1:latest\r
\r
To check the logs, run below command\r
\r
- .. code-block:: bash\r
+::\r
sudo Docker logs -f hb1\r
\r
**To stop the Docker run**\r
\r
Get the Docker container ID from below command\r
\r
- .. code-block:: bash\r
+::\r
\r
sudo Docker ps -a \| grep heartbeat.test1\r
\r
Run below commands to stop the Docker run\r
\r
- .. code-block:: bash\r
+::\r
\r
sudo Docker stop <Docker container ID)\r
sudo Docker rm -f hb1\r
\r
To run the maven build, execute any one of them.\r
\r
- .. code-block:: bash\r
+:: \r
sudo mvn -s settings.xml deploy\r
OR\r
sudo mvn -s settings.xml -X deploy\r
If there is a libxml-xpath related issue, then install the\r
libxml-xpath as below. If the issue is something else, follow the\r
link given as part of the build failure.\r
- \r
- .. code-block:: bash\r
+\r
+:: \r
sudo apt install libxml-xpath-perl\r