Skip to content
Snippets Groups Projects
Commit 8b46bbae authored by shraddhabajare's avatar shraddhabajare
Browse files

story_AT1-422: Resolved review comments.

parent 3686ecdb
No related branches found
No related tags found
No related merge requests found
# HDB++ viewer Docker Container # HDB++ Viewer Docker Container
[![Documentation Status](https://readthedocs.org/projects/ska-docker/badge/?version=latest)](https://developer.skatelescope.org/projects/ska-docker/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/ska-docker/badge/?version=latest)](https://developer.skatelescope.org/projects/ska-docker/en/latest/?badge=latest)
# 1: Introduction # 1: Introduction
The HdbViewer GUI visualizes the data stored in the Historical database(HDB). This Java framework, allows The HdbViewer GUI visualizes the data stored in the Historical database(HDB). This Java framework, allows
retrieving the data from Maria database(HDB). It has been written using Swing and need a JVM higher than 1.7.0. retrieving the data from Maria database(HDB). It has been written using Swing and needs a JVM higher than 1.7.0.
Link to the documentation: [Link to the documentation](https://github.com/tango-controls-hdbpp/hdbpp-viewer)
# 2: Prerequisites - Installation # 2: Prerequisites - Installation
[Link to hdb++ github repository](https://github.com/tango-controls-hdbpp/hdbpp-viewer) [Link to hdb++ github repository](https://github.com/tango-controls-hdbpp/hdbpp-viewer)
# 3: HDB++ viewer dockerfile # 3: HDB++ Viewer dockerfile
* Base image * Image Location
* nexus.engageska-portugal.pt/ska-docker/tango-java:latest * nexus.engageska-portugal.pt/ska-docker/tango-java:latest
* Dependencies * Dependencies
* TANGO=$BASEDIR/JTango.jar * TANGO=$BASEDIR/JTango.jar
...@@ -21,13 +21,13 @@ Link to the documentation: ...@@ -21,13 +21,13 @@ Link to the documentation:
* HDBPP=$BASEDIR/HDBPP.jar * HDBPP=$BASEDIR/HDBPP.jar
* JYTHON=$BASEDIR/jython.jar * JYTHON=$BASEDIR/jython.jar
* JCALENDAR=$BASEDIR/jcalendar.jar * JCALENDAR=$BASEDIR/jcalendar.jar
* Enviornment Variables * Environment Variables
* HDB_TYPE=mysql * HDB_TYPE=mysql //type of database
* HDB_MYSQL_HOST=archiver-maria-db * HDB_MYSQL_HOST=archiver-maria-db //database host (In this case, host is container name)
* HDB_MYSQL_PORT=3306 * HDB_MYSQL_PORT=3306 //database port
* HDB_USER=tango * HDB_USER=tango //database user
* HDB_PASSWORD=tango * HDB_PASSWORD=tango //user password
* HDB_NAME=hdbpp * HDB_NAME=hdbpp //database name
* Command line to set the environment variables * Command line to set the environment variables
* export HDB_TYPE * export HDB_TYPE
* export HDB_MYSQL_HOST * export HDB_MYSQL_HOST
...@@ -38,15 +38,18 @@ Link to the documentation: ...@@ -38,15 +38,18 @@ Link to the documentation:
* CLASSPATH=$TANGO:$TANGOATK:$HDBVIEWER:$HDBPP:$JYTHON:$JCALENDAR * CLASSPATH=$TANGO:$TANGOATK:$HDBVIEWER:$HDBPP:$JYTHON:$JCALENDAR
* export CLASSPATH * export CLASSPATH
# 4: Container creation for HDB++ archiver # 4: Container Creation for HDB++ Viewer
For HDB++ container, image {DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/hdbpp-viewer with tag latest is used for creation. The containers such as databaseds, mariadb, hdbpp-es and hdbpp-cm should be up and running. nexus.engageska-portugal.pt/ska-docker/hdbpp_viewer image with tag 'latest' is used in the hdbpp-viewer container.
XAUTHORITY=${XAUTHORITY}, DISPLAY=${DISPLAY}, TANGO_HOST=${TANGO_HOST}, HDB_TYPE=mysql, HDB_MYSQL_HOST=archiver-maria-db, HDB_MYSQL_PORT=3307, HDB_USER=tango, HDB_PASSWORD=tango, and HDB_NAME=hdbpp are the enviornment variables set at the time of creating this container. Databaseds, mariadb, hdbpp-es and hdbpp-cm containers should be up and running to access HDB++ viewer device.
Volume for this container is {XAUTHORITY_MOUNT}. Refer the link for yaml file [docker-compose.yaml](https://gitlab.com/ska-telescope/ska-docker/blob/master/docker/tango/tango-archiver/docker-compose.yml) Following are the environment variables set at the time of container creation: XAUTHORITY=${XAUTHORITY}, DISPLAY=${DISPLAY},
TANGO_HOST=${TANGO_HOST}, HDB_TYPE, HDB_MYSQL_HOST, HDB_MYSQL_PORT, HDB_USER, HDB_PASSWORD and HDB_NAME.
Refer the link
[docker-compose.yaml](https://gitlab.com/ska-telescope/ska-docker/blob/master/docker/tango/tango-archiver/docker-compose.yml)
# 5: Running HDB++ viewer inside docker containers # 5: Running HDB++ viewer inside docker containers
HDB++ viewer can run on dockers using following command inside the ./tango-archiver HDB++ viewer can run on dockers using following command inside the ./tango-archiver
In order to test , execute: In order to launch the viewer, execute:
`make test` `make test`
...@@ -3,25 +3,19 @@ ...@@ -3,25 +3,19 @@
[![Documentation Status](https://readthedocs.org/projects/ska-docker/badge/?version=latest)](https://developer.skatelescope.org/projects/ska-docker/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/ska-docker/badge/?version=latest)](https://developer.skatelescope.org/projects/ska-docker/en/latest/?badge=latest)
# 1: Introduction # 1: Introduction
Mariadb is a database other than tango database, which is used to store the atrributes , observation states etc of TMC The archiver database provides the repository of historical values of attributes, observation states, alarms and data associated
devices which have been archived at the time of command execution or generation of event on hdbpp-es(hdbpp event with other events generated during the control and monitoring of Telescope.
suscriber). Mariadb uses the default schema of hdb++(refer create_hdb++_mysql.sql file), to store the attributes. Mariadb is the database name, which stores the archived data. It is a separate database, other than the tango database.
The Tango events are subscribed by the hdbpp-es (hdbpp event subscriber) and written to the archive database.
Mariadb uses the default schema of HDB++ (refer to 'create_hdb++_mysql.sql' file), for storing archived data.
# 3: Images required for container creation # 2: Creating Mariadb docker containers
* tango-db ({DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-db:latest) nexus.engageska-portugal.pt/ska-docker/mariadb_hdbpp image with 'latest' tag is used to create Mariadb container.
* tango-cpp (DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-cpp:latest) MYSQL_DATABASE=hdbpp, MYSQL_USER=tango, MYSQL_PASSWORD=tango, TANGO_HOST=${TANGO_HOST} are the environment variables set
* tango-java ({DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-java:latest) at the time of mariadb container creation. 'archiverdb' is the permanent volume required for storing the database file.
* mariadb_hdbpp ({DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/mariadb_hdbpp:latest)
# 4: Creating mariadb docker containers # 3: Running Mariadb inside docker containers
Image '{DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/mariadb_hdbpp' with tag:latest is used to create Mariadb
container. MYSQL_DATABASE=hdbpp, MYSQL_USER=tango, MYSQL_PASSWORD=tango, TANGO_HOST=${TANGO_HOST} are the enviornments
variables set at the time of mariadb container creation. archiverdb is the permenent volume required.
# 5: Running mariadb inside docker containers The archiver database is brought up and running on dockers using the following command inside the ./tango-archiver
mariadb can run on dockers using following command inside the ./tango-archiver
In order to test , execute:
`make test` `make test`
...@@ -5,54 +5,44 @@ ...@@ -5,54 +5,44 @@
# 1: Introduction # 1: Introduction
The EventSubscriber TANGO device server, or Archiver, is the archiving system engine. It contains mainly two components The EventSubscriber TANGO device server, or Archiver, is the archiving system engine. It contains mainly two components
EventSuscriber and Configuration manager. It will subscribe to archive events on request by the ConfigurationManager Event Subscriber and Configuration Manager. It subscribes to archive events on request by the Configuration Manager
device. The EventSubscriber is designed to start archiving all the already configured Attributes, even if the device and stores the configuration into the TANGO database. The EventSubscriber is designed to start archiving all
ConfigurationManager is not running. Moreover, being a TANGO device, the EventSubscriber configuration can be managed the already configured attributes, even if the Configuration Manager is not running. Moreover, being a TANGO device, the
with Jive. EventSubscriber configuration can be managed with Jive.
# 2: Prerequisites - Installation # 2: Prerequisites - Installation
* Linux/Ubuntu (18.04 LTS) * HDB++ library: libhdbpp
* Python 3.6 * HDB++ mysql library: libhdbpp-mysql
* [python3-pip](https://packages.ubuntu.com/xenial/python3-pip) * HDB++ configuration manager: hdbpp-cm
* [Tango (9.2.5a)](https://docs.google.com/document/d/1TMp5n380YMvaeqeKZvRHHXa7yVxT8oBn5xsEymyNFC4/edit?usp=sharing) * HDB++ event subscriber: hdbpp-es
* [PyTango (9.2.4)](https://docs.google.com/document/d/1DtuIs1PeYGHlDXx8RyOzZyRQ-_Eiup-ncqeDDCtcNxk/edit?usp=sharing) * HDB++ viewer: hdbpp-viewer
* [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/) (for running the prototype in a containerised environment) * [HDB++ Installation Manual](https://docs.google.com/document/d/1QP3pU62j1v7RWvHeX72JG3s8FqgsCg-bD74xDLP2bSY/edit#heading=h.pqr2e1svlqll)
* HDB++ library libhdbpp. * [Link to HDB++ github repository](https://github.com/tango-controls-hdbpp)
* For complete installation, refer the link: [Link to HDB++ github repository](https://github.com/tango-controls-hdbpp)
# 3: Creating docker containers for archiver
# 3: Images required for container creation ## 3.1: hdbpp-es
* tango-db ({DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-db:latest)
* tango-cpp (DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-cpp:latest)
* tango-java ({DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/tango-java:latest)
* tango-archiver ({DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/archiver:latest)
* tango-dsconfig (nexus.engageska-portugal.pt/ska-docker/tango-dsconfig:latest)
# 4: Creating docker containers for archiver
## 4.1: hdbpp-es
hdbpp-es is a Event Suscriber device server container. hdbpp-es is a Event Suscriber device server container.
[Link to hdbpp-es github repository](https://github.com/tango-controls-hdbpp/hdbpp-es) [Link to hdbpp-es github repository](https://github.com/tango-controls-hdbpp/hdbpp-es)
{DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/archiver image with tag latest is used for creating hdbpp-es container. nexus.engageska-portugal.pt/ska-docker/tango-archiver image with tag 'latest' is used for creating hdbpp-es container.
TANGO_HOST=${TANGO_HOST}, HdbManager=archiving/hdbpp/confmanager01 are the enviornments variables set at the time of TANGO_HOST=${TANGO_HOST}, HdbManager=archiving/hdbpp/confmanager01 are the environment variables set at the time of
creating this container. The containers such as databaseds, archiver-dsconfig and maria-db should be up and running, creating this container. The containers such as databaseds, archiver-dsconfig and maria-db should be up and running,
so that hdbpp-es container will start. for the hdbpp-es container to start.
## 4.2: hdbpp-cm ## 3.2: hdbpp-cm
hdbpp-cm is a Configuration manager device server container. hdbpp-cm is a Configuration manager device server container.
[Link to hdbpp-cm github repository](https://github.com/tango-controls-hdbpp/hdbpp-cm) [Link to hdbpp-cm github repository](https://github.com/tango-controls-hdbpp/hdbpp-cm)
{DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}/archiver image with tag latest is used for creating hdbpp-cm container. nexus.engageska-portugal.pt/ska-docker/tango-archiver image with tag 'latest' is used to create hdbpp-cm container.
TANGO_HOST=${TANGO_HOST}, HdbManager=archiving/hdbpp/confmanager01 are the enviornments variables set at the time of TANGO_HOST=${TANGO_HOST}, HdbManager=archiving/hdbpp/confmanager01 are the environment variables set at the time of
creating this container. The containers such as databaseds, archiver-dsconfig and maria-db should be up and running, creating this container. The containers such as databaseds, archiver-dsconfig and maria-db should be up and running,
so that hdbpp-cm container will start. for the hdbpp-cm container to start.
## 4.3: archiver-dsconfig ## 3.3: dsconfig
The data file, archiver-devices.json file runs in this container to configure all the TMC devices properties. Image The data file, 'archiver-devices.json' runs in this container to configure all the TMC devices properties.
nexus.engageska-portugal.pt/ska-docker/tango-dsconfig:latest is used in this container. nexus.engageska-portugal.pt/ska-docker/tango-dsconfig image with tag 'latest' is used in this container.
TANGO_HOST=${TANGO_HOST} is the eviornment variable set inside this container at the time of creation. TANGO_HOST=${TANGO_HOST} is the environment variable set inside this container at the time of creation.
# 5: Running tango-archiver inside docker containers # 4: Running tango-archiver inside docker containers
tango-archiver can run on dockers using following command inside the ./tango-archiver The tango-archiver is brought up and running on dockers using the following command inside the ./tango-archiver
In order to test , execute:
`make test` `make test`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment