Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: e1601c9f55
Fetching contributors…

Cannot retrieve contributors at this time

144 lines (90 sloc) 4.07 kB

This repository is the code for the Amara project.

The full documentation can be found at

Quick Start

Amara uses Vagrant to make it easy to get started. If you've never used Vagrant before we highly recommend going through its quick start guide to learn how it works.

To run the development version:

  1. Git clone the repository:

    git clone git:// unisubs

    Now the entire project will be in the unisubs directory.

  2. Install VirtualBox and vagrant if you don't have them yet. Then type:

    vagrant up

    This is going to create a vm and provision it. It should take 10-15 minutes. Remember what mom said: a watched pot never boils.

  3. Switch over to your vagrant vm with:

    vagrant ssh

    By default our ~/.bashrc file will automatically move you to the shared folder and activate the virtualenv.

    Now run following command:


    It's safe to run multiple times if something goes wrong (like PyPi goes down).

  4. Add to your hosts file, pointing at This is necessary for Twitter and Facebook oauth to work correctly.

  5. In your vagrant vm (the one you switched to in step 3), run the site with:


    You can access the site at


To run unit tests, use the pmt alias. This will ensure that you're using the correct settings for testing.

You can specify specific tests to run, just like if you were using nosetests. For example:

$ vagrant ssh

# Just the tests in apps/teams/tests/
$ pmt apps.teams.tests.permissions

# Tests defined as a class in apps/teams/tests/
$ pmt apps.teams.tests.permissions:TestRules

# One specific test
$ pmt apps.teams.tests.permissions:TestRules.test_can_add_video

# Everything:
$ pmt

Note: you may need to rebuild the Solr schema after running tests. To do so, run the following command on the server:

sudo ./deploy/

TODO: Fix this.


You can optionally set up a few other pieces of the development environment that we haven't automated yet.

RabbitMQ and Celery

Add the following to to use RabbitMQ and Celery for async tasks:

BROKER_BACKEND = 'amqplib'
BROKER_HOST = "localhost"
BROKER_USER = "usrmquser"
BROKER_PASSWORD = "usrmqpassword"
BROKER_VHOST = "ushost"

Werkzeug Debugger

If you want to use the awesome Werkzeug debugging runserver instead of the standard Django one, you just have to run (while the virtualenv is activated):

pip install werkzeug

And then use ./ plus to run it.

bpython shell

If you want to use the awesome bpython shell instead of the normal one you just need to run (while the virtualenv is activated):

pip install bpython

Now when you run pm shell it will use bpython automatically.


If you want to collect metrics when developing locally (just out of curiosity, or if you want to add some of your own and test them) you'll need to set up the amara-metrics Vagrant box:

git clone git:// metrics
cd metrics
vagrant up

Then add the following line to /etc/hosts on your local (host) machine:

Finally, turn on metric reporting by changing the ENABLE_METRICS setting in to True.

Now load a few pages to generate some stats, then point your browser at to see the Graphite dashboard. The stats should be under unisubs (which is the hostname of the Vagrant VM).

Jump to Line
Something went wrong with that request. Please try again.