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. ...@@ -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 Engine Development Guide](#aura-engine-development-guide)
- [AURA Componentes](#aura-componentes) - [AURA Componentes](#aura-componentes)
- [Engine Components](#engine-components) - [Engine Components](#engine-components)
- [API](#api) - [API](#api)
- [Engine Startup Phases](#engine-startup-phases)
- [More infos for debugging](#more-infos-for-debugging) - [More infos for debugging](#more-infos-for-debugging)
- [Default ports used by Engine](#default-ports-used-by-engine)
- [Debugging Liquidsoap](#debugging-liquidsoap) - [Debugging Liquidsoap](#debugging-liquidsoap)
- [Tips on configuring the audo interface](#tips-on-configuring-the-audo-interface) - [Tips on configuring the audo interface](#tips-on-configuring-the-audo-interface)
- [Read more](#read-more) - [Read more](#read-more)
...@@ -43,7 +43,7 @@ There's a convenience script to start all of the three main dependencies (Steeri ...@@ -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 ~/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. **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 ...@@ -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/ OpenAPI definition for Engine API: https://app.swaggerhub.com/apis/AURA-Engine/engine-api/
## Engine Startup Phases
## More infos for debugging When you start Engine the following is happening:
### Default ports used by Engine
Aura Engine requires a number of ports for internal and external communication.
Those are the default port numbers: 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.
* `1234` ... Liquidsoap Telnet Server 3. Liquidsoap: When Liquidsoap finished its startup, it creates a socket file as configured in `socketdir` of `engine.ini`.
* `8008` ... Exposes the Engine API 4. Python `modules/core/liquidsoap/client.py`: Connects to that socket file.
* `5000` ... Svelte development mode; dynamically uses some other port if occupied 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 ### Debugging Liquidsoap
......
...@@ -224,7 +224,38 @@ For this you can utilize either [Systemd](https://systemd.io/) or [Supervisor](h ...@@ -224,7 +224,38 @@ For this you can utilize either [Systemd](https://systemd.io/) or [Supervisor](h
### Running with Systemd ### 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 ### Running with Supervisor
...@@ -290,13 +321,6 @@ to pickup the correct `supervisord.conf`. ...@@ -290,13 +321,6 @@ to pickup the correct `supervisord.conf`.
supervisorctl restart <service-name> 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 In case you want to reload whole supervisor service
```shell ```shell
...@@ -311,13 +335,10 @@ All Engine logs for production can be found under: ...@@ -311,13 +335,10 @@ All Engine logs for production can be found under:
`/var/log/aura` `/var/log/aura`
``` ```
This includes individual logs from Engine Core, Liquidsoap and the API. and
But also `stdout` outputs from supervisor services are written there.
Additionally you'll finde Supervisor specific logs under: ```shell
`/opt/aura/engine/logs`
```
`/var/log/supervisor`
``` ```
## Read more ## 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