Overview

  • This guide describes the installation steps for the SQream Administration Dashboard. This is the administration and monitoring tool for the SQream database.

  • The SQream Administration Dashboard must be installed on the same machine as the SQream DB.

  • The Administration Dashboard is a web-application and currently supports the Chrome browser only.

  • Before you start the installation of the Administration Dashboard make sure SQream DB is successfully installed and you can connect to it, for example using ClientCmd, Workbench or any other supported client application.

1. Prerequisites

1.1. Install Node.js 10.x

Node.js is an open source server framework. It allows you to run JavaScript on the server. To check whether you already have Node.js installed, run:

node --version

1.1.1. Centos 7.x

If your PC has internet access you can install it directly from there (Option 1). If your PC doesn’t have internet access you have to first download it and then install it (Option 2).

Option 1 - with Internet access

If your PC has internet access perform the following:

curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
sudo yum install -y nodejs
Option 2 – no Internet access

Download the latest version of node.js and then copy it onto the machine you want to install the Dashboard.

Install:

tar xzvf node-v10.14.1.tar.gz && cd node-v10.14.1
./configure
make
sudo make install
Verify Node 10.x is installed
node --version

In case you still have a lower version of node installed make sure to completely uninstall and install node 10.x.

1.1.2. Ubuntu 16.04

Install Node 10.x
cd ~
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install -y nodejs
Verify Node 10.x is installed
node --version

In case you still have a lower version of node installed make sure to completely uninstall and install node 8.x.

1.2. Install PM2 - Node Daemon Manager

This step is required only for the Dashboard installation in a stand-alone environment (without Pacemaker). If your system uses Pacemaker for High Availability you will skip this step.

1.2.1. Centos 7.x

Install the Node Daemon Manager:

sudo yum update openssl
sudo npm install pm2 -g

1.2.2. Ubuntu 16.04

Install the Node Daemon Manager for ubuntu 16.04:

sudo apt-get upgrade openssl
sudo npm install pm2 -g

2. Create the Dashboard Role (for SQream)

This step is required only during the first installation of Dashboard. During an upgrade this step is skipped.

Create the dashboard role for SQream. This role is used by the Administration Dashboard application to connect to SQream and perform all relevant database operations, such as stop statements, etc. Therefore, this role must have superuser permissions.

  • Connect to SQream. You can use the ClientCmd or any other supported client to log on to the master database of SQream.

  • Run the following statements:

CREATE ROLE dashboard;
GRANT superuser TO dashboard;
GRANT login TO dashboard;
GRANT PASSWORD 'sqream' to dashboard;

3. Deployment Steps

3.1. Install the Dashboard application

From this step onward, use the sqream user on your system:

su - sqream
cd ~

3.1.1. Copy the dashboard application tar file

Copy the dashboard application tar file to the folder you would like to install the Administration Dashboard to:
In a stand-alone system, this could be /home/sqream.
In a system with Pacemaker, this typically is /usr/local/sqream.

For example:

# Stand-alone system
cp sqream_dashboard_2.0.3.tar.gz /home/sqream/
# HA system with Pacemaker:
cp sqream_dashboard_2.0.3.tar.gz /usr/local/sqream/

3.1.2. During Upgrade

Stop the Dashboard application

If you upgrade the dashboard, stop the currently running dashboard application. For example:

# Stand-alone system:
NODE_ENV=production pm2 start sqream_dashboard/server.js --name sqream_dashboard

# HA system with Pacemaker:
sudo pcs resource disable dashboard
Backup the current application folder

If you upgrade the dashboard, rename the existing sqream_dashboard directory. For example:

# Stand-alone system:
mv /home/sqream/sqream_dashboard /home/sqream/sqream_dashboard_bkup

# HA system with Pacemaker:
mv /usr/local/sqream/sqream_dashboard /usr/local/sqream/sqream_dashboard_bkup

3.1.3. Extract the dashboard application tar file

Untar (extract) the dashboard application tar file. This opens the application into the sqream_dashboard directory. Typically, this would be /home/sqream/sqream_dashboard or /usr/local/sqream/sqream_dashboard

For example:

tar -xvf sqream_dashboard_2.0.3.tar.gz

3.2. Copy the Dashboard database file (SQLite)

This step is required only during the first installation of Dashboard. During an upgrade this step is skipped.

Administration Dashboard uses a small file-based database (SQLite) to store the dashboard users, settings, etc. The initial database file is part of the dashboard package. Location: ~sqream_dashboard/users-data/user.db

