Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleComponents

Installation of Catalog QT requires multiple components to be installed and configured to be fully operational. This is due to the fact that numerous, external, components are required during build procedure and during runtime. All these elements are described below.

Installation of MySQL/MariaDB

Before you proceed with installation of Catalog QT (CLI/UI) you have to make sure there is a working MySQL server and you have a connection from Web Server and machine where CLI commands will be executed.

...

Warning

one account with root privileges - you will have to create db schema

one account with normal user privileges - this user must have access to all tables inside DB

Installation of CLI based components

Installation of gSOAP 2.8

In order to install CLI components you need to install and configure gSOAP 2.8 library. Please follow instructions here, and make sure gSOAP library is available in your system: gsoap_2.8.70.zip

...

Current version of Catalog QT requires at least IMAS/3.23.2/AL/4.1.5 . Make sure to have IMAS properly installed and configured at your target host. Please note that this manual describes steps for building codes based on branch - R2-newLL it is assumed that codes will use New Low Level features.

Installation of CLI tools

Checking out repository

Make sure you can access repository: https://gforge6.eufus.eu/svn/catalog_qt, before proceeding any further.

...

Info

In following section I assume that

Code Block
$HOST_NAME            - points to location of MySQL/MariaDB server
user_with_root_access - is a name of MySQL's user name with root privileges
$UAL_USER             - is the name of the user who has access to itm_scheduler_db
                        (this user is create using create_scheduler_db.sql script)

I am using -p option while calling mysql - it means that you will be asked for password each time you want to log in to MySQL machine. Thus, it is not possible to use following samples in batch mode.

Creating DB schema

Catalog QT tool requires multiple databases to run properly.

  • Scheduler DB - this database defines all the machine dependent libraries
  • Machine DB - this database contains data from the pulse file for given machine (there might be many machine databases)

Creating scheduler DB schema

Before compiling the code, make sure you can create db schema and that you can access it as user. You can create DB schema following way

Code Block
> cd docs/dbschema
> mysql -h $HOST_NAME -u user_with_root_access itm_scheduler_db -p < drop_scheduler_user.sql
> mysql -h $HOST_NAME -u user_with_root_access itm_scheduler_db -p < create_scheduler_db.sql
 
# Make sure you can access itm_scheduler_db DB

> mysql -h $HOST_NAME -u $UAL_USER itm_scheduler_db -p
Enter password: 
...
...
mysql> show tables;
+----------------------------+
| Tables_in_itm_scheduler_db |
+----------------------------+
| access_list                |
| db_authorization           |
| scheduler                  |
| token_list                 |
+----------------------------+

Creating machine dependent DB schema

For each machine (e.g.: pedestalwestjettc) you have to have separate database schema.

Code Block
> cd docs/dbschema

# this script will produce SQL script for creating machine
# dependent databases

> ./create_db.sh --db-user=ual_user_001 \
                 --db-name=jettc \
                 --host-name=$HOST_NAME \
                 --schema-name=itm_catalog_001 \
                 --ws-address=https://address.of.itmcatalog.installation/itmcatalog/api \
                 --storage=/this/is/the/location/where/all/users/can/write/to

> mysql -h $HOST_NAME -u user_with_root_access -p < drop_db_user_modified.sql
> mysql -h $HOST_NAME -u user_with_root_access -p < create_db_modified.sql

# Once database is created, make sure you can log in

> mysql -h $HOST_NAME -u ual_user_001 -p itm_catalog_001
Enter password: 
...
...
mysql> show tables;
+---------------------------+
| Tables_in_itm_catalog_001 |
+---------------------------+
| annotations               |
| catalog_parameters        |
| entry                     |
| entry_data                |
| intervals                 |
| machines                  |
| outcome                   |
| scheduler                 |
| users                     |
| variables                 |
+---------------------------+
10 rows in set (0.00 sec)

Populating database with variables

Each machine DB has to be populated with variables that are supposed to be stored inside DB. At the moment, machine dependent DB has to store all the names of fields stored inside summary IDS. This can be done following way

Code Block
> xsltproc ./getFieldsIMAS.xsl \
      $IMAS_HOME/core/installer/src/$IMAS_VERSION/ual/$UAL_VERSION/xml/IDSDef.xml | \
      grep "summary" > \
      variables.sql

> mysql -h $HOST_NAME -u ual_user_001 itm_catalog_001 -p < variables.sql

# Make sure you can see variables inside DB

> mysql -h $HOST_NAME -u ual_user_001 itm_catalog_001 -p
Enter password: 
...
...
mysql> select count(*) from variables;
+----------+
| count(*) |
+----------+
|     2511 |
+----------+
1 row in set (0.00 sec)

Compilation of CLI tools

Warning
titlegSOAP and WSDL

gSOAP library requires WSDL location used for compilation of the codes. It is not possible to proceed any further without server components. This is related to the fact that gSOAP library requires WSDL location, where SOAP based specification is stored.

...

Code Block
# Make sure to load IMAS environment - following command may be system dependent
> module load imasenv
> imasdb test
 
# For bash
 
> export CATALOG_QT_HOME=`pwd`
> export CATALOG_QT_STORAGE=/this/is/the/location/where/all/users/can/write/to
> export CATALOG_QT_DB_PROPERTIES=${CATALOG_QT_HOME}/dbAPI
 
# For tcsh
> setenv CATALOG_QT_HOME `pwd`
> setenv CATALOG_QT_STORAGE /this/is/the/location/where/all/users/can/write/to
> setenv CATALOG_QT_DB_PROPERTIES ${CATALOG_QT_HOME}/dbAPI
 
# setting target machine
#
# unfortunately, there are few places where machine dependent locations are used
# at the moment, two options are available:
#
# setenv MACHINE gateway
# setenv MACHINE jet
#
# it might be, we need yet another one, with new machine settings
 
# make sure to create and properly configure gSOAP module
# this way, you will be able to use pkg-config, etc.
> module load gsoap/2.8
> make


Installation of UI - web client

Make sure you can access repository: https://gforge6.eufus.eu/svn/catalog_qt

...

  • MySQL database management system
  • Apache HTTP Server
  • PHP server-side scripting language

Installation of server tools

The administrator should install the following packages on the server:

  • mysql-server or mariadb-server
  • php
  • libapache2-mod-php
  • apache2

Installation of web client

UI codes are available as a sub-project in the src directory

...

Code Block
> service apache2 restart

Configuration of UI

the fastest way:

Because the codes are mainly prepared for operation on the GW machine, to complete the configuration, all the names of the GW server (http://portal.eufus.euhttps://portal.eufus.eu) should be replaced with the names of the new server.
These names should be located and be replaced in these files:

...

Code Block
> service apache2 restart

Access to databases by API

The latest version of the API allows communication with many databases through one unified interface.
Thanks to this, there is no need to create a separate API instance for each database on the server side.
The client can query one WS address to have access to all databases available on the server.
In the client's SOAP request header, the variable Qdb contains the database name.
The diagram below shows how this mechanism works:

...