Commit 80f9985f authored by david's avatar david
Browse files

Run mode for dev. #72

parent d1c3d835
...@@ -7,6 +7,7 @@ This page gives insights on extending Aura Engine internals or through the API. ...@@ -7,6 +7,7 @@ This page gives insights on extending Aura Engine internals or through the API.
- [Aura Engine Development Guide](#aura-engine-development-guide) - [Aura Engine Development Guide](#aura-engine-development-guide)
- [AURA Componentes](#aura-componentes) - [AURA Componentes](#aura-componentes)
- [Engine Components](#engine-components) - [Engine Components](#engine-components)
- [Running Engine for Development](#running-engine-for-development)
- [API](#api) - [API](#api)
- [Scheduler](#scheduler) - [Scheduler](#scheduler)
- [Docker](#docker) - [Docker](#docker)
...@@ -24,10 +25,10 @@ Starting development of engine can be quite tedious, as it requires all most all ...@@ -24,10 +25,10 @@ Starting development of engine can be quite tedious, as it requires all most all
For example: For example:
- Steering, to get the main incredient of an play-out engine: schedules (or "timeslots" in Steering terms), - Steering, to get the main incredient of an play-out engine: schedules (or "timeslots" in Steering terms),
which hold the actual information on playlists and their entries. which hold the actual information on playlists and their entries.
- Dashboard, to have a neat interface, being able to programm the timeslots - Dashboard, to have a neat interface, being able to programm the timeslots
- Tank, to get the references to audio files and other audio sources. Plus the actual files. - Tank, to get the references to audio files and other audio sources. Plus the actual files.
If you need to test and develop against the Engine's API you'll also need to get the `engine-api` project running. If you need to test and develop against the Engine's API you'll also need to get the `engine-api` project running.
...@@ -44,6 +45,29 @@ There's a convenience script to start all of the three main dependencies (Steeri ...@@ -44,6 +45,29 @@ There's a convenience script to start all of the three main dependencies (Steeri
*...TBD...* *...TBD...*
## Running Engine for Development
Ensure you have following other projects up and running:
- steering
- tank
- dashboard
- engine-api
- engine-clock (optional)
Then you can start the engine. The following command includes the activation of your virtual environment, which you have created during the installation step (`source python/bin/activate`):
```shell
~/code/aura/engine$ ./run.sh dev
```
Now start Liquidsoap which is part of Engine Core:
```shell
~/code/aura/engine-core$ ./run.sh
```
## API ## API
You can find the AURA API definition here: https://gitlab.servus.at/autoradio/meta/blob/master/api-definition.md You can find the AURA API definition here: https://gitlab.servus.at/autoradio/meta/blob/master/api-definition.md
......
...@@ -7,6 +7,7 @@ docker="false" ...@@ -7,6 +7,7 @@ docker="false"
# #
# Call with one of these parameters: # Call with one of these parameters:
# #
# - dev
# - engine # - engine
# - test # - test
# - recreate-database # - recreate-database
...@@ -14,10 +15,10 @@ docker="false" ...@@ -14,10 +15,10 @@ docker="false"
# - docker:engine # - docker:engine
# - docker:build # - docker:build
# - docker:push # - docker:push
# #
if [[ $* =~ ^(engine|test|recreate-database)$ ]]; then if [[ $* =~ ^(dev|engine|test|recreate-database)$ ]]; then
mode=$1 mode=$1
fi fi
if [[ "$1" == *"docker:"* ]]; then if [[ "$1" == *"docker:"* ]]; then
...@@ -39,6 +40,14 @@ echo "[ Using $(python3 -V) ]" ...@@ -39,6 +40,14 @@ echo "[ Using $(python3 -V) ]"
if [[ $docker == "false" ]]; then if [[ $docker == "false" ]]; then
### Runs Engine in development mode (Virtualenv) ###
if [[ $mode == "dev" ]]; then
source python/bin/activate
echo "Running Engine in Python Environment ($(python3 -V))"
python run.py
fi
### Runs Engine ### ### Runs Engine ###
if [[ $mode == "engine" ]]; then if [[ $mode == "engine" ]]; then
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment