GBS Web Apps Setup

Introduction

This manual describes the installation and update procedures for Griaule Servers for Web Applications.

Before starting, make sure some files are available on the target machine:

  • Application .war file, gbs-<app_name>-web-server-<version>.war;

  • Application database dump script, clear-<app_name>-<DD>-<MM>-<YYYY>.sql, if installing;

  • Application database upgrade script, upgrade-<app_name>-<DD>-<MM>-<YYYY>.sql, if updating;

  • Sphinx database script, clear-sphinx-<DD>-<MM>-<YYYY>.sql;

  • Apache Tomcat package, tomcats-v7.tar;

  • Setup script setup.sh;

  • Python setup helper script updatescript.py;

  • Pre-Setup scripts: setup_webapps.sh and, optionally, setup_aliases.sh if you want to create Aliases.

To perform a new installation, follow the steps:

  1. Check if your system meets the Pre-Requisites

  2. Run the Pre-setup scripts

  3. Install the application

  4. Configure the application

  5. Verify if the application is running using the commands presented in Handling Applications

To update an application, follow the steps:

  1. Check if your system meets the new version Pre-Requisites

  2. Update the application through the presented commands

  3. Check the Configurations

  4. Verify if the application is running using the commands presented in Handling Applications

Pre-Requisites

To learn more about the products of Griaule Biometric Suite (GBS), please refer to GBS Overview.

Pre-Setup

Some steps need to be performed before the installation process.

If Tomcat is not installed, install it using the following command:

First, make sure that the Tomcats package (tomcats-v7.tar file) provided is available on the machine where the application will be installed.

The tomcats-v7.tar package contains one folder for each application. The folder structure is as follows:

Each folder contains the following subfolders:

Step 1: Transfer and unzip the tomcats-v7.tar package in the /var/lib/tomcats directory.

Step 2: Perform the pre-installation of the application using the provided script setup_webapps.sh.

To perform this procedure, run the pre-installation script passing the name of the application being installed:

Step 3: Configure the aliases (optional).

Optionally, if you'd like to create aliases to ease application handling, run the following script:

Then, source the .bashrc file:

These scripts will:

  • Create tomcat symlinks for each service

  • Update/modify tomcat server scripts

  • Add aliases to ease application handling

After those steps, if Cardscan Server and/or ETR are being installed, follow the steps below.

Open the database configuration file:

Under [mysqld], if CardScan is being installed, add the following line:

If ETR is being installed, add the following line:

If it is already set, skip this step.

Then, proceed to the Installation procedures.

Installation

Before starting the installation procedure, make sure that the application .war file is available on the machine where the application will be installed.

Step 1: Move the application .war file to the application home directory:

Step 2: Change to the application webapps directory:

Step 3: Create a symlink in webapps to the application .war file:

Step 4: Change directory:

Step 5: Change the ownership of the files in the tomcats folder to the tomcat user:

Then, proceed with the application Configurations.

Update

To update an application, proceed with the following steps:

Step 1: Stop the application:

Step 2: Remove old files:

Step 3: Move the application .war file to the application home directory:

Step 4: Change to the application webapps directory:

Step 5: Create a symlink in webapps to the application .war file:

Step 6: Run the database upgrade dumps, if the release includes them:

Step 7: Start the application:

Step 8: Change to the tomcats directory:

Step 9: And run the setup script:

Configurations

Each component has its individual configuration. Those are presented in their respective manual (see links below).

Step 1: Run the database dump:

Step 2: Then, edit the config.properties file:

To understand the configuration procedures, refer to each application specific configuration manual:

Make sure that the Connector port=<port_number> configuration parameter is correctly specified in the server.xml file, located at /var/lib/tomcats/<app_name>/conf. Please refer to the applications specific configuration manuals for further details. The connection (Connector port=<port_number>) and shutdown (Server port=... shutdown=...) ports should not be the same as each other or coincide with ports used by other applications.

Make sure that the <app_name>.ip, <app_name>.port, and <app_name>.protocol configuration parameters are correctly specified in the config.properties file. The IP address must match the one configured in the server.xml file. In many cases, the IP will be the same for various applications. However, each application will have a different and unique port.

Step 3: Next, access MySQL as root:

Step 4: Run the following query:

Step 5: Exit MySQL:

Step 6: Then, start the application:

Step 7: Change to the tomcats directory:

Step 8: Finally, if it's the first time running the application, run the setup script:

Handling Applications

This section shows some commands to monitor and handle Griaule services and their respective aliases.

Aliases

Aliases are short, user-defined commands that serve as replacements for longer or more complex commands. They are created to make frequently used commands more convenient to execute. When an alias is invoked, it gets replaced by the full command it represents before it is executed.

If not using the setup_aliases.sh script as described in Pre-Setup, it is possible to manually add the aliases. To do so, edit the root .bashrc file:

And add the following aliases, according to the desired application:

Useful Commands

  • Start Application

or with alias:

  • Stop Application

or with alias:

  • Check Application Status

or with alias:

  • Check Application Logs

or with alias:

Last updated

Was this helpful?