...
Warning | ||
---|---|---|
| ||
Since now, I am referring to sources inside: https://gforge6.eufus.eu/svngf/project/catalog_qt/branches/R2-newLL (branch |
Info | ||
---|---|---|
In following section I assume that
I am using |
...
Code Block |
---|
> cd docs/dbschema # this script will produce SQL script for creating machine # dependent databases > ./create_db.sh --db-user=# NOTE! # # - ual_user_001 \ - is an arbitrary choice, you use different user name # - jettc --db-name=jettc \ - is an arbitrary choice for the catalog database, --host-name=$HOST_NAME \ --schema-name=itm_catalogyou use different name # - itm_catalog_001 - is an arbitrary choice, you can decide for a different schema name > ./create_db.sh --db-user=ual_user_001 \ --wsdb-address=https://address.of.itmcatalog.installation/itmcatalog/apiname=jettc \ --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 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) |
...
Make sure to change directory to branches/R2-newLL
.to develop (git checkout develop)
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 # 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 # Set your machine name # Note that you need to change gateway to something else # it depends on your target deployment machine > setenv MACHINE your_machine_name # Make sure to have your gsoap module loaded # Note that name of the module may differ and depends # on your local configuration > module load gsoap/2.8.debug # You have to update three files, before you proceed any further # (see below) |
Updating Makefile.common
Make sure to update Makefile.common
such way there is an entry for your machine. Note that machine name is an arbitrary choice. Simply, make sure not to pick one that already exists. Please make sure to add your own entry without altering the others.
Wiki Markup |
---|
# You need an entry similar to this one
ifeq ($(MACHINE),your_machine_name) # <- make sure to use the very same name as the name exported inside MACHINE variable
WSDL_URL := https://address.of.itmcatalog.installation/itmcatalog/api/server.php?wsdl # <- you need these two entries
WS_URL := https://address.of.itmcatalog.installation/itmcatalog/api/server.php
else ifeq ($(MACHINE),gateway)
...
... |
Updating dbAPI/database.properties
Make sure to update dbAPI/database.properties
- you will probably need to change first three lines only. Unless you have decided to change the name of the database where all the scheduled jobs are stored.
Code Block |
---|
#Properties for gateway database
SERVER=enter_your_host_name
USER=enter_sheduler_database_user_name
PASSWORD=enter_sheduler_database_user_password
SIMULDATABASE=itm_scheduler_db
CODEDATABASE=itm_code_catalog |
Updating src/config.json
Make sure to update src/config.json
file. You have to make sure to put there all the info that will be used by PHP based WebServices.
Code Block |
---|
{
"wsdl":"https://address.of.itmcatalog.installation/itmcatalog/api/server.php?wsdl",
"ns":"https://address.of.itmcatalog.installation/itmcatalog/api",
"db_server":"enter_your_host_name",
"db_type":"mysql",
"db_user":"enter_sheduler_database_user_name",
"db_password":"enter_sheduler_database_user_password",
"db_db":"itm_scheduler_db"
} |
Building release of CatalogQT
Once all the pieces are in place, you can compile the code
Code Block |
---|
# make sure to create and properly configure gSOAP module
# this way, you will be able to use pkg-config, etc.
> make install
# Once compilation is finished, you can find all the compiled
# codes inside directory "release"
> tree release
release
|-- bin
| |-- catalogscheduler - application that is used for scheduling requests;
| |-- catalogUpdateProcess - update process - this one should be run on service node
| | it periodically checks whether there are data for import
| | and in case data are there, it imports data into simulation db
| |-- store_data.sh - helper script for storing single pulse file
| `-- store_machine.sh - helper script for storing whole machine
|-- conf
| `-- dbAPI
| `-- database.properties - database connection settings
|-- resources
| `-- lib
| `-- libcatalogWS.a
`-- template
|-- derivation.xml - template files for derivation file (deprecated - it's no longer used during data
| storage but is required inside parts of legacy code base)
`-- input_template.xml - input description (automatically filled with proper information by store_data.sh script) |
Installation of UI - web client
...