Overview

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

  • Operation System must be Centos 7.3 or Ubuntu 16.04.

  • 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

Node.js is an open source server framework. It allows you to run JavaScript on the server.

1.1.1. Centos 7.3

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_8.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-v8.9.3.tar.gz && cd node-v8.9.3
./configure
make
sudo make install
Verify Node 8.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.1.2. Ubuntu 16.04

Install Node 8.x
cd ~
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install -y nodejs
Verify Node 8.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

1.2.1. Centos 7.3

Install the Node Daemon Manager for centos 7.3:

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)

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 ~

Copy the application tar file to the folder you would like to install the Administration Dashboard to. Typically, this would be /home/sqream

Untar (extract) the package into the user home directory. This opens the application into the sqream_dashboard directory. Typically, this would be /home/sqream/sqream_dashboard

For example:

tar -xvf dashboard-v0.9.7.tar.gz

3.2. Copy the Dashboard database file (SQLite)

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

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

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

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

After the 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.

5. 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. 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.