Getting Started
This guide will help you to install and start the Lires server.
For using it with Docker, please refer to Docker Deployment.
Table of Contents
Installation
From PyPI
pip install 'Lires[all]'From source
- Compile frontend files
Prerequisites: Node.js, Make
make build- Install the servers
pip install ".[all]"Server startup
Manual startup
Start the microservices with the following commands:
lires registry # the global resource module, for service discovery
lires log # the log service
lires ai # the AI service
lires feed # the feed serviceLires services are designed to be scalable, and can be started with multiple instances (except for the registry service).
INFO
The registry service is for service discovery, and should be started before other services.
Then, start the gateway server:
lires server # the gateway serverLires server is a tornado server that provides API for the client (WebUI & CLI) to communicate with, and should be exposed to the internet.
Details
More on starting the servers
$LRS_HOME directory is used for application data storage, by default it is set to ~/.Lires.
The data directory contains the configuration file, log files, database, cache files...
To start the application with arbitrary data directory, you can run:
LRS_HOME="your/path/here" lires ...Additionally, various environment variables can be set to customize the behavior of the application. A detailed list of environment variables can be found at here.
Cluster startup
It will be laborious and error-prone to start multiple servers manually.
Especially when we want to start multiple servers with different configurations.
Instead, we provide a simple script to enable server clustering for easy deployment.
# Generate a template configuration file
lrs-cluster <your/configuration.yaml> --generate
# Edit the configuration file
# ...
# Start the cluster
lrs-cluster <your/configuration.yaml>The configuration file designates the environment variables, as well as the command line arguments for each server.
Create the first user
On the first run you need to create a user account, which can be done by running the lrs-user command in the container.
# export LRS_HOME="..."
lrs-user add <username> <password> --adminAfter the user is created, you can manage other users with this user via the web interface.
For more information, see User management.
Management
There are several management tools for the server, they are all accessible by lrs-<tool_name>.
A list of all the tools and common tasks can be found in manage.md.