This guide assumes that installation is carried out in /srv/flowspy directory. If other directory is to be used, please change the corresponding configuration files. It is also assumed that the root user will perform every action.
Upgrading from v<1.0.x
----------------------
If upgrading from flowspy version <1.0.x pay attention to settings.py changes. Also, do not forget to run::
./manage.py migrate
to catch-up with latest database changes.
Required system packages
------------------------
Update and install the required packages::
apt-get update
...
...
@@ -58,7 +64,6 @@ Get the required packages and install them
Application configuration
=========================
Copy settings.py.dist to settings.py::
cd flowspy
...
...
@@ -139,7 +144,6 @@ Now it is time to configure beanstalk, gunicorn, celery and apache.
beanstalkd
----------
Enable beanstalk by editting /etc/default/beanstalkd::
vim /etc/default/beanstalkd
...
...
@@ -152,8 +156,7 @@ Start beanstalkd::
gunicorn.d
----------
create and edit /etc/gunicorn.d/fod::
Create and edit /etc/gunicorn.d/fod::
vim /etc/gunicorn.d/fod
...
...
@@ -166,18 +169,177 @@ FoD is served via gunicorn and is then proxied by Apache. If the above directory
'--bind=127.0.0.1:8081',
'--workers=1',
'--worker-class=egg:gunicorn#gevent',
'--timeout=360',
'--timeout=30',
'--log-level=debug',
'--log-file=/tmp/fod.log',
'--log-file=/var/log/flowspy.log',
),
}
celery.d
--------
celeryd
-------
Celery is used over beanstalkd to apply firewall rules in a serial manner so that locks are avoided on the flowspec capable device. In our setup celery runs via django. That is why the python-django-celery package was installed.
Create the celeryd daemon at /etc/init.d/celeryd **if it does not already exist**::
Apache proxies gunicorn. Things are more flexible here as you may follow your own configuration and conventions. Create and edit /etc/apache2/sites-available/fod. You should set <server_name> and <admin_mail> along with your certificates. If under testing environment, you can use the provided snakeoil certs. If you do not intent to use Shibboleth delete or comment the corresponding configuration parts inside **Shibboleth configuration** ::
...
...
@@ -327,6 +488,16 @@ Restart, gunicorn and apache::
service gunicorn restart && service apache2 restart
Propagate the flatpages
=======================
Inside the initial_data/fixtures_manual.xml file we have placed 4 flatpages (2 for Greek, 2 for English) with Information and Terms of Service about the service.