From 5da5e41701d60faaa60101249b93e8a330fc9b00 Mon Sep 17 00:00:00 2001 From: bkfox Date: Tue, 13 Dec 2016 21:15:45 +0100 Subject: [PATCH] rename controllers to streamer; update and fix requirements; update doc --- README.md | 25 +++++++++++++++++++------ requirements.txt | 8 ++++---- scripts/supervisord_aircox | 6 +++--- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 278563d..2beaddf 100755 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ and `gunicorn` in mind. ## Installation +Later we plan to have an installation script to reduce the number of above steps. + ### Dependencies Python modules: * `django-taggits`: `aircox.programs`, `aircox.cms` @@ -53,8 +55,23 @@ External applications: * `liquidsoap`: `aircox` (generation of the audio streams) * `sox`: `aircox` (check sounds quality and metadatas) * note there might be external dependencies for python's Pillow too -* sqlite, mysql or any database library that you need to run a database, that is supported by python +* sqlite, mysql or any database library that you need to run a database, that is supported by Django (+ eventual python deps) +### Setup environment +All scripts and files assumes that: +- you have cloned aircox in `/srv/apps/` (such as `/srv/apps/aircox/README.md`) +- you have a supervisor running (we have scripts for `supervisord`) +- you want to use `gunicorn` as WSGI server (otherwise, you'll need to remove it from the requirement list) + +This installation process uses a virtualenv, including all provided scripts. + +``` +# setup virtual env and activate +virtualenv venv +source venv/bin/activate +# install requirements +pip install -r requirements.txt +``` ### Configuration You must write a settings.py file in the `instance` directory (you can just @@ -110,16 +127,12 @@ TODO: cms related documentation here Once the configuration is okay, you must start the *controllers monitor*, that creates configuration file for the audio streams using the new information -and that run the appropriate application (note that you dont need to restart it +and that runs the appropriate application (note that you dont need to restart it after adding a program that is based on schedules). If you use supervisord and our script with it, you can use the services defined in it instead of running commands manually. - -Note: later we want to provide an installation script in order to make your life easy. - ## More informations There are extra informations in `aircox/README.md` and `aircox_cms/README.md` files. - diff --git a/requirements.txt b/requirements.txt index cbf7e3b..50e7ff0 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,15 @@ +gunicorn>=19.6.0 Django>=1.10.3 django-taggit>=0.18.3 -mutagen=1.35.1 +mutagen==1.35.1 watchdog>=0.8.3 dateutils>=0.6.6 bleach>=1.4.3 django-htmlmin>=0.10.0 wagtail>=1.5.3 -django-overextend>=0.4.2 +django-overextends>=0.4.2 Pillow>=3.3.0 -django-modelcluster=2.0 +django-modelcluster==2.0 django-honeypot>=0.5.0 django-jet>=1.0.3 - diff --git a/scripts/supervisord_aircox b/scripts/supervisord_aircox index f172f92..acf4ea0 100755 --- a/scripts/supervisord_aircox +++ b/scripts/supervisord_aircox @@ -33,13 +33,13 @@ stdout_logfile = /srv/apps/aircox/logs/sounds_monitor.log redirect_stderr = true environment=AIRCOX_DEBUG="False",PATH="/srv/apps/aircox/venv/bin" -[program:aircox_controllers] -command = /srv/apps/aircox/manage.py controllers -crm +[program:aircox_streamer] +command = /srv/apps/aircox/manage.py streamer -crm directory = /srv/apps/aircox user = aircox autostart = true autorestart = true -stdout_logfile = /srv/apps/aircox/logs/controllers.log +stdout_logfile = /srv/apps/aircox/logs/streamer.log redirect_stderr = true environment=AIRCOX_DEBUG="False",PATH="/srv/apps/aircox/venv/bin"