frePPLev2.0
open source Production PLanning
  • Home
  • Documentation
    • Getting started
    • Modeling guide
    • User guide
    • Installation guide
    • Developer guide
    • FAQ
  • C++ API

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 variablemax_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
    • Getting started
    • Modeling guide
      • Simplified domain model
      • Detailed domain model
      • Environment variables
      • Python interpreter
      • Global parameters
      • Buffer
      • Calendar
      • Customer
      • Demand
      • Flow
      • Item
      • Load
      • Location
      • Operation
      • Suboperation
      • Operationplan
      • Problem
      • Resource
      • SetupMatrix
      • Skill
      • Resource skill
      • Solver
      • Extension modules
        • Forecast module
        • REST web service module
        • Linear programming solver module
        • OpenERP connector module
    • User guide
      • Main features
      • Supported browsers
      • Getting around
        • Logging in
        • Logging out
        • Changing password
        • Navigation
          • Menu bar
          • Jump search
          • Context menus
          • Browser bookmarks
        • Filtering data
        • Sorting data
        • Selecting time buckets
        • Exporting data
        • Importing data
        • User preferences
        • User permissions and roles
      • Screens
        • Data input
        • Supply Path / Where Used
        • Comments
        • History – Audit trail
        • Plan analysis
          • Problem report
          • Constraint report
          • Inventory report
          • Inventory detail report
          • Resource report
          • Resource Gantt report
          • Resource detail report
          • Operation report
          • Operation detail report
          • Demand report
          • Demand detail report
          • Demand Gantt report
          • Forecast report
          • Performance indicator report
        • Execute
      • Batch commands
        • manage.py (manage.exe on Windows)
        • frepple (frepple.exe on Windows)
        • freppleservice.exe (Windows only)
    • Installation guide
      • Windows installer
      • Compiling on Windows
      • Linux binary packages
      • Compiling on Linux
      • Compiling on debian-based linux
      • Compiling on Red Hat based Linux
      • Compiling from the subversion source code repository
      • Running the VMWare virtual machine
      • Other platforms
      • Configuring the user interface
      • Configuring multiple models in the user interface
      • Configuring as a Python extension module
    • FAQ
    • Developer guide
      • Code structure
      • Class diagram
      • Solver
        • Solver features
        • Planning algorithm
          • Top level loop
          • Demand solver
          • Buffer solver
          • Flow solver
          • Load solver
          • Operation solver
          • Resource solver
        • Cluster and level algorithm
      • Extension modules
      • Version control
      • Style guide
      • Portability
      • Security
      • Internationalization
      • Translating the user interface
      • Adding or customizing a report
      • Unit tests
        • buffer_procure_1
        • calendar
        • callback
        • cluster
        • constraints_combined_1
        • constraints_combined_2
        • constraints_leadtime_1
        • constraints_material_1
        • constraints_material_2
        • constraints_material_3
        • constraints_material_4
        • constraints_resource_1
        • constraints_resource_2
        • constraints_resource_3
        • constraints_resource_4
        • constraints_resource_5
        • datetime
        • deletion
        • demand_policy
        • flow_alternate_1
        • flow_alternate_2
        • flow_effective
        • forecast_1
        • forecast_2
        • forecast_3
        • forecast_4
        • forecast_5
        • forecast_6
        • jobshop
        • load_alternate
        • load_effective
        • lpsolver_1
        • multithreading
        • name
        • operation_alternate
        • operation_available
        • operation_effective
        • operation_pre_post
        • operation_routing
        • pegging
        • problems
        • python_1
        • python_2
        • python_3
        • safety_stock
        • sample_module
        • scalability_1
        • scalability_2
        • scalability_3
        • setup_1
        • setup_2
        • skill
        • xml
        • xml_remote
    • License
      • GNU Affero General Public License
      • GNU Free Documentation License
    • Third party add-ons
  • Copyright © 2010-2013 frePPLe bvba