Skip to content

Installation Instructions

On-Premise

For internal use only check out this installation guide.

Preparations

  • Include this addon as a requirement in the pyproject.toml file in your solution.
  • Check that all the requirements are met.

Create the Application Database

Lime BI requires a postgres database to run properly. Ensure that you have a Postgres instance that Lime BI can store its application database in.

After that, create a database in the PostgresSQL instance and give it the name lime-bi. (You can use the tool pgAdmin to connect to the PostgreSQL.)

In this step you also have to create a user in postgres that has read and write access to the database you just created.

Install Lime BI

  1. Start the Limefu prompt as an administrator.
  2. Run lime-bi service install and follow the guide that appears.
  3. When asked for passwords, make sure to type them out, since pasting them is not supported.
  4. The guide will ask you to use your browser to create a Metabase account, when you have done that you should return to the command prompt and click "enter".
  5. Follow the rest of the guide.

Info

If you mistyped either of the passwords, here is how you can update them without reinstalling Lime BI:

  • service user password: Go to services, scroll to Lime BI, right-click and select properties. Go to the logon tab and update the password.

  • MB_DB_PASSWORD: Search for "Environment Variables" in the start menu and click on "Edit the system environment variables". Click on "Environment Variables" and find the variable MB_DB_PASSWORD under system variables. Update the value with the password.

After updating either of the passwords, restart the Lime BI service.

Enable SSO with JWT (Optional)

Configure Metabase

  1. Login to Lime BI with your Lime BI admin user.
  2. Go to the admin settings page in Lime BI.
  3. Go to authentication in the left-hand side menu.
  4. Enable the setting Enable Password Authentication.
  5. Press the set-up button for JWT.
  6. Enable the setting User Provisioning.
  7. JWT Identity Provider URI: <lime-bi-url>/jwt-provider
  8. Generate a JWT signing key. Save this key temporarily since we will need it later.
  9. Enable the setting Synchronize Group Memberships.
  10. While in the admin settings page go to people in the menu bar then groups. Make sure you have a group with the same name as your Lime application display name. If not create a group (capitalisation matters).

Lime application config

Add the following keys to your application_config.yaml

config:
   addons:
      lime_bi: true
   lime-bi: 
      group_name: <Lime BI group name> 

Server config

Add the following keys to your config.yaml

plugins:
   lime_bi:
      metabase-return-to-url: /lime-bi/ # This is supposed to point to Lime BI. The config works assuming that Lime BI is running under the same domain as the web server (<servername>/lime-bi/). If it's running under a different domain, you can leave out this config.
      metabase-authentication-url: <lime-bi-url>/auth/sso/
      metabase-jwt-signing-key: <JWT signing key> # key from Enable SSO with JWT -> configure Metabase -> step 8  

Remember to restart the Lime CRM Webserver service.

Uninstall Lime BI

  1. Start the Limefu prompt as an administrator.
  2. Run lime-bi service uninstall and follow the guide that appears.

Cloud

Preparations

Shared Applications

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

Isolated Applications

  • Include this add-on as a requirement in the pyproject.toml file in your solution.
  • Deploy the new version of your solution
  • Complete the same steps below but for your isolated application.

Activate Lime BI

Info

These steps are the same for both shared and isolated applications.

  1. Add the following to the Application config:
    addons:
       lime_bi: true
    
  2. If the Lime CRM application is hosted in the legacy cloud:
    1. Go to CAFE. Find and open the correct Lime CRM application.
    2. Click "Create Lime BI readonly user".
    3. Go to the Overview tab.
    4. There, you can view the status of the Lime BI DB user. When it is Done you can proceed to the next step. You have to refresh your page to get an update of the status.
  3. Go to Lime Admin.
    1. Go to Settings -> Lime BI -> Setup.
    2. Click on Initialize and wait for it to finish.
    3. Pick a language and click on Sync.
    4. You should see a task with a status shown below the sync button.
      1. Depending on how large your database is, this sync could take some time.
      2. Click the refresh button to get the latest status.
    5. When it has finished successfully, you should be able to log in to Lime BI via the web client.
    6. Check that everything looks alright and that you can browse the data.

Embeddings in Cloud

Due to how Lime BI is set up in cloud you can only embed questions and dashboards placed in the application's own collection. This collection will have the same name as the solution. Otherwise, the process works like it is on-prem. If you try to embed a question or dashboard with an id that isn't belonging to the application you will get an error when saving the widget config.

Install Lime Bootstrap App in Desktop Client

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. Remember to unblock the downloaded zip file.
  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

Local environment

To run Lime BI locally in our docker based setup run

$ poetry add lime-bi
to install Lime BI. Then activate your local environment.

$ poetry shell

Next we will add the required services, metabase and postgres, to your docker-compose.yml file and start them.

$ lime-bi generate-dev-env
$ docker-compose up -d

Give the services a few minutes to come online and then go to localhost:3000 to set up your metabase account. Once this is done run:

$ lime-bi initialize
$ lime-bi setup

Head into Lime BI and your Lime CRM database. Note that the database is named the same as your solution and the SQL Server URL will be sqlserver

Finally, run:

$ lime-bi sync

You are all set. Happy data spelunking!