FligtDeck depends on:
  • Python 2.6
  • MySQL
  • git
We also suggest:


It’s outside the scope of this document, but we suggest you do all your work from within a virtualenv so your python packages don’t conflict with others on the system. Now’s the time to get in your virtualenv!

If you’re going to be contributing, please fork before continuing so you can push code to your own branches. Then, download the code, substituting your name:

git clone{your-username}/FlightDeck.git  # if you're not a developer, just use "mozilla" for your-username
cd FlightDeck

Install submodules:

git submodule update --init --recursive

Install any compiled libraries:

pip install -r requirements/compiled.txt

Configure the site by creating a in your root. Anything you put in here will override the defaults in An example follows, note the first line is required:

from settings import *

DEBUG = True

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'flightdeck',
        'USER': 'root',
        'PASSWORD': '',
        'HOST': '',
        'OPTIONS': {
            'init_command': 'SET storage_engine=InnoDB'
        'TEST_CHARSET': 'utf8',
        'TEST_COLLATION': 'utf8_general_ci',


UPLOAD_DIR = "/tmp/flightdeck"


ES_DISABLED = True # enable when ES daemon is running
ES_HOSTS = ['']
ES_INDEX = 'flightdeck'

CACHES['default']['BACKEND'] =

Make sure that MySQL is running, then create the database you specified in

mysql -u root -p

[MySQL messages snipped]

mysql> CREATE DATABASE flightdeck;
Query OK, 1 row affected (0.00 sec)

If this is a brand new installation you’ll need to configure a database as well. This command will build the structure:

./ syncdb

If you’re using Elastic Search locally (this is not necessary for basic functionality) then be sure to setup the ES index mappings and index all your packages:

./ cron setup_mapping
./ cron index_all

FlightDeck needs to know about the SDKs you have available (in ./lib). This command will make a single version of the SDK available in FlightDeck’s Libraries selector:

./ add_core_lib addon-sdk-1.2.1

If you’re writing code and would like to add some test data to the database you can load some fixtures:

./ loaddata users packages

Run the development server:

./ runserver

In Firefox’s about:config create a new string preference named extensions.addonBuilderHelper.trustedOrigins with the value,; install the Add-on Builder Helper (if you had it already installed, restart the browser after changing the preference)

Navigate the browser to, log in with the username and password you entered while running ./ syncdb.

You’re all done!


Create a local super user account

If you imported your database then you will need to create a user:

./ createsuperuser

Building documentation

FlightDeck uses Sphinx-based documentation, so you have to install sphinx in order to build the docs:

pip install sphinx
make -C docs html


If you get ValueError: unknown locale: UTF-8, run export LC_ALL=en_US.UTF-8 before make.

Import live database dump

How to import a database dump from live:

[sudo] mysql flightdeck < flightdeck_dump.sql

If you run into an error when importing large sql dump files, you may need to restart your mysqld process with this parameter:

mysqld --max_allowed_packet=32M

The database dump might be missing a row in django_sites table, so if you get a django error saying “Site matching query does not exist” when you hit the login page then insert a row into django_site:

insert into django_site (id,domain,name) values (1,'','example')

After importing the data, you will need to rebuild your ES index.

Using with Celery

Majority of resources heavy tasks is done by delegating them to celery.

By default on development boxes celery is not running and tasks are run synchronously. To be able to test celery tasks one has to configure the development system to resemble the production one.

Celery requires a running messaging system. We use RabbitMQ.

To configure please copy the Celery section from to and uncomment it.

# These settings are for if you have celeryd running
BROKER_HOST = 'localhost'
BROKER_USER = 'builder'
BROKER_VHOST = 'builder'

RabbitMQ CheatSheet

Create user, virtual host and give user all privileges:

sudo rabbitmqctl add_user builder builder
sudo rabbitmqctl add_vhost builder
sudo rabbitmqctl set_permission -p builder builder ".*" ".*" ".*"

From project directory run:

./ celeryd -l INFO

Using Apache

Production environments will expect to be running through another webserver. An example apache.conf

An example Apache WSGI configuration apache.wsgi