Document toolboxDocument toolbox

Installation and setup

These are installation and setup instructions for the latest flex.bi Enterprise version 6.4.

The following is a general flex.bi Enterprise installation guide. We have also prepared a more specific instructions about installation on Centos 8 platform: flex.bi Enterprise installation guide on CentOS 8.

Requirements

  • flex.bi Enterprise installation is supported on Mac OS XLinux and Windows.
  • Java 11 should be installed. Only Oracle or OpenJDK JVMs are supported.
  • MySQL (version 5.5 - 5.7), PostgreSQL (version 9.x - 11.x), MS SQL (version 2008 or later) and Oracle (version 11g or later) are supported as flex.bi Enterprise database.
  • Minimum requirements for server:
    • CPU with 6 cores;
    • 16 GB RAM;
    • 320 GB disk space.

Installation

Ask flex.bi support  to provide a download URL for the latest flex.bi Enterprise full distribution .zip file.

Unzip the downloaded file and copy the folder flexbi_private with all its contents from the downloaded file into the destination directory where all flex.bi Enterprise files will be located.

Make sure that all all of the the files in flexbi_private folder are owned by the user that runs flexbi process (by default the user is flexbi).

Make sure you have set up server entropy to avoid your server from being slow and unresponsive. See our guide for  Setting up server entropy using Haveged.


On Windows, there is a maximum 260 characters length limit for the full file path. flex.bi has a deeply nested folder structure. System full file paths may exceed this limitation if the flexbi_private folder is located deeply in the folder hierarchy. We recommended to create the flexbi_private folder directly in the root folder for Windows installations.

Directory structure

flexbi_private directory contains the following subdirectories and files:

  • app - for flex.bi Enterprise customizations (e.g. custom layouts or view templates)
  • bin - startup and other shell scripts
  • config - configuration files
  • data - for storing uploaded files
  • flexbi_private.jar - main application archive file
  • lib - additional Ruby files or *.jar files (added if necessary)
  • log - web request and queue job log files

Database setup

flex.bi will store data in additional MySQL, PostgreSQL, Microsoft SQL Server, or Oracle database. It is recommended that you create a separate database user for flex.bi needs (by default with a name flexbi_private) which will then create additional databases on a specified database server.

By default, flex.bi will use one database.

The following are database server-specific instructions for flex.bi database setup.

MySQL

You can create a separate user flexbi_private and grant access to all MySQL databases which start with flexbi_private prefix: (Replace secret with chosen password.)

GRANT ALL PRIVILEGES ON `flexbi_private%`.* TO 'flexbi_private'@'%' IDENTIFIED BY 'secret';

When you will specify the database connection parameters in flex.bi then the flexbi_private database will be created. Later when additional flex.bi accounts will be created then each account data will be stored in separate databases with names flexbi_private_dwh_N where N is account ID number.

In addition, you should download MySQL JDBC driver  version 8.0.23 and copy included mysql-connector-java-8.0.23.jar to flexbi_private/lib directory (MySQL JDBC driver is not included in flex.bi Enterprise distribution due to GPL license restrictions).

Please also tune MySQL memory settings to speed up both data import and data queries. The following my.cnf settings are recommended:

innodb_buffer_pool_size = 1024M
innodb_log_file_size = 256M
query_cache_size= 16M
query_cache_type = 1
character-set-server = utf8
collation-server = utf8_general_ci

innodb_buffer_pool_size will specify how much database data MySQL can store in memory - adjust it to your available server memory (the more data MySQL will store in memory the less disk input/output operations will be performed). If you will change innodb_log_file_size then it will require that you delete existing MySQL log files before starting the MySQL server.

PostgreSQL

You can create separate user flexbi_private with database creation rights: (Replace secret with chosen password.)

CREATE ROLE flexbi_private PASSWORD 'secret' LOGIN CREATEDB;

If you do not want to add CREATEDB role to the flexbi_private user then create manually the database flexbi_private with flexbi_private user as an owner.

Each new flex.bi account will store data in a new dwh_N schema (where N is account ID number) in the same database.

Please tune PostgreSQL memory parameters. The following postgresql.conf settings are recommended:

shared_buffers = 1024MB
wal_buffers = 32MB

shared_buffers will specify how much database data PostgreSQL can store in memory - adjust it to your available server memory (the more data PostgreSQL will store in memory the less disk input/output operations will be performed). wal_buffers affects the performance of writing transaction logs to disk.

