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¶
- Start the Limefu prompt as an administrator.
- Run
lime-bi service install
and follow the guide that appears. - When asked for passwords, make sure to type them out, since pasting them is not supported.
- 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".
- 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¶
- Login to Lime BI with your Lime BI admin user.
- Go to the admin settings page in Lime BI.
- Go to authentication in the left-hand side menu.
- Enable the setting
Enable Password Authentication
. - Press the set-up button for
JWT
. - Enable the setting
User Provisioning
. - JWT Identity Provider URI:
<lime-bi-url>/jwt-provider
- Generate a JWT signing key. Save this key temporarily since we will need it later.
- Enable the setting
Synchronize Group Memberships
. - 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¶
- Start the Limefu prompt as an administrator.
- 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.
- Add the following to the Application config:
addons: lime_bi: true
- If the Lime CRM application is hosted in the legacy cloud:
- Go to CAFE. Find and open the correct Lime CRM application.
- Click "Create Lime BI readonly user".
- Go to the Overview tab.
- There, you can view the status of the
Lime BI DB user
. When it isDone
you can proceed to the next step. You have to refresh your page to get an update of the status.
- Go to Lime Admin.
- Go to Settings -> Lime BI -> Setup.
- Click on Initialize and wait for it to finish.
- Pick a language and click on Sync.
- You should see a task with a status shown below the sync button.
- Depending on how large your database is, this sync could take some time.
- Click the refresh button to get the latest status.
- When it has finished successfully, you should be able to log in to Lime BI via the web client.
- 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.
- Install the LIP package by downloading the latest
lip.zip
from releases and run:Then, select your zip file that you downloaded. Remember to unblock the downloaded zip file.$ lip.InstallFromZip
- Copy the
limebi
folder in the apps catalogue to the sub folder apps in the Actionpad folder. - Add the HTML below to the index Actionpad in the appropriate place.
- Set up the right configuration by changing the
dashboardId
in the config to correspond to the dashboard that you have published for embedding. - Publish the Actionpads.
<div data-app="{
app: 'limebi',
config:{
dashboards: [
{
dashboardId:'1',
title: 'openlimebi',
whereToOpen: 'overview',
userGroups: ['Users']
}
]
}
}"></div>
Local environment¶
To run Lime BI locally in our docker based setup run
$ poetry add lime-bi
$ 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!