Installation with Ansible
Introduction
This manual describes the GBDS installation procedures.
Preparation for Installation
This section covers the essential steps required to install GBDS.
All steps must be executed with root privileges on all nodes, unless otherwise indicated.
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
.war and .sql files of the Griaule Biometric Suite software (optional)
If you do not have the repository links or the files, contact the Griaule support team.
Next, you should follow the steps presented below. These steps will be fully described in their sections.
Log in to the server as root
Before starting, make sure that the hostname of the machine is correct. To verify, run the command:
If it is not correct, run the command:
If the hostname is modified, reboot the machine before proceeding.
GBDS Tools
GBDS Tools is a compilation of bash scripts with specific features and dynamic usability. The main goal of the tool is to facilitate, improve and speed up the creation, configuration and management of environment applications.
All scripts use a single configuration file called properties.ini and a single list file called cluster.list, which must contain all the information of the server group.
Before starting, make sure that the wget is installed:
If not, run the command:
Installing GBDS Tools
You have two methods to choose from to install GBDS Tools, one if you have the Griaule repository already configured on your server and another if you do not. These are explained below.
Choose only one alternative. After finishing one, there is no need to perform the other.
Repository already configured
If you have already configured the Griaule repository on your server, you can complete all installations with a single command.
If the Griaule repository is not configured, running the above command will result in the following error:
In this case, proceed to Repository not configured.
Repository not configured
If you do not have the repository configured, you must ensure the tool works properly. To do this, you MUST place the tool in the directory /opt/griaule.
Start by creating the directory:
Enter the created directory:
Then, download the GBDS tools package:
If you do not have the link, contact the Griaule Support Team.
In the commands below, be sure to replace <version> with the version of the package that was downloaded.
Then, install it:
And create a symbolic link:
After a successful installation, proceed to the configuration section.
Configuring GBDS Tools
The configuration files used by GBDS Tools are in the directory: /opt/griaule/tools/shared. In this directory, there are three files that must be edited:
properties.ini- main configuration filecluster.list- main hostnames list fileip.list- secondary hostnames file
The files are pre-configured with default values for most parameters. Check if anything needs to be changed to meet the needs of your environment.
Changing the hostnames in the files to match those of the environment is imperative.
In the file properties.ini, look for the settings SPECIFIC TO and make the necessary changes to match your environment.
In the SPECIFIC TO AUTO_ENVSETUP, make sure the username and password are configured correctly in usernm, userpw and rootpw.
In the SPECIFIC TO INSTALL_MYSQL, note the RDB password, set in dbuspw, as it will be used later.
In the file cluster.list, make sure to change the hostnames and to adapt the number of hosts in each component so that it matches the environment.
By default, the file is configured for a cluster of three nodes. If the environment has, for example, only one node, remove mentions of nodes 2 and 3 and replace all names with your server's hostname.
In the file ip.list, make sure to change the hostnames and the IP addresses to match the environment, following the format <hostname>|<IP address> on each line.
Running the automatic environment configuration
The automatic environment configuration, called auto_envsetup.sh, is the automation to configure the environment. You need to run this script when building a new server from scratch.
To run the script, execute the following command:
Then, it is recommended to update all packages, if possible:
Installing the RDB
To use GBDS, you will need a relational database installed and configured. You can choose between MySQL Server or NDB Cluster.
You only need to perform one RDB installation.
MySQL Server
It is recommended to install MySQL on the master node.
To install MySQL Server, run:
Then, proceed to Configuring the RDB password.
NDB Cluster
The installation of NDB MUST be on the MASTER.
Or, if you choose to install the NDB Cluster, run:
Then, proceed to Configuring the RDB password.
Configuring the RDB password
After installation, try to log into MySQL by running the command:
And entering the password configured in the file properties.ini in dbuspw, as mentioned in the previous step.
If it is possible to log in, the installation and password configuration were successful and you can proceed to Configuring MySQL.
If it is not possible to log in and you see the following error:
You will need to change the password manually. To do this, use the following command to get the temporary password created during installation:
Copy the temporary password shown.
Then, change the password using the following command:
Make sure to replace <desired_password> with the desired password. Keep the quotes.
When prompted, enter the temporary password.
Then, try to log into MySQL again using the new password.
If it is possible to log in, the installation and password configuration were successful and you can proceed to Configuring MySQL.
Configuring MySQL
Finally, configure the database for your environment.
The configuration file is located at: /etc/my.cnf.
The default settings of the RDB installation may not be the desired settings. Check them in the configuration file my.cnf and adapt them to meet the needs of the environment.
After making the necessary changes, apply them by restarting the service:
Installing Ambari
To install Ambari via Ansible, it is necessary to access the Griaule repository.
If your GBDS RDB is not on the MASTERnode, it is recommended to start another RDB instance for Ambari.
The installation requires an internet connection and may take 45 minutes to complete without errors. Before installing, ensure your connection is stable.
To start the Ambari installation, go to the Ansible directory:
Then, download the package:
If you do not have the link, contact the Griaule Support Team.
Next, extract the files into Ansible's main directory, /etc/ansible, with the following command:
In the command below, be sure to replace <version> with the version of the package that was downloaded.
Enter the extracted directory:
Since the process takes some time to complete, it is recommended to run the installation script using screen to avoid interruptions.
For that, install screen:
Start a new session in screen:
Then, proceed to run the installation script as described below.
—
If the connection to the server is lost, the script will not be interrupted and you can resume the session by reconnecting to the server and running:
Then, run the installation script:
Answer the installation questions and proceed until finished.
Once started, DO NOT interrupt any of the scripts. If any problem occurs, contact the Griaule support team.
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 directory /opt/griaule/tools/deploy_application/files.
The file .sql the RDB dump script must be saved in another directory.
After running the following script, all contents of the directory /opt/griaule/tools/deploy_application/files will be deleted.
Then, run the following command to install GBDS:
After trying to run the script above, if you receive the error:
Enter the files:
And download the OpenCV package:
Then, try to run the deploy_application.sh script again.
Next, run the RDB dump script on the SQL server.
The RDB password was configured here.
After finishing the GBDS installation, configure it by running:
To review or manually change the settings, edit the configuration file located at: /etc/griaule/conf/gbds/application.conf. For more information about the settings, consult the GBDS Configuration Manual.
Make sure that the hostname in the configuration file (application.conf) matches the hostname of the server.
Then, start the GBDS API:
Test if the API is running:
The expected response is:
Finally, start GBDS:
And follow the installation execution
gbdslogt
Installing GBS applications
To install the GBS Applications, you will need: .war File
for each application .sql File
Dump script
/opt/griaule/tools/install_services/install_services.sh .war to the directory /opt/griaule/tools/deploy_application/files Then, move the files
/opt/griaule/tools/deploy_application/deploy_application.sh --services
/opt/griaule/tools/auto_appconfig/auto_appconfig.sh --services here.
Last updated
Was this helpful?

