Installation

Installation in a production environment is similar to the process needed for setting up a development environment, just using postgres for the db and apache httpd with mod_wsgi for the application serving instead of the workzeug dev server.

To make the documentation less complicated, it is assumed that you will be using the ‘blockerbugs’ user for the database and wsgi user. If you end up using a different user, please alter the commands appropriately.

Note

These instructions assume that you have already done basic setup like opening any appropriate firewall ports.already have postgresql-server installed, initialized and running as a service.

Installing Packages

Install the required packages:

sudo yum install mod_wsgi python-virtualenv postgresql-server gcc

Setting up the Database

Run the initial postgres initialization:

sudo postgresql-setup initdb

Start and enable the postgres service:

sudo service postgresql start
sudo chkconfig enable postgresql

Start and enable the postgres service:

sudo service postgresql start
sudo chkconfig enable postgresql

Start and enable the postgres service:

sudo service postgresql start
sudo chkconfig enable postgresql

Note

This isn’t fully finished yet, it is assumed that you know how to setup postgres.

Create a posgres role for the blocker db. The -W flag forces the creation of a password for the role:

createuser -W blockerbugs

Create a new database with the blockerbugs role as owner:

createdb -O blockerbugs blockerbugs

Creating and Populating a Virtualenv

The easiest way to host the blocker tracking app is to create a virtualenv for it to live in.

Note

These instructions assume that you will be installing a virtualenv in /var/www/blockerbugs. If you decide to install elsewhere, you will need to modify the instructions here and the apache configuration files distributed.

Create a directory for the blocker tracker to live in:

sudo mkdir /var/www/blockerbugs

Copy the wsgi file:

sudo cp conf/blockerbugs.wsgi /var/www/blockerbugs/.

Create the virtualenv for the tracker app:

sudo virtualenv --distribute /var/www/blockerbugs/env

Activate the virtualenv and install all of the required deps:

sudo source /var/www/blockerbugs/env/bin/activate
sudo pip install paver kitchen
sudo pip -R requirements.txt

Without deactivating the virtualenv, install the blocker tracking app into the virtualenv:

sudo python setup.py install

Deactivate the virtualenv and fix permissions on the isntall directory:

sudo chown -R blockerbugs.apache /var/www/blockerbugs

Configuring httpd

Copy the blocker tracker’s apache conf file to /etc/httpd/conf.d:

cp conf/blockerbugs.conf /etc/httpd/conf.d/.

If you want to do any non-default configuration (virtualhosts, endpoint etc.), do so.

Starting It Up

Start and enable httpd:

service httpd start
chkconfig enable httpd

At this point, you should see the blocker tracking app running on the installed host.

Table Of Contents

Previous topic

Developing the app

This Page