1. Introduction

This manual describes the installation procedures for GBDS 4. It has been updated for GBDS version 4.2.0.x.

2. Install Preparations

This section covers the essential steps required for the GBDS installation.

Attention

All steps must be performed with root privileges on all nodes unless stated to the contrary.

To fully install GBDS you will need:

  • Root permission on the server
  • GBDS Tools package link
  • Ambari Ansible package link
  • OpenCV package link
  • GBDS .rpm and .sql files
  • Griaule Biometric Suite Softwares .war and .sql files (optional)

Note

If you do not have the repository links or the files, contact Griaule support team.

Then, you must follow the steps presented below. These steps will be fully described in their sections.

  1. Login to the server as root
  2. Install GBDS Tools
  3. Configure GBDS Tools setting files
  4. Run the GBDS Tools auto environment setup
  5. Install the RDB
  6. Install Ambari via Ansible
  7. Install GBDS
  8. Install GBS Applications (optional)

Tip

Before starting, make sure the machine hostname is correctly set up. To check it, run:

hostname

If the hostname is not correctly set up, run:

hostnamectl set-hostname <desired-hostname>
                         ^^^^^^^^^^^^^^^^^^

If you change the hostname, remember to restart the machine before proceeding.

3. GBDS Tools

GBDS Tools is a compilation of bash scripts with specific characteristics and dynamic usability. The tool’s primary purpose is to ease, enhance and speed up environment creation, setup, and application management.

All the scripts use a single configuration file called properties.ini and a single list file called cluster.list, which should contain all server group information.

Tip

Before starting, make sure wget is installed:

wget --version

If it’s not installed, run:

yum install wget -y

3.1. Installing GBDS Tools

You have two methods to choose to install GBDS Tools, one if you have the Griaule repository already set up in your server configuration and one if you do not have the repository set up. These are explained below.

Note

Choose just one alternative. After finishing one, there is no need to perform the other.

3.1.1. Repository already set up

If you already have set up the Griaule repository in your server configuration, you can complete all installations with just one command.

yum install gbds-tools

Error

If the Griaule repository is not set up, running the command above will result in the error:

No package gbds-tools available
Error: Nothing to do

In this case, proceed to Repository not set up.

3.1.2. Repository not set up

If you do not have the repository set up, you must guarantee the tool’s proper functioning. To do it, you MUST deploy the tool in the /opt/griaule directory.

Start by creating the directory:

mkdir -p /opt/griaule

Change into it:

cd /opt/griaule

Then, download the GBDS Tools package:

wget <GBDS Tools package link>
     ^^^^^^^^^^^^^^^^^^^^^^^^^

Note

If you do not have the link, contact the Griaule Support Team.

Tip

In the commands below, make sure to replace <version> with the version of the package that was downloaded.

And install it:

rpm -ivh gbds-tools-<version>.el7.noarch.rpm
                    ^^^^^^^^^

And create a symbolic link:

ln -s /opt/griaule/gbds-tools-<version>/ /opt/griaule/tools
                              ^^^^^^^^^

After a successful installation, proceed to the the configuration section.

3.2. Configuring GBDS Tools

There are three files you need to pay attention to the configuration. They are:

  • properties.ini - main configuration file
  • cluster.list - main hostname list file
  • ip.list- secondary hostname file

These files can be located at the /opt/griaule/tools/shared directory. The files are pre-configured with default values in most parameters. Check if anything needs to change to match your environment’s needs.

Warning

Changing the hostnames in the files to match the ones of the environment is imperative.

Tip

In the properties.ini file, look for the SPECIFIC TO configurations and perform the necessary changes to match your environment.

Under the SPECIFIC TO AUTO_ENVSETUP section, make sure that the username and password are correctly set up in usernm, userpw, and rootpw.

Under the SPECIFIC TO INSTALL_MYSQL section, note the RDB password, configured in dbuspw, as it will be used later.

Tip

In the cluster.list file, make sure to change the hostnames and adapt the number os hosts on each component to match your environment.

Tip

In the ip.list file, make sure to change the hostnames and IP addresses to match your environment, following the format <hostname>|<IP address> on each line.

3.3. Running auto environment setup

The auto environment setup, named auto_envsetup.sh is automation to set up the environment. You need to run this script when building a new server from scratch.

To run the script, execute the following command:

/opt/griaule/tools/auto_envsetup/auto_envsetup.sh --all

Then, it is recommended to update all packages if possible:

yum update -y

4. Installing RDB

To use GBDS, you will need an installed and configured relational database. You can choose between MySQL Server or NDB Cluster.

Warning

You only need to perform one RDB installation.

4.1. MySQL Server

Important

It is recommended to install MySQL in the master node.

To install MySQL Server, run:

/opt/griaule/tools/install_mysql/install_mysql.sh --single

Then, proceed to Configuring the RDB password.

4.2. NDB Cluster

Warning

NDB installation MUST be in the MASTER node.

Or, if you choose to install NDB Cluster, run:

/opt/griaule/tools/install_mysql/install_mysql.sh --cluster

Then, proceed to Configuring the RDB password.

4.3. Configuring the RDB password

After the installation, try to log into MySQL running the command:

mysql -u root -p

And entering the password configured in the properties.ini file in dbuspw, as mentioned in the previous step.

If you are able to log in, the installation and password setup were successful and you may proceed to Configuring MySQL.