Microsoft SQL Server

Create MS SQL Server user flexbi_private – if you will use SQL Server Management Studio then select SQL Server authentication and uncheck Enforce password policy. In addition from Server Roles select dbcreator (to allow the creation of new databases) or create manually flexbi_private database with flexbi_private user as an owner.

Each new flex.bi account will store data in a new dwh_N schema (where N is account ID number) in the same database.

By default, flex.bi uses a bundled jTDS JDBC driver to connect to Microsoft SQL Server. The jTDS driver does not support an SSL connection to SQL Server. If SSL is required for your SQL Server connection, then use the Microsoft JDBC driver. Please download the latest JDBC driverand copy the corresponding sqljdbc*.jar or mssql-jdbc*.jar  into the flexbi_private/lib directory. After restarting flexbi service, you should see both jTDS and Microsoft JDBC driver options on the settings page.

Oracle

Create an Oracle database user flexbi_private: (Replace secret with chosen password.)

CREATE USER flexbi_private IDENTIFIED BY secret DEFAULT TABLESPACE users;
GRANT CONNECT, RESOURCE TO flexbi_private;

In this configuration, all flex.bi data will be stored in one flexbi_private schema.

In addition, you should download the Oracle JDBC driver ojdbc8.jar and copy it to the flexbi_private/lib directory.

Start application

On Mac OS X and Linux start the application with the bin/start.sh shell script. Please review the bin/start.sh script and if necessary customize it (e.g. increase Java memory parameters in JAVA_OPTS environment variable).

On Windows start application with the bin\start.bat batch file. Please review bin\start.bat and customize it if necessary (e.g. change JAVA_OPTS).

If you get an error message java.lang.reflect.InvocationTargetException  then please check that you are using Java 11 or later (check with java -version).

Wait until you see the message Private eazyBI (version ...) started on http://localhost:8080/flexbi and then open http://localhost:8080 in your browser – you should see the flex.bi settings page.

In the flex.bi settings page specify database connection parameters for flexbi_private database. By default, all flex.bi account-specific data will be stored in the same database (as described earlier in the Database section). If you want you can select Use separate DWH database option and specify a different database where account specific schemas (with uploaded or imported data) should be stored. Database connection parameters will be stored in the config/database.toml file.

In addition in the settings page please specify your flex.bi license information – the license name and key. License information will be stored in the config/eazybi.toml file.

If database and license information will be correct then you will be redirected to the sign-up page where you can create the first system administration user account.

eazybi.toml configuration file

In the config/eazybi.toml file you can configure different flex.bi parameters. The configuration file uses the TOML format. Please see comments and commented examples for each section in this file.

On Windows please use the text editor that supports Unix style line endings when editing the eazybi.toml file. The standard Notepad application will not display the content of this file correctly. We recommend using the Notepad++ application.

If you would like to add e-mail notifications support (to invite users, reset passwords or receive notifications about failed import jobs) from flex.bi, then provide SMTP server information that can be used for outgoing e-mails (mailer section in the configuration file). In addition, uncomment and specify the default_url_options section which is used to generate full URL links back to your private eazyBI server.

If you would like to set up the Jira application link to fex.bi Enterprise server then also please specify default_url_options.

In the accounts section you can provide connection parameters and schema definition files for accounts with a custom schema. See “FoodMart custom” account as an example.

If you would like to add or replace your flex.bi Enterprise license key

You need to open the eazybi.toml file and edit the licence section. Example:

name = "Forward And Upward Inc."
key = """
dwadwadakjajghvt67wbrv439bt4832893e209389bv23
"""

Linux service startup script

bin/init.d/flexbi.sample is a Linux service startup script which can be modified and copied to /etc/init.d/flexbi. Please specify the EAZYBI_HOME variable in this script to point to flexbi_private directory full path. By default, this startup script will use $EAZYBI_HOME/bin/start.sh to start flex.bi – if needed then create a separate copy of the start.sh script if different parameters should be used when starting flex.bi as a service.

Windows service

flex.bi Enterprise distribution by default does not include support for running as a Windows service. But you can use an application like AlwaysUp to create a Windows service that will start the bin\start.bat file from the flex.bi Enterprise installation directory.

Provide access to flex.bi from other computers

By default, flex.bi Enterprise will be accessible just locally at the address http://localhost:8080. If you want to provide access to flex.bi Enterprise from other computers then edit bin/start.sh or bin\start.bat and set EAZYBI_HOST  to 0.0.0.0 at the end of the file.

