Skip to content
forked from mozilla/testpilot

Idea Town is a platform for performing controlled tests of new product concepts in Firefox

License

Notifications You must be signed in to change notification settings

9kopb/idea-town

 
 

Repository files navigation

Idea Town

Idea Town Rainbow Logo

Build Status

Coverage status

Idea Town is an opt-in platform that allows us to perform controlled tests of new high-visibility product concepts in the general release channel of Firefox.

Idea Town is not intended to replace trains for most features, nor is it a test bed for concepts we do not believe have a strong chance of shipping in general release. Rather, it is reserved for features that require user feedback, testing, and tuning before they ship with the browser.

Repositories

More Information

Development Setup

  1. Install Docker Toolbox

  2. Make sure you have a default Docker machine:

docker-machine create -driver virtualbox default

  1. Make sure your shell can see the default Docker machine:

eval "$(docker-machine env default)"

  1. Check the IP address of the default Docker machine:

docker-machine ip default

  1. Add an entry for ideatown.dev in your /etc/hosts pointing to the Docker machine IP

192.168.99.100 ideatown.dev

This entry is necessary to support Firefox Accounts

  1. Create and setup the Docker containers:

docker-compose up

this may take some time

  1. Visit the Django server:

open http://ideatown.dev:8000/

you can also use whatever IP was reported by docker ip with port 8000

Notes

  • To shell into one of the containers, e.g. to run Django commands:

    docker exec -t -i ideatown_server_1 bash

  • If you change package.json to add dependencies for gulpfile.js, you must rebuild client_build:

    docker-compose build client_build

  • If you change requirements.txt to add dependencies for Django, you must rebuild server:

    docker-compose build server

  • Sometimes the database container hasn't fully started when the Django container wants to connect to it. If this happens:

    • docker ps to get the name of the Django container (something like ideatown_server_1)
    • docker restart ideatown_server_1 to restart the Django container

Testing

There's a sample test in idea_town/base/tests.py for your convenience, that you can run using the following command:

python manage.py test

If you want to run the full suite, with flake8 and coverage, you may use tox. This will run the tests the same way they are run by travis):

pip install tox
tox

The .travis.yml file will also run coveralls by default.

Docker for deploying to production

  1. Add your project in Docker Registry as Automated Build

  2. Prepare a 'env' file with all the variables needed by dev, stage or production.

  3. Run the image:

    docker run --env-file env -p 80:8000 mozilla/idea-town

Heroku

  1. heroku create
  2. heroku config:set DEBUG=False ALLOWED_HOSTS=.herokuapp.com, SECRET_KEY=something_secret DATABASE_URL gets populated by heroku once you setup a database.
  3. git push heroku master

NewRelic Monitoring

A newrelic.ini file is already included. To enable NewRelic monitoring add two enviroment variables:

  • NEW_RELIC_LICENSE_KEY
  • NEW_RELIC_APP_NAME

See the full list of supported environment variables.

About

Idea Town is a platform for performing controlled tests of new product concepts in Firefox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 65.6%
  • JavaScript 19.9%
  • CSS 9.7%
  • HTML 3.8%
  • Shell 1.0%