Supported distributions
Installation and configuration
Debian installation script
Red Hat Enterprise Linux installation script
Supported distributions
Binary installation packages are available for the following Linux distributions:
- Fedora 16 and higher
FrePPLe is included in the official repositories.
- Red Hat Enterprise Linux 6
Starting from release 2.1 a 64-bit binary package can be downloaded. - Ubuntu 12 LTS
A 64-bit binary package is provided starting from release 2.1.
Other Linux distributions aren’t really a problem, but you’ll need to build the frePPLe package from the source code .deb or .rpm files, as described on the next page. The build process is completely standardized.
Installation and configuration
The binary package installs the solver engine executables as well as the user interface. The user interface is installed as a WSGI application deployed on the Apache web server with the mod_wsgi module.
Here are the steps to get a fully working environment.
- Install the database
PostgreSQL is the preferred database for frePPLe.
It’s recommended to use UTF-8 as the encoding of the database.
For optimal performance 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 most important parameter is “shared_buffers” (which normally requires changing the Linux kernel parameter shmmax as well).
For the user that will run the user interface application (normally “www-data” on debian and “apache” on rhel) you need to create a file .pgpass in their home directory. This allows them to connect without entering a password.
See the Django documentation at http://docs.djangoproject.com/en/dev/ref/databases/ for more details.
This step can be skipped if you want to use SQLite as the database. - Create the database and database user
A database needs to be created for the default schema, and one for each of the what-if scenarios you want to configure.
A single database user can be used as the owner of these schemas.
This step can be skipped if you want to use SQLite as the database. - Install the Python database drivers
You’ll need to install the python-psycopg2 package for PostgreSQL.
Oracle requires the cx_oracle package, while MySQL requires python-mysql.
This step can be skipped if you want to use SQLite as the database. - Install Django
Since frePPle requires some patches to the standard Django package, you can’t install the binary package that comes with your Linux distribution.
Instead, download the source from http://www.djangoproject.com and expand it in a local folder.
Next, apply the patch found here and install the package.
The shell commands for these steps are:wget https://www.djangoproject.com/download/1.6/tarball/ tar xvfz Django-1.6.tar.gz cd Django-1.6 patch -p0 < frepple_directory/contrib/django/django.patch python setup.py install
- Install OpenPyXL
This python package allows us to read and write Excel spreadsheet files. It is best to install it from PyPi using pip.pip install openpyxl
Most linux distributions don’t install pip by default, so you’ll need to install that first. See below for the commands for this on Ubuntu and RHEL.
- Install the frepple binary package
On fedora:yum install frepple
On Ubuntu: Download the binary deb file and use the following command.
dpkg -i frepple_*.deb apt-get -f -y -q install
On RHEL: Download the binary RPM file and use the following command.
yum --nogpgcheck localinstall *.rpm
- Configure frePPLe
The previous step installed a number of configuration files, which you now need to review and edit:- /etc/frepple/djangosettings.py
Edit the “DATABASES” with your database parameters.
Change “SECRET_KEY” to some arbitrary value – important for security reasons.
- /etc/frepple/djangosettings.py
- /usr/share/frepple/license.xml
The installation provides a license file for the community edition. - /usr/share/frepple/init.xml
Comment out the lines loading modules you are not using. - /etc/httpd/conf.d/z_frepple.conf
For a standard deployment this file doesn’t need modification.
It only needs review if you have specific requirements for the setup of the Apache web server. - Create the database schema
Your database schema is still empty till now. The command below will create all objects in the database schema and load an initial demo dataset.frepplectl syncdb
- Verify the installation
If all went well you can now point your browser to http://localhost and use frePPLe.
Three default logins are created: “admin”, “frepple” and “guest”. The password is identical to the user name.
For security reasons it is recommended you remove this default accounts in actual production environments.
Try the following as a mini-test of the installation:
- Open the screen “input/demand” to see demand inputs.
- Open the screen “admin/execute” and generate a plan.
- Use the same “admin/execute” screen to copy the default data in a new scenario.
- Open the screen “output/resource report” to see the planned load on the resources.
If these steps all give the expected results, you’re up and running!
If you are using the enterprise edition, replace this file with the license file you received from us.
Debian installation script
This section shows the completely automated installation script for installing and configuring frePPLe with a PostgreSQL database on a Debian server.
We use this script for our unit tests. You can use it as a guideline for your own disaster recovery scripts.
# Bring the server up to date with the latest and greatest sudo apt-get -y -q update sudo apt-get -y -q upgrade # Install PostgreSQL sudo apt-get -y install postgresql-9.1 python-psycopg2 sudo su - postgres psql template1 -c "create user frepple with password 'frepple'" psql template1 -c "create database frepple" psql template1 -c "grant all privileges on database frepple to frepple" psql template1 -c "create database scenario1" psql template1 -c "grant all privileges on database scenario1 to frepple" psql template1 -c "create database scenario2" psql template1 -c "grant all privileges on database scenario2 to frepple" psql template1 -c "create database scenario3" psql template1 -c "grant all privileges on database scenario3 to frepple" sed -i 's/peer$/md5/g' /etc/postgresql/9.1/main/pg_hba.conf service postgresql restart exit # Install Django wget -q -O Django-$DJANGORELEASE.tar.gz https://www.djangoproject.com/download/$DJANGORELEASE/tarball/ tar xfz Django-$DJANGORELEASE.tar.gz cd ~/Django-$DJANGORELEASE patch -p0 < frepple_directory/contrib/django/django.patch sudo python setup.py install # Install openpyxl sudo apt-get -y install python-pip sudo pip install openpyxl # Install frePPLe binary .deb package # This also installs the necessary dependencies cd ~ sudo dpkg -i frepple_*.deb sudo apt-get -f -y -q install # Configure frepple sudo sed -i "s/django.db.backends.sqlite3',$/django.db.backends.postgresql_psycopg2',/g" /etc/frepple/djangosettings.py # Configure apache web server sudo a2enmod expires sudo a2enmod wsgi sudo a2enmod ssl sudo a2ensite default-ssl sudo a2ensite frepple sudo service apache2 restart # Create frepple database schema frepplectl syncdb --noinput # Make postgresql accessible for apache user without password sudo sh -c 'echo "localhost:5432:frepple:frepple:frepple" > ~www-data/.pgpass' sudo sh -c 'echo "localhost:5432:scenario1:frepple:frepple" >> ~www-data/.pgpass' sudo sh -c 'echo "localhost:5432:scenario2:frepple:frepple" >> ~www-data/.pgpass' sudo sh -c 'echo "localhost:5432:scenario3:frepple:frepple" >> ~www-data/.pgpass' sudo chown www-data:www-data ~www-data/.pgpass sudo chmod 0600 ~www-data/.pgpass
Red Hat Enterprise Linux installation script
This section shows the completely automated installation script for installing and configuring frePPLe with a PostgreSQL database on a RHEL 6 server.
We use this script for our unit tests. You can use it as a guideline for your own disaster recovery scripts.
# Update and upgrade sudo -S -n yum -y update # Install the PostgreSQL database sudo yum install postgresql postgresql-server python-psycopg2 sudo service postgresql initdb sudo service postgresql start sudo su - postgres psql -dpostgres -c "create user frepple with password 'frepple'" psql -dpostgres -c "create database frepple" psql -dpostgres -c "grant all privileges on database frepple to frepple" psql -dpostgres -c "create database scenario1" psql -dpostgres -c "grant all privileges on database scenario1 to frepple" psql -dpostgres -c "create database scenario2" psql -dpostgres -c "grant all privileges on database scenario2 to frepple" psql -dpostgres -c "create database scenario3" psql -dpostgres -c "grant all privileges on database scenario3 to frepple" sed -i 's/peer$/md5/g' /var/lib/pgsql/data/pg_hba.conf # Install django wget -q -O Django-$DJANGORELEASE.tar.gz https://www.djangoproject.com/download/$DJANGORELEASE/tarball/ tar xfz Django-$DJANGORELEASE.tar.gz cd ~/Django-$DJANGORELEASE patch -p0 < ~/frepple-$RELEASE/contrib/django/django.patch sudo -S -n python setup.py install # Install openpyxl # The sequence is a bit weird: we first enable the EPEL repository, then install pip, and # finish by installing openpyxl itself. sudo -S -n rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm sudo -S -n yum -y install yum-plugin-protectbase.noarch sudo -S -n yum -y install python-pip sudo pip install openpyxl # Build frepple RPM yum --nogpgcheck localinstall *.rpm # Make PostgreSQL accessible for apache user sudo sh –c ‘echo “localhost:5432:frepple:frepple:frepple” > ~apache/.pgpass’ sudo sh –c ‘echo “localhost:5432:scenario1:frepple:frepple” >> ~apache/.pgpass’ sudo sh –c ‘echo “localhost:5432:scenario2:frepple:frepple” >> ~apache/.pgpass’ sudo sh –c ‘echo “localhost:5432:scenario3:frepple:frepple” >> ~apache/.pgpass’ sudo chown apache:apache ~apache/.pgpass sudo chmod 0600 ~apache/.pgpass