Next you can find some general Varnish Bans Manager (VBM) development tips. These are only useful for developers when setting up their development environment.
- Check out
setup.py
and install all required dependencies. Use
VARNISH_BANS_MANAGER_CONF
environment variable to point to your personal configuration file. Also remember to:- Set
development
totrue
in your personal configuration. Disable
http > daemon
in your personal configuration if developing using Gunicorn:$ python varnish_bans_manager/runner.py start
Use
--nothreading
if using Django embedded HTTP server:$ python varnish_bans_manager/runner.py runserver 0.0.0.0:9000 --nothreading
- Set
Install Sass and Compass in your development box (required by
django-mediagenerator
asset manager):$ sudo apt-get install rubygems $ sudo gem install sass compass
Don't forget to manually launch celeryd/celerybeat in some available term/screen while developing:
$ python varnish_bans_manager/runner.py celery worker --beat -s ~/varnish-bans-manager-celerybeat-schedule --loglevel=info
Remember to install the packages required by your relational database backend. For example, for MySQL:
$ pip install MySQL-python
- While developing, press
CTRL+ALT+A
in your browser to display the VBM debug console.
VBM sources require a build step previous to the generation of the Python source distribution package. During this phase SASS sources are compiled to CSS, some Javascript and CSS bundles are created, static contents are versioned, translation files are compiled, etc.
In order to execute this site building phase and then generate the Python source distribution package, simply run the following command in the root folder of the VBM sources:
$ make sdist
Note that the site building phase has some extra system requirements:
YUI Compressor and some Java Runtime Environment:
$ export YUICOMPRESSOR_PATH="/path/to/yuicompressor.jar" $ sudo apt-get install openjdk-7-jre
GNU internationalization utilities. In Ubuntu:
$ sudo apt-get install gettext
- Ban notifications.
- Bans & groups management.
- List of recent ban submissions.
- Access to current status of bans.
- Ban templates.
- Refactor
varnish_bans_manager.filesystem.models
.