If you would like to change default web application port 8080 to a different port then edit bin/start.sh or bin\start.bat and modify EAZYBI_PORT .

On Linux or Mac OS X if you would like to start an application which listens to HTTP port 80 then you need to start application as  root . An alternative solution is to use a frontend web server which listens to port 80 and proxies web requests to flex.bi Enterprise. Please contact flex.bi support  if you need help with flex.bi Enterprise setup in production mode.

Export to PDF using Google Chrome

If you would like to export dashboard pages to PDF or send regular emails with flex.bi dashboards as PDF attachments then please install Google Chrome on your flex.bi Enterprise server.

Troubleshooting

If the flex.bi Enterprise initial page does not open or opens with an error message then check either console output or check the log file log/eazybi-web.log if it has any error messages.

After eazyBI has started up it will store its log files in log subdirectory:

  • eazybi-web.log contains a log of web requests
  • eazybi-queues.log contains a log of background queue jobs

Please contact flex.bi support if you have any issues with flex.bi Enterprise installation and setup.

Version upgrade

To upgrade flex.bi Enterprise version here is what you should do:

  1. Download the newest version or ask flex.bi support or your partner to provide it to you.
  2. Stop the flexbi server process.

  3. Make a backup copy of your SQL database, e.g., using mysqldump: (Replace <username> and <password>  with the actual username and password of your MySQL server.)

    mysqldump -u <username> -p<password> --all-databases >> flexbi_private_dump_2021.01.01.sql
  4. Make a backup copy of the existing installation, by copying the flexbi_private folder to e.g. flexbi_private_5.0.

  5. Delete the following files and folders from your existing server folder:

    flexbi_private/spec
    flexbi_private/app 
    flexbi_private/db/migrate
    flexbi_private/config/initializers
    flexbi_private/config/locales
    flexbi_private/examples
    flexbi_private/public/images
    flexbi_private/public/flexbi
    flexbi_private/public/javascripts
    flexbi_private/public/style
    flexbi_private/public/stylesheets
    flexbi_private/config/torquebox
    flexbi_private/vendor
    flexbi_private/LICENSE
    flexbi_private/CHANGELOG.md
    flexbi_private/flexbi_private.jar
    flexbi_private/tmp
  6. Extract the new flex.bi version .zip archive into flexbi_private/ folder.

  7. Make note of files that are overwritten during extraction process. Especially for configuration files in the config folder and startup files in bin folder. Manually compare them with the backed up versions and bring over any changes that you made during initial server setup.

  8. Make sure that all all of the the files in flexbi_private folder are owned by the user that runs flexbi process (by default the user is flexbi).

  9. If you are updating from flex.bi version older than 5.1, then:
    1. If you are using a systemd initialization script, change it according to this example(don't forget to adjust directories, port, Java memory settings and other parameters specific to your installation):

      # Sample init script for flex.bi
      [Unit]
      Description=flex.bi reporting service
      After=syslog.target network.target
      [Service]
      Type=simple
      # Run the service as this user and group
      User=flexbi
      Group=flexbi
      TimeoutSec=30
      # Remember to change /home/flexbi/flexbi_private to the actual home directory of flex.bi in all places
      WorkingDirectory=/home/flexbi/flexbi_private
      Environment="RAILS_ENV=production"
      Environment="EAZYBI_HOME=/home/flexbi/flexbi_private"
      Environment="EAZYBI_PREFIX=/flexbi"
      Environment="RUBYOPT=-W0"
      # Adjust to available memory
      Environment="JAVA_OPTS=-Xmx1024m -Xms256m -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dorg.eclipse.jetty.LEVEL=OFF -Djava.io.tmpdir=/home/flexbi/flexbi_private/tmp"
      
      # Default configuration
      ExecStart=/usr/bin/java $JAVA_OPTS -Dwarbler.host=localhost -Dwarbler.port=8080 -jar flexbi_private.jar
      
      
      Restart=on-failure
      StandardOutput=syslog
      StandardError=syslog
      SyslogIdentifier=flexbi
      #LimitNOFILE=10000
      [Install]
      WantedBy=multi-user.target
    2. If  you are using nginx as a web proxy, add these lines to your nginx configuration:

      proxy_http_version 1.1;
      proxy_set_header Connection "";
  10. Start the flexbi Enterprise server process.
  11. Check flex.bi Enterprise Changelog for any additional action mentioned to be performed before the upgrade.