Welcome¶
moz-dev-dash is the code for Mozilla Developer Services dashboard. It combines:
- Firefox Accounts Authentication (via django-allauth)
- (Soon) Domain Verification (via ?)
- Mozilla Push Service metrics
Resources¶



Code: | https://github.com/mozilla-services/push-dev-dashboard |
---|---|
License: | MPL2 |
Documentation: | http://push-dev-dashboard.readthedocs.org/ |
Issues: | https://github.com/mozilla-services/push-dev-dashboard/issues |
IRC: | irc://irc.mozilla.org/mds |
Mailing list: | https://lists.mozilla.org/listinfo/mds-public |
Servers: | https://moz-push-dash.herokuapp.com (stage) |
Contents¶
Development¶
Requirements¶
- postgres for database
- python 2.7, virtualenv, & pip for app server
Install Locally¶
Clone and change to the directory:
git clone git@github.com:mozilla-services/push-dev-dashboard.git cd push-dev-dashboard
Create and activate a virtual environment (Can also use virtualenvwrapper):
virtualenv env source env/bin/activate
-
pip install -r requirements.txt
Source the
.env
file to set environment config vars (Can also use autoenv):source .env
`Migrate`_ DB tables
python manage.py migrate
-
python manage.py createsuperuser
Run it¶
Source the
.env
file to set environment config vars (Can also use autoenv):source .env
Activate the virtual environment (Can also use virtualenvwrapper):
source env/bin/activate
Run it:
python manage.py runserver
Enable Firefox Accounts Auth¶
To enable Firefox Accounts authentication, you can use our local development OAuth client app.
- Add a django-allauth social app for Firefox Accounts (Log in as the
superuser account you created):
- Provider: Firefox Accounts
- Name: fxa
- Client id: 7a4cd4ca0fb1b5c9
- Secret key: c10059ba24e6715a1b6f2c80f1cc398fb6a39ca18bc7554e894b36ea85b88eeb
- Sites: example.com -> Chosen sites
- Log out of the admin account
- Sign in with a Firefox Account at http://127.0.0.1:8000.
Run the Tests¶
Install test requirements:
pip install requirements-test.txt
Running the test suite:
python manage.py test
Working on Docs¶
Install doc requirements:
pip install -r requirements-docs.txt
Building the docs is easy:
cd docs
sphinx-build . html
Read the beautiful docs:
open html/index.html
Deployment¶
moz-dev-dash is designed with 12-factor app philosophy to run on heroku, so you can easily deploy your changes to your own heroku app with heroku toolbelt.
Deploy your own¶
Create a heroku remote. We suggest naming it moz-dev-dash-username:
heroku apps:create moz-dev-dash-username
Set the heroku app to use the “multi” buildpack:
heroku buildpacks:set https://github.com/ddollar/heroku-buildpack-multi.git
Push code to the heroku remote:
git push heroku master
Migrate DB tables on heroku:
heroku run python manage.py migrate
Create a superuser on heroku:
heroku run python manage.py createsuperuser
Open the new heroku app:
heroku open
Enable Firefox Accounts Auth on Heroku¶
To enable Firefox Account sign-ins on your heroku app, you will need to create your own Firefox Accounts OAuth Client for your app domain.
Go to register your own Firefox Accounts OAuth Client:
- Client name: moz-dev-dash-username
- Redirect URI: https://moz-dev-dash-username.herokuapp.com/accounts/fxa/login/callback/
- Trusted Mozilla Client: CHECKED
Be sure to copy the client secret - you can’t see it again.
Go to https://moz-dev-dash-username.herokuapp.com/admin/socialaccount/socialapp/add/ to Enable Firefox Accounts Auth like a local machine; this time using your own new Firefox Accounts OAuth Client ID and Secret
Sign in at https://moz-dev-dash-username.herokuapp.com/ with a Firefox Account.