Install with Ansible

Introduction

This manual describes the installation procedures for GBDS.

Install Preparations

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

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)

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

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

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.

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.

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

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

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>
     ^^^^^^^^^^^^^^^^^^^^^^^^^

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

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.

Configuring GBDS Tools

The configuration files used by GBDS Tools are located in the directory: /opt/griaule/tools/shared. In this directory, there are three files that need to be edited:

  • properties.ini - main configuration file

  • cluster.list - main hostname list file

  • ip.list- secondary hostname file

The files are pre-configured with default values in most parameters. Check if anything needs to change to match your environment's needs.

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

Installing RDB

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

MySQL Server

To install MySQL Server, run:

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

Then, proceed to Configuring the RDB password.

NDB Cluster

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.

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:

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.

Configuring MySQL

Finally, configure the database to your environment.

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

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

systemctl restart mysqld

Installing Ambari

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

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>
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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:

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

Change to the extracted directory:

cd /etc/ansible/ansible-hadoop

Then, run the installation script:

./full-hadoop.sh

Answer the installation questions and proceed until finished.

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.

Then, run the following command to install GBDS:

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

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
                   ^^^^^^^^^^^^^^          ^^^^^^^^^

After finishing the GBDS installation, configure it by running:

/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 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

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 web apps. This should be done only in the server that will host the web apps. 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 with the following command:

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

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

Last updated