LEIP Analytics
LEIP Analytics provides a web application to analyze and graph metrics from all your LEIP experiments. For this to happen, you need to deploy the application either on the premises or in the cloud. Then the application must be connected to it from the LEIP SDK container.
On Premises Server Setup
Prerequisites
Your license key and access to the Latent AI Container Registry. You may contact support@latentai.com for assistance.
We recommend that you have at least 4GB of RAM available for Docker.
Installation Script
Download the following file to a directory called leip-analytics
on your computer:
Starting Server
To configure and start the server, run python3 run.py start
. This will interactively ask you some details to generate the configuration files: docker-compose.yml
and .env
. Then it will automatically start the server.
If you also want to include the Kibana service, you may do so by running python3 run.py start --kibana
.
Here’s an example run:
% cd leip-analytics
% python run.py start
***** Latent AI, Inc.
***** LEIP Analytics lifecycle script
Docker version 20.10.13, build a224086
Docker Compose version v2.3.3
Do you want to include sample data (50 experiments)?
(yes/no) [Default: no]: yes
Do you wish to configure the SMTP service for sending emails?
This is used to send account info to all LEIP Analytics users, but it is optional.
(yes/no) [Default no]: yes
SMTP TLS (yes/no) [Default: no]: yes
SMTP Host: smtp.gmail.com
SMTP Port: 587
SMTP User: noreply@example.com
SMTP Password: smtp-password
[+] Running 4/4
⠿ db Pulled 1.5s
⠿ elasticsearch Pulled 1.7s
⠿ frontend Pulled 2.2s
⠿ backend Pulled 2.2s
[+] Running 7/7
⠿ Network leip-enterprise_net Created 0.0s
⠿ Volume "leip-enterprise_app-db-data" Created 0.0s
⠿ Volume "leip-enterprise_elasticsearch" Created 0.0s
⠿ Container leip-enterprise-elasticsearch-1 Started 0.7s
⠿ Container leip-enterprise-db-1 Started 0.6s
⠿ Container leip-enterprise-backend-1 Started 1.0s
⠿ Container leip-enterprise-frontend-1 Started 1.5s
Successfully started LEIP Analytics Server
You can access it at http://localhost
Username: admin
Password: <password>
LEIP Analytics will keep running on the background, and will restart automatically if a service ever fails.
You may configure it yourself with 'docker-compose'
DONE.
The script output will include your administrator account details for the LEIP Analytics UI, and the optional account for the Kibana UI. After about 30 seconds, all services should be ready, and the locally deployed application will be available at http://localhost.
Stopping Server
When you need to stop the services, run:
python3 run.py stop
Clearing Configuration
If you want to clear the current configuration to start over, run:
python3 run.py clear
UI Access
You may open the LEIP Analytics UI at http://localhost and login with your configured administrator account from the output of the run script.
If you accepted the inclusion of sample data, you can visualize those already.
Before you configure your LEIP SDK container to send events to LEIP Analytics, you may want to add a new user, a project, and permissions between them, so that you can associate events with that user and project. To create them, use the configuration button on the top right and click “Configure users” and/or “Configure projects.”
LEIP SDK Container Setup
To easily connect your LEIP SDK container to LEIP Analytics, determine the name or hash of your running SDK container (usually leip
) and then run this (outside of the container):
docker network connect leip-analytics_net leip
And then, switch back to the SDK container and configure LEIP Analytics by running:
leip analytics init
Here you will set these values:
Server host:
http://backend:8080
.Username:
admin
(or any user you previously set in LEIP Analytics UI).Password: the password for
admin
, indicated in the output of the start command, or the password set by you in the LEIP Analytics UI.Project: Select a project from the list (if you created one and gave the user permission) or just select
<None>
.
You may change any of these values at any time using individual commands (See leip analytics --help
for details).
General Usage
After the LEIP Analytics server is up and a LEIP SDK container is configured, you may run any LEIP commands on the LEIP SDK container as usual and will be able to visualize metrics data on the LEIP Analytics application.