Python HTML JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
production-files
static Dump Celery as job queue manager, use atd instead Dec 22, 2016
templates Dump link to Celery Dec 22, 2016
LICENSE Added LICENSE Jul 2, 2014
README.md README changes to reflect Debian changes Jan 19, 2018
mail_log.py
medusa.py Dump Celery as job queue manager, use atd instead Dec 22, 2016
medusa.wsgi
requirements.txt Dump Celery as job queue manager, use atd instead Dec 22, 2016
settings.py Dump Celery as job queue manager, use atd instead Dec 22, 2016
store.py Dump Celery as job queue manager, use atd instead Dec 22, 2016
tasks.py Dump Celery as job queue manager, use atd instead Dec 22, 2016
utils.py Run medusa properly Jun 29, 2014

README.md

Medusa-webapp

Scaffold the contigs!

Test the server

Please make sure that redis is up and running. Also, put in the "static" directory a 3.x version of bootstrap and jquery.min.js in the static/js directory. Create a directory called medusa-app, with the medusa.jar file and the medusa_scripts folder inside. Also, make sure that you have the atd deamon running (used for job queue handling)

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python medusa.py

That's it! Open a browser on the same machine and got to 127.0.0.1:5000

Production

First, install all the dependencies

sudo pip install -r requirements.txt

Then install in apache the medusa.conf file (changing the paths). NOTE: if you have multiplt webservers running, the best way to have them running at the same time seems to include all the WSGI definitions in the same VirtualHost.

Create a production.py file which can then be used to override the settings.py debug options.

You may want to tweak the atd deamon parameters to change the load and delay scheduling (tested on Debian 3.16)

sudo vim /lib/systemd/system/atd.service

And then introduce the following edits:

[Service]
ExecStart=
ExecStart=/usr/sbin/atd -f -l LOAD -b 1

Where LOAD is your desired load threshold to start new jobs

Reload the configuration and restart the service:

sudo systemctl daemon-reload
sudo systemctl restart atd
sudo systemctl status atd

Restart apache and start redis.

To update the server once the upstream repository has been updated, just run git pull and the restart apache.

Edit the mail_log.py file to setup the error logging through email.

You may also want to set up a cron job to wipe out the uploads directly every now and then