Plugins on compute servers using Celery


These scripts are used to start plugins remotely on compute servers using the Celery task queue. Starting a plugin on a server is just as easy as starting it locally. Both the Redis backend and the AMQP backend for Celery are supported, Redis is recommended.

How to use

First you need a broker. If you use only one compute server, this will usually be the same machine. Install either Redis or RabbitMQ (installing Redis on Debian/Ubuntu is just apt-get install redis-server) and Celery (pip install celery[redis]). Extract celeryconfig.py, celeryplugin.py to a directory and start Celery in that directory: celery -A celeryplugin worker -Ofair

On the client (where you use Spyke Viewer), extract celery_start.py and celeryconfig.py into the same directory and set your remote script in Spyke Viewer to celery_start.py. Modify celeryconfig.py so that BROKER_URL and CELERY_RESULT_BACKEND point to your server. Now when you start a plugin remotely in Spyke Viewer, it will be run on your compute server! You can queue up as many plugins as you want, Celery will execute as many in parallel as you have cores. See the Celery documentation for more configuration options.

To manage your remotely running plugins, put celery_monitor.py into one of your plugin directories. It contains a Spyke Viewer plugin but can also be used a standalone script.

All files

VersionViewer versionUpload dateSize
0.1 0.4.1 April 8, 2014 10.6 KB

Comments

New comment

Please log in to leave a comment.

Author: Robert Pröpper

Download most recent version: 0.1

License: BSD