Skip to content
Snippets Groups Projects
Forked from AURA / engine
1704 commits behind, 477 commits ahead of the upstream repository.

Install for Development

Prerequisites

Aura Engine runs on any modern Debian-based OS. It requires at least

  • Node 13
  • Python 3.7
  • OPAM
  • git

Additionally you'll need these system packages:

apt-get install \
    redis-server \
    libsndfile1 \
    ffmpeg \
    quelcom \

Install Liquidsoap

Now it's time to install the Liquidsoap and its dependencies.

Install Liquidsoap 1.4.1 or newer, using OPAM.

Let's initialize OPAM for the user you are going to run the engine with:

  opam init

Setup Database

The following installation script sets up the database.

  bash script/setup-db.sh

By default Aura Engine uses MariaDB for persistence. When starting this script, please ensure you have root access to your database instance. The installation script automatically creates a database plus an associated user with password. If you want to use your own database system, select "Other / Manually" during the database installation step.

In case of MariaDB the script also installs these system dependencies:

apt-get install mariadb-server libmariadbclient-dev

When this is completed, carefully check if any error occured. In case your database has been setup automatically, note the relevant credentials for later use in your engine.ini configuration.

Cloning the project

Then clone the project to some development folder:

git clone https://gitlab.servus.at/autoradio/engine

Installation

./install.sh

This script does the following:

  • Install Liquidsoap components using OPAM (script/install-opam-packages)
  • NodeJS Modules (script/install-web.sh)
  • Python Packages (requirements.txt)
  • Creates a default configuration file in configuration/engine.ini

When this is completed, carefully check if any error occured.

Configuration

In your development environment edit following file to configure the engine:

./configuration/engine.ini

Please note if some configuration exists under /etc/aura/engine.ini the configuration is read from there by default.

Read more about detailed settings in the Configuration Guide.

Running Engine

Use the convencience script run.sh to get engine started in different ways:

Run the Engine

This includes the Liquidsoap audio engine, but does not start the API server.

    ./run.sh

Run the Engine Core and Liquidsoap separately

When developing and debugging engine it is helpful to start the core and the Liquidsoap component separately. In such case it is important to start both in the correct order.

First start the core of the engine:

    ./run.sh core

When engine-core completed its boot phase, indicated by a log that it is waiting for Liquidsoap, you can run following:

    ./run.sh lqs  

Run the Engine API

This requires to start the core component in another terminal.

    ./run.sh api-dev

In development mode Engine uses the default Flask web server. Please be careful not to use this type of server in your production environment.

Check out more ways of running the engine in the Developer Guide.

Logging

All Engine logs for development can be found under ./logs.

Read more