Skip to content
Snippets Groups Projects
Commit ac2f4dff authored by David Trattnig's avatar David Trattnig
Browse files

Extended docs. #21

parent 470a59ff
No related branches found
No related tags found
No related merge requests found
......@@ -6,10 +6,10 @@ This page gives insights on extending Aura Engine internals or through the API.
- [Aura Engine Development Guide](#aura-engine-development-guide)
- [AURA Componentes](#aura-componentes)
- [Engine Components](#engine-components)
- [Engine Components](#engine-components)
- [API](#api)
- [Engine Startup Phases](#engine-startup-phases)
- [More infos for debugging](#more-infos-for-debugging)
- [Default ports used by Engine](#default-ports-used-by-engine)
- [Debugging Liquidsoap](#debugging-liquidsoap)
- [Tips on configuring the audo interface](#tips-on-configuring-the-audo-interface)
- [Read more](#read-more)
......@@ -43,7 +43,7 @@ There's a convenience script to start all of the three main dependencies (Steeri
~/code/aura/meta$ ./run.sh aura local
```
### Engine Components
## Engine Components
**engine-core.py**: It is the server which is connected to the external programme source (e.g. aura steering and tank), to liquidsoap and is listening for redis pubsub messages. This precious little server is telling liquidsoap what to play and when.
......@@ -56,19 +56,17 @@ You can find the AURA API definition here: https://gitlab.servus.at/autoradio/me
OpenAPI definition for Engine API: https://app.swaggerhub.com/apis/AURA-Engine/engine-api/
## Engine Startup Phases
## More infos for debugging
### Default ports used by Engine
Aura Engine requires a number of ports for internal and external communication.
When you start Engine the following is happening:
Those are the default port numbers:
* `1234` ... Liquidsoap Telnet Server
* `8008` ... Exposes the Engine API
* `5000` ... Svelte development mode; dynamically uses some other port if occupied
1. Python `engine-core.py`: Initializes `modules/core/engine.py` (The virtual mixer; class for remote-controlling Liquidsoap), Scheduler and the Redis Server
2. Python `engine-core.py`: Start Liquidsoap.
3. Liquidsoap: When Liquidsoap finished its startup, it creates a socket file as configured in `socketdir` of `engine.ini`.
4. Python `modules/core/liquidsoap/client.py`: Connects to that socket file.
5. Python `modules/schedulung/scheduler.py`: Continously loads schedules from the API endpoints, stores them in the local database and starts the playout as per the schedules.
## More infos for debugging
### Debugging Liquidsoap
......
......@@ -224,7 +224,38 @@ For this you can utilize either [Systemd](https://systemd.io/) or [Supervisor](h
### Running with Systemd
-- TO BE ADDED --
Copy the unit file `/opt/aura/engine/configuration/systemd/aura-engine.service` to `/etc/systemd/system/`.
This unit file starts engine-core and engine-liquidsoap within one command. Here Liquidsoap is started as
as subprocess.
```shell
sudo systemctl daemon-reload
```
**Start**
```shell
sudo systemctl start aura-engine
```
**Stop**
```shell
sudo systemctl start aura-engine
```
**Restart**
```shell
sudo systemctl restart aura-engine
```
**Status**
```shell
sudo systemctl status aura-engine
```
### Running with Supervisor
......@@ -290,13 +321,6 @@ to pickup the correct `supervisord.conf`.
supervisorctl restart <service-name>
```
**Start the API service with Supervisor**
```shell
sudo supervisorctl update
sudo supervisorctl restart engine-api
```
In case you want to reload whole supervisor service
```shell
......@@ -311,13 +335,10 @@ All Engine logs for production can be found under:
`/var/log/aura`
```
This includes individual logs from Engine Core, Liquidsoap and the API.
But also `stdout` outputs from supervisor services are written there.
and
Additionally you'll finde Supervisor specific logs under:
```
`/var/log/supervisor`
```shell
`/opt/aura/engine/logs`
```
## Read more
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment