diff --git a/docs/installation-production.md b/docs/installation-production.md index 86a5651e2af15c3bd23aa745baed121cc75cc0ab..fd317fa42227da674dda038796049768af563bdf 100644 --- a/docs/installation-production.md +++ b/docs/installation-production.md @@ -8,7 +8,7 @@ - [Configuration](#configuration) - [Running Engine](#running-engine) - [Running with Systemd](#running-with-systemd) - - [Combined Unit for Engine Core and Liquidsoap](#combined-unit-for-engine-core-and-liquidsoap) + - [Run the Engine with a single command](#run-the-engine-with-a-single-command) - [Individual Units for Engine Core and Liquidsoap](#individual-units-for-engine-core-and-liquidsoap) - [Running with Supervisor](#running-with-supervisor) - [Logging](#logging) @@ -149,7 +149,7 @@ In your production environment edit following file to configure the engine: engineuser:/opt/aura/engine$ nano /etc/aura/engine.ini ``` -Now, specify at least following settings to get started: +Now, specify at least the following settings to get started: ```ini [database] @@ -158,7 +158,7 @@ Now, specify at least following settings to get started: db_pass="---SECRET--PASSWORD---" ``` -Set the URLs to the *Steering*, *Tank* and *Engine* API: +Define the API URLs to the *Steering*, *Tank* and *Engine API*: ```ini [api] @@ -225,54 +225,41 @@ For this you can utilize either [Systemd](https://systemd.io/) or [Supervisor](h ### Running with Systemd - -#### Combined Unit for Engine Core and Liquidsoap - -Copy the unit file `/opt/aura/engine/config/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. For more fine-grained control the units in the next section are recommended instead. - -Now you'll need to reload the Systemd unit files +Copy the unit files in `/opt/aura/engine/config/systemd/aura-engine.service` to your systemd unit directory, +and reload the systemd daemon: ```shell -sudo systemctl daemon-reload +cp /opt/aura/engine/config/systemd/* /etc/systemd/system/ +systemctl daemon-reload ``` -**Start** - -```shell -sudo systemctl start aura-engine -``` +#### Run the Engine with a single command -**Stop** - -```shell -sudo systemctl start aura-engine -``` +This unit file starts engine-core and engine-liquidsoap within one command. Here Liquidsoap is started as +as subprocess. For more fine-grained control the units in the next section are recommended instead. -**Restart** +The most common way to start the engine is using the combined command which starts Liquidsoap (`aura-engine-lqs`) +and the Engine Core: ```shell -sudo systemctl restart aura-engine +systemctl start aura-engine ``` -**Status** +Now you are able to stop and restart the scheduler without affecting the playout of Liquidsoap. Note, Liquidsoap +will play as long it has already scheduled data for the current timeslot. If it doesn't it will still the defined +station fallback scenario. ```shell -sudo systemctl status aura-engine +systemctl restart aura-engine +systemctl stop aura-engine +systemctl status aura-engine ``` #### Individual Units for Engine Core and Liquidsoap -Copy the unit files `/opt/aura/engine/config/systemd/aura-engine-lqs.service` and -`/opt/aura/engine/config/systemd/aura-engine-core.service` to `/etc/systemd/system/`. - -Now you'll need to reload the Systemd unit files - -```shell -sudo systemctl daemon-reload -``` +If you prefer to start both Engine components individually you can use the units `aura-engine-core` and +`aura-engine-lqs`. But keep in mind there is no dependency between those units. If you start Engine Core +the Liquidsoap part will not be started by itself and vice versa. **Start Liquidsoap and check its status** @@ -294,7 +281,6 @@ sudo systemctl status aura-engine-core sudo journalctl -f ``` - ### Running with Supervisor Now, given you are in the engine's home directory `/opt/aura/engine/`, simply type following to start @@ -307,7 +293,7 @@ supervisord This picks up the supervisor configuration provided in the local `supervisord.conf` and the service configurations located in `config/supervisor/*.conf`. -Experience has shown it might be helpful to reload the supervisor configuration using `sudo`: +Then you'll need to reload the supervisor configuration using `sudo`: ```shell sudo supervisorctl reload @@ -326,7 +312,7 @@ You should get these all services with their actual state listed: ```c++ aura-engine in use auto 666:666 -aura-engine-api in use auto 999:999 +aura-engine-lqs in use auto 999:999 ``` **Maintanence using Supervisor** @@ -334,32 +320,15 @@ aura-engine-api in use auto 999:999 Please remember to call all `supervisorctl` commands from within your engine home directory (`/opt/aura/engine/`), to pickup the correct `supervisord.conf`. -**Starting Services** +**Starting, stopping and restarting a service** ```shell supervisorctl start <service-name> -``` - -**Stopping Services** - -```shell supervisorctl stop <service-name> - -``` - -**Restarting Services** - -```shell - supervisorctl restart <service-name> -``` - -**Refresh after changing configurations** - -```shell supervisorctl restart <service-name> ``` -In case you want to reload whole supervisor service +**Reloading the whole supervisor service** ```shell sudo service supervisor restart