AWS Setup

Amazon Web Services (AWS) provides the preferred hosting for SEED.

seed is a Django project and Django’s documentation is an excellent place to general understanding of this project’s layout.


Ubuntu server 13.10 or newer, with the following list of aptitude packages installed. prerequisites.txt

Copy the prerequisites.txt files to the server and install the dependencies:

$ sudo dpkg --set-selections < ./prerequisites.txt
$ sudo apt-get dselect-upgrade

or with a single command as su

# aptitude install $(cat ./prerequisites.txt | awk '{print $1}')


postgresql server is not included above, and it is assumed that the system will use the AWS RDS postgresql service


postgresql >=9.3 is required to support JSON Type

A smaller list of packages to get going:

$ sudo apt-get install python-pip python-dev libatlas-base-dev gfortran \
python-dev build-essential g++ npm libxml2-dev libxslt1-dev \
postgresql-devel postgresql-9.3 postgresql-server-dev-9.3 libpq-dev \
libmemcached-dev openjdk-7-jre-headless

Amazon Web Services (AWS) Dependencies

The following AWS services are used for seed:

  • RDS (PostgreSQL >=9.3)
  • ElastiCache (redis)
  • SES
  • S3

Python Dependencies

clone the seed repository from github

$ git clone

enter the repo and install the python dependencies from requirements.txt

$ cd seed
$ sudo pip install -r requirements.txt

JavaScript Dependencies

npm is required to install the JS dependencies. The bin/ script will download all JavaScript dependencies and build them. bower and grunt-cli will be installed globally by the install_javascript_dependencies script. The Ubuntu version 13.10 requires a cusomt install of nodejs/npm, and an install scrpt ( bin/ is provided to download a stable release and install npm assuming the prerequisites are met.

$ sudo apt-get install build-essential
$ sudo apt-get install libssl-dev
$ sudo apt-get install curl
$ . bin/
$ bin/

Database Configuration

Copy the file in the config/settings directory to config/settings/, and add a DATABASES configuration with your database username, password, host, and port. Your database configuration can point to an AWS RDS instance or a postgresql 9.3 database instance you have manually installed within your infrastructure.

# Database
    'default': {
        'NAME': 'seed',
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',


other databases could be used such as MySQL, but are not supported due to the postgres-specific JSON Type

In in the above database configuration, seed is the database name, this is arbitrary and any valid name can be used as long as the database exists.

create the database within the postgres psql shell:

postgres-user=# CREATE DATABASE seed;

or from the command line:

$ createdb seed

create the database tables and migrations:

$ python syncdb
$ python migrate


running migrations can be shortened into a one-liner ./ syncdb --migrate

create a superuser to access the system

$ python create_default_user --organization=example --password=demo123


Every user must be tied to an organization, visit /app/#/profile/admin as the superuser to create parent organizations and add users to them.

cache and message broker

The SEED project relies on redis for both cache and message brokering, and is available as an AWS ElastiCache service. should be updated with the CACHES and BROKER_URL settings.

    'default': {
        'BACKEND': 'redis_cache.cache.RedisCache',
        'LOCATION': "",
        'OPTIONS': { 'DB': 1 },
        'TIMEOUT': 300
BROKER_URL = 'redis://'


The popular memcached can also be used as a cache back-end, but is not supported and redis has a different cache key format, which could cause breakage and isn’t tested. Likewise, rabbitmq or AWS SQS are alternative message brokers, which could cause breakage and is not tested.

running celery the background task worker

Celery is used for background tasks (saving data, matching, creating projects, etc) and must be connected to the message broker queue. From the project directory, celery can be started:

$ python celery worker -B -c 2 --loglevel=INFO -E --maxtasksperchild=1000

running the development web server

The Django dev server (not for production use) can be a quick and easy way to get an instance up and running. The dev server runs by default on port 8000 and can be run on any port. See Django’s runserver documentation for more options.

$ python runserver

running a production web server

Our recommended web server is uwsgi sitting behind nginx. The bin/ script can been created to start uwsgi assuming your Ubuntu user is named ubuntu.

Also, static assets will need to be moved to S3 for production use. The bin/post_compile script contains a list of commands to move assets to S3.

$ bin/post_compile
$ bin/start_uwsgi

The following environment variables can be set within the ~/.bashrc file to override default Django settings.

export SENTRY_DSN=
export DEBUG=False
export ONLY_HTTPS=True