Copy the initial database file to the folder you want to store the Administration Dashboard database (SQLite). Note that this file should be backed up on a regular basis, similar to the SQream data storage. Therefore, it is good practice to store the Administration Dashboard database file under the SQream storage which typically gets backed up on a regular basis.

For example:

cp ~/sqream_dashboard/users-data/users.db /media/big/storage/dashboard_data/

3.3. Copy the Administration Dashboard configuration file

This step is required only during the first installation of Dashboard. During an upgrade this step is skipped.

The dashboard configuration file is part of the installation package. Location: ~sqream_dashboard/config/default/

Options: * uiAppConfig.json file is used for cloud installations only * uiAppConfigOnPrem.json file is used for on-premises installations

Copy the relevant JSON file into the /etc/sqream directory. This is the folder where typically all SQream related configuration files are stored. Note that the final file name must be uiAppConfig.json.

For example:

sudo cp ~sqream_dashboard/config/default/uiAppConfigOnPrem.json /etc/sqream/uiAppConfig.json

Change the owner of the uiAppConfig.json to user sqream.

For example:

sudo chown sqream:sqream /etc/sqream/uiAppConfig.json

3.4. Setup the Administration Dashboard configuration file

This step is required only during the first installation of Dashboard. During an upgrade this step is skipped.

Edit the uiAppConfig.json and configure the following setting to match your local system:
* checkForUpdates - This flag handles the remote upgrade of Dashboard and Editor. Only for a cloud implementation this should be set to TRUE.
* upgradeEditor - This flag handles the remote upgrade of Editor. Only for a cloud implementation this should be set to TRUE.
* usersFolder - Points to the folder of the dashboard data files (SQLite)
* uploadFolder – Points to the working directory for CSV uploads (temp folder)
* csvFolder – Points to the destination folder for CSV uploads
* csvErrorLogFolder – Points the folder where the error log files are generated during CSV uploads
* sqreamLicenseUtilPath – Points to the license_check binary of the SQream DB

Configure the settings in the sqreamCluster block. Make sure to list the ports for all SQream instances (GPU).

For Example:

"sqreamCluster": [
        {
            "UI_Server": true,
            "serverIp": "1",
            "config": {
                "sqreams": [
                    5000,5001,5002,5003,5004,5005,5006,5007
                ],

3.5. Setup the sqream_config.json file

This step is required only during the first installation of Dashboard. During an upgrade this step is skipped.

The sqream_config.json configuration file is part of the SQream installation package. Location: /etc/sqream/sqream_config.json

Edit the sqream_config.json file and configure the settings in the server block to match your local system. Typically this is the same configuration as done in sqream1_config.json, sqream2_config.json (etc).

  • licensePath - Points to the license file (path and file name).

  • cluster - Points to the SQream storage folder.

For Example:

"server": {
    "licensePath" : "/etc/sqream/license.enc",
    "port": 5000,
    "cluster": "/home/sqream/sqream_storage",
    "gpu": 0,
    "ssl_port":5100
}

4. Test the installation

4.1. Stand-alone system

After the initial installation, test the Administration Dashboard application by starting it manually:

NODE_ENV=production node ~/sqream_dashboard/server.js

Using Chrome browse to:

http://{server_ip}:3001

Make sure the logon screen appears and you can log on to the application using user sqream, password sqream11 (this is the built-in user for the Administration Dashboard). The password for this user can be changed in the Dashboard application in the Dashboard Users module.

4.2. HA system with Pacemaker

Start the dashboard application:

# HA system with Pacemaker:
sudo pcs resource enable dashboard

Using Chrome browse to:

http://{server_ip}:3001

Make sure the logon screen appears and you can log on to the application using user sqream, password sqream11 (this is the built-in user for the Administration Dashboard). The password for this user can be changed in the Dashboard application in the Dashboard Users module.

5. Stand-alone system: Start or stop the Administration Dashboard application as a service

To start the node server as a service run the following command:

NODE_ENV=production pm2 start ~/sqream_dashboard/server.js --name sqream_dashboard

To stop the node server run the following command:

NODE_ENV=production pm2 stop ~/sqream_dashboard/server.js --name sqream_dashboard

6. Stand-alone system: Add the Node Daemon Manager (PM2) to the startup script after boot

To setup the startup script for the Node Daemon Manager, run the following command:

pm2 startup

Then copy the received command line and run it.

For example:

sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u sqream --hp /home/sqream

To remove from startup :

pm2 unstartup

Copyright © 2010-2018. All rights reserved.

This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchant- ability or fitness for a particular purpose.

We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document.

This document may not be reproduced in any form, for any purpose, without our prior written permission.