If you are not able to log in and see the following error:

Error: Access denied for user '<username>'@'<host>' (using password: YES)

You need to manually change the password. To do so, use the following command to get the temporary password created during the installation:

grep "temporary password" /var/log/mysqld.log

Copy the temporary password displayed.

Then, change the password using the following command:

Note

Make sure to replace <desired_password> with the desired password. Keep the quotation marks.

mysqladmin -u root -p password "<desired_password>"
                                ^^^^^^^^^^^^^^^^^^

When asked, enter the temporary password.

Then, try to log into MySQL again using the new password.

If you are able to log in, the installation and password setup were successful and you may proceed to Configuring MySQL.

4.4. Configuring MySQL

Finally, configure the database to your environment.

The configuration file is located at: /etc/my.cnf.

Attention

The default configuration values set by the RDB installation may not be the desired ones. Check them in the my.cnf configuration file and adapt them to meet the environment’s needs.

After making the necessary changes, apply them by restarting the service:

systemctl restart mysqld

5. Installing Ambari

To install Ambari via Ansible, access to Griaule repository is required.

Attention

If your GBDS RDB is not in the MASTER node, it is advised to start another RDB instance for Ambari.

Note

The installation requires an internet connection and can take 45 minutes to complete without errors. Before installing, make sure your connection is stable.

To start the Ambari installation, change to the Ansible directory:

cd /etc/ansible

Then, download the package:

wget <Ambari Ansible package link>
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Note

If you do not have the link, contact Griaule Support Team.

Then, extract the files under the Ansible main directory, /etc/ansible, with the following command:

Tip

In the command below, make sure to replace <version> with the version of the package that was downloaded.

tar -xvf ansible_hdp-<version>.tar
                     ^^^^^^^^^

Change to the extracted directory:

cd /etc/ansible/ansible-hadoop

Tip

Since the process takes a while to complete, it is recommended to run the install script, using screen to avoid interruptions.

To do so, install screen:

yum install screen -y

Start a new screen session:

screen -S ambari-install

Then, proceed to running the installation script as described below.

In case the connection to server is lost, the script will not be stopped and you can resume the session by reconnecting to the server and running:

screen -r ambari-install

Then, run the installation script:

./full-hadoop.sh

Answer the installation questions and proceed until finished.

Warning

Once started, DO NOT interrupt any of the scripts. If any problem happens, contact the Griaule Support Team.

6. Installing GBDS

To install GBDS, you will need:

  • GBDS Cluster .rpm
  • GBDS Distribution .rpm
  • GBDS RDB dump script .sql
  • OpenCV package link

Start by moving the two .rpm files to the /opt/griaule/tools/deploy_application/files directory.

The .sql RDB dump script file should be saved elsewhere.

Warning

After running the following script, everything inside the /opt/griaule/tools/deploy_application/files directory will be deleted.

Then, run the following command to install GBDS:

/opt/griaule/tools/deploy_application/deploy_application.sh --gbds

Note

When running the script above, if you get the error:

[ERROR] No OPENCV RPM found to be deployed. Make sure to stage the desired RPM

Change to the files directory:

cd /opt/griaule/tools/deploy_application/files

And download the OpenCV package:

wget <OpenCV package link>
     ^^^^^^^^^^^^^^^^^^^^^

Then, try to run the deploy_application.sh script again.

Then, run the RDB dump script in the SQL server.

mysql -u root -p < /PATH/TO/FILE/clear-rdb-<version>.sql
                   ^^^^^^^^^^^^^^          ^^^^^^^^^

Tip

The RDB password was configured here.

After finishing the GBDS installation, you need to configure it. If you only need GBDS and none of the GBS applications, run the following command, otherwise SKIP THIS STEP:

/opt/griaule/tools/auto_appconfig/auto_appconfig.sh --gbds

To manually review or change settings, edit the configuration file located at: /etc/griaule/conf/gbds/application.conf. For further information on the configuration file, refer to the GBDS 4 Configuration Manual.

Then, start the GBDS API:

service gbsapid start

Test if the API is running:

curl http://<host-ip>:8085/gbds/v2/operations/ping
            ^^^^^^^^^

The expected response is:

{"data": "pong!"}

Finally, start GBDS:

gbdsstart

And follow the execution log:

gbdslogt

7. Installing GBS Applications

To install the GBS Applications, you will need:

  • The .war file for each application
  • The .sql dump script for each application

First, install and configure the Tomcat for the Webapps. This is done in only ONE server. Use the following command:

/opt/griaule/tools/install_services/install_services.sh

Then, move the .war files to the /opt/griaule/tools/deploy_application/files directory and run the command:

/opt/griaule/tools/deploy_application/deploy_application.sh --services

After that, configure the applications.

Danger

The configuration script, auto_appconfig.sh, should only be executed ONCE. There are two possible scenarios described below. Make sure to execute the proper command according to your environment.

If you ALREADY HAVE GBDS configured (having executed the configuration command shown in the previous section), you can configure only the web applications with the following command:

/opt/griaule/tools/auto_appconfig/auto_appconfig.sh --services

If you DO NOT HAVE GBDS configured (having skipped the configuration command shown in the previous section), run the following command to configure both the web applications and GBDS at once:

/opt/griaule/tools/auto_appconfig/auto_appconfig.sh --all

Note

To explore the individual settings of each application, please refer to their configuration manual listed here.