Main > Reference Manual > Download and install > Configuring the user interface

The previous sections discussed the installation and compilation of the core planning engine.
In this section the configuration of the user interface is described. We'll only cover the recommended setup for a production environment: using Apache web server and mod_wsgi.

See this page for alternative deployment configurations. These alternatives allow you to be up and running quicker, but the setup will be less scalable.

The Django web application framework

  • Install Python
    FrePPLe works with Python versions 2.5 to 2.7. Python 3.x is not supported.
  • Install Django
    Since frePPle requires some patches to the standard Django package, it is recommended NOT to install it as a binary package that comes with your Linux distribution. Instead download the source from https://www.djangoproject.com/download/ and expand it in a local folder.
  • Apply patches to Django
    Update you django directory with the following command:
    patch -p0 < frepple_directory/contrib/django/django.patch

The database

You know how do this, isn't it? If not, search Google.

  • Install the database
    It's recommended to set up your database with full support for UTF-8.
    Below are some database specific notes.
    • MySQL
      See the Django documentation at http://docs.djangoproject.com/en/dev/ref/databases/
      It is highly recommended to use the InnoDB storage engine, for its support of transactions.
      When the frePPLe exports planning results to the database, the setting of the variable max_allowed_packet is important: depending on the model size use a setting of 50M or higher.
      Also make sure the SQL_MODE setting includes "PIPES_AS_CONCAT".
      For optimum performance of the user interface the default memory allocation parameters will need to be increased from their defaults. The appropriate settings depend on the model size, the number of concurrent users and the available memory on the server. The following parameters are of paritcular interest: innodb_buffer_pool_size and query_cache_size.
    • PostgreSQL
      See the Django documentation at http://docs.djangoproject.com/en/dev/ref/databases/
    • Oracle
      See the Django documentation at http://docs.djangoproject.com/en/dev/ref/databases/
  • Install the Python database drivers
    You'll need cx_oracle for an Oracle database, psycopg2 for PostgreSQL or mysql-python for MySQL.
  • Create the database user(s)

The web server

See https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ for a detailed explanation of Django deployment using Apache and mod_wsgi.
For most frePPLe implementations, the Apache web server for the Django application should also be used to serve the static pages - no need to set up a seperate instance or a different web server.

  • Install the Apache web server
  • Install the mod_wsgi Apache module
    It can be downloaded from http://code.google.com/p/modwsgi/. On most Linux systems it'll also be available as a binary package.
  • Collect all static content
    All static pages are served directly by the web server for best performance and security.
    The following command will collect all static files for the frePPLe web application in a folder defined by the setting STATIC_ROOT (by default it points to the folder contrib/django/freppledb/static):
    ./manage.py collectstatic
  • Configure the Apache web server
    See the sample contrib/django/httpd.conf and contrib/django/freppledb/wsgi.py configuration files.
    Both files require updating for your particular setup: folders names vary, port numbers can be different, security requirements may vary, settings may depend on the expected number of users, etc.

The frePPLe web application

  • Update the settings.py configuration file
    Update the database connection parameters, switch off debugging, specify the administrator email, ...
  • Create the database schema
    In the directory contrib/django issue the following command. It will create all objects in the database schema and load an initial demo dataset.
    ./manage.py syncdb