Skip to content

Installation Instructions

Cloud

Preparations

Shared Application

  • No preparations are needed. Lime BI is included by default.

Customized Application

  • Include lime-bi as a dependency in your solution.

Activate Lime BI

  1. Add the following to the application config:
    addons:
       lime_bi: true
    
  2. Go to Lime Admin, Settings, Lime BI, Setup.
  3. Select a language and click Initialize and Sync to register the Lime CRM database in Lime BI and synchronize the data.

On-premise

Lime BI is installed on the customers Lime CRM application server, together with the Postgres database server.

Prerequisites

Requirements must be met.

Install PostgreSQL

PostgreSQL is the database used for storing Lime BI data (data model, questions, dashboards and so on) and needs to be installed prior to Lime BI.

  • Download the latest PostgreSQL from here.
  • Run the installer file as administrator.
  • Specify installation folder. Choose your own or keep the default folder suggested by PostgreSQL installer.

PostgreSQL components

  • Select the components according to the image below.

PostgreSQL components

  • Specify the folder of the PostgreSQL data.

PostgreSQL data

  • Set a password for the postgres database superuser.

PostgreSQL password

  • Enter the port for PostgreSQL. No other applications should be using this port. Leave it as default if unsure.

PostgreSQL port

  • Select the default locale used by the database.

PostgreSQL locale

  • The installation may take few minutes to complete.

PostgreSQL install

  • Deselect launch Stack Builder once the installation is completed.

PostgreSQL finish

Create database in PostgreSQL

This step creates the PostgreSQL database used for storing Lime BI metadata.

  1. Open pgAdmin 4.
  2. Enter the password you set earlier in the first part of the installation.
  3. Right-click on Databases and select Create > Database.
  4. Name the Database lime-bi.
  5. Set the Owner to postgres.

Install the Lime BI service

In this step, the Lime BI service is installed as a Windows service and configured to connect to the PostgreSQL database you created in the steps above.

  1. Start the Lime command prompt as an administrator.
  2. Run lime-bi install and follow the guide.

    Lime BI install

Setup Metabase with an admin user and enterprise token

  1. Open <servername>/lime-bi in a browser.

    Metabase setup

  2. Create an admin account.

    Metabase setup

  3. Select Not sure yet.

    Metabase setup

  4. Select I'll add my data later.

    Metabase setup

  5. Paste the enterprise token and activate.

    Metabase setup

  6. Click Finish.

    Metabase setup

Lime application config

On-premise stores all settings in application config.

Setup

Create an application_config.yaml file if it does not already exist.

the-customer-app:
  config: {}
  secrets: {}

Content

This is an example of a typical application_config.yaml for an on-premise installation:

the-customer-app:
  config:
    addons:
      lime_bi: true
    lime-bi:
      site_url: https://<servername>/lime-bi  # See Site url
      group_id: 9
      group_name: the-customer-app
      database_id: 26
      collection_id: 10
      # windows_auth: true  # Default. See SQL Server authentication
  secrets:
    lime-bi:
      embedding_secret_key: <Embedding secret key>  # See Embedding secret key
      jwt_signing_key: <JWT signing key>  # See Enable SSO with JWT
      admin_username: admin@lime-bi.com  # Created manually during install
      admin_password: supersecret123
      application_username: user@lime-bi.com  # Needs to be set before initialization
      application_password: supersecret123
      # readonly_db_user_username: <user>  # See SQL Server authentication
      # readonly_db_user_password: <pass>

Info

The group_id, group_name, database_id, and collection_id configs are generated automatically on initialization and should not be manually set.

Site url

The site url is the external url used to access Lime BI.

  1. Open <servername>/lime-bi in a browser, click the ⚙️ up to the right and click Admin settings.
  2. Click General.
  3. Enter the external url to Lime BI.
  4. Also add it to the config section as site_url in the application config.

Embedding secret key

An embedding secret key is needed in order to embed Lime BI diagrams in the Lime CRM clients.

  1. Open <servername>/lime-bi in a browser, click the ⚙️ up to the right and click Admin settings.
  2. Click Embedding and Static.
  3. On the Static embedding page, copy the secret key displayed under Embedding secret key. Regenerating the key is optional.
  4. Add it to the secrets section as embedding_secret_key in the application config.

Enable SSO with JWT

  1. Open <servername>/lime-bi in a browser, click the ⚙️ up to the right and click Admin settings.
  2. Click Authentication, JWT.
  3. Enter <servername>/lime-bi/jwt-provider in JWT Identity Provider URI.
  4. Generate a String used by the JWT signing key
  5. Press Save and enable
  6. Add it to the secrets section as jwt_signing_key in the application config.

SQL Server authentication (optional)

By default, windows_auth is true and the Metabase service authenticates to SQL Server using the Windows service account. No SQL credentials are needed.

To use SQL Server authentication instead:

  1. Set windows_auth: false in config.lime-bi.
  2. Fill in readonly_db_user_username and readonly_db_user_password in secrets.lime-bi with SQL credentials.

Info

readonly_db_user_username/readonly_db_user_password/windows_auth should be removed from app config after Lime BI has been initialized in Lime Admin.

Initialize Lime BI

The final step in the installation is to Initialize and sync Lime CRM and Lime BI.

  1. Go to Lime Admin, Settings, Lime BI, Setup.
  2. Select a language and click Initialize and Sync to register the Lime CRM database in Lime BI and synchronize the data.

Schedule automatic syncs (optional)

To keep Lime BI data up to date automatically, you can schedule syncs using task-handler. Add the following to solution-customer/tasks/__init__.py:

from lime_task.schedule import CronTab, ScheduledTask, TaskSession
from lime_bi.tasks import metabase


def get_task_modules():
    return []


def register_scheduled_tasks():
    task_session = TaskSession(user_name="<SYNC_LIME_USER>", language="en_us")
    return [
        ScheduledTask(
            task=metabase.sync,
            schedule=CronTab(hour="23"),
            args=[],
            session=task_session,
        )
    ]

Replace <SYNC_LIME_USER> with the appropriate Lime CRM user and adjust the CronTab schedule as needed (the example syncs at 23:00 every night).

Uninstall Lime BI

  1. Start the Lime command prompt as an administrator.
  2. Run lime-bi uninstall and follow the guide.

Desktop Client

Install Lime Bootstrap App

Only needed if you want to show a Lime BI dashboard in the desktop client.

  1. Install the LIP package by downloading the latest lip.zip from releases and run:
    lip.InstallFromZip
    
    Then, select your zip file that you downloaded.
  2. Copy the limebi folder in the apps catalogue to the sub folder apps in the Actionpad folder.
  3. Add the HTML below to the index Actionpad in the appropriate place.
  4. Set up the right configuration by changing the dashboardId in the config to correspond to the dashboard that you have published for embedding.
  5. Publish the Actionpads.

   <div data-app="{
      app: 'limebi',
      config:{
         dashboards: [
            {
               dashboardId:'1',
               title: 'openlimebi',
               whereToOpen: 'overview',
               userGroups: ['Users']
            }
         ]
      }
   }"></div>
See more under Configuration