Various scripts / tools which are related to Knossos but belong on a server, not on the client.
To run these scripts you'll need the following:
- Python 3
- Six
- 7zip (IMPORTANT: This script needs the full implementation, i.e.
p7zip-full
andp7zip-rar
on Ubuntu) - semantic_version
- Redis
The following commands should install everything you need:
- Ubuntu:
apt-get install python3 python3-six p7zip-full p7zip-rar
- Arch Linux:
pacman -S python python-six p7zip
- Install the dependencies listed in
requirements.txt
(pip install -r requirements.txt
). - Copy
conf/settings.py.dist
toconf/settings.py
and change it to fit your environment.
If you're developing or want to get the server running quickly, you can run the launch.sh
script.
The server consists of three components:
-
server.py
: This is a normal WSGI application which can run on a WSGI server (mod_wsgi, uwsgi, gunicorn, etc.) it servers all regular HTTP requests and is implemented using Flask. You can also run the script directly to launch it without a WSGI server. -
websocket_server.py
: This part is implemented using Tornado and handles all WebSocket requests. IMPORTANT: At any point in time there should only be one process running this script. -
worker.py
: This part does most of the actual work. You can run as many instances of this as you want. It doesn't listen as a server but connects to Redis.
All three components communicate over Redis. server.py
and websocket_server.py
should be reachable over the same domain and port.
One possible setup is to run uwsgi with the provided config in conf/app.ini
which will properly distribute the requests.
You should run the cron.py
script about once per day, it removes old / unused data from the Redis store.
Licensed under the Apache License, Version 2.0. The third party code contained in third_party and static is licensed under the MIT License. The relevant files are marked accordingly.