Deployment

push-dev-dashboard is designed with 12-factor app philosophy, so you can easily deploy your changes to your own app.

Deploy onto Deis

Note: Mozilla used to run our own Deis cluster, but it has been shut down. The following instructions should work to deploy the code to your own Deis cluster.

  1. Install the deis client.

  2. Install deis on AWS.

  3. Create the application:

    deis create dev-dashboard-username
    
  4. Push code to the deis remote:

    git push deis master
    
  5. Create an RDS Postgres instance in us-east-1 with default settings except:

    • DB Instance Class: db.t2.micro
    • Allocated Storag: 5 GB
    • VPC: vpc-9c2b0ef8
  6. In the RDS Instance configuration details, click the “Security Groups”. (Usually something like “rds-launch-wizard-N (sg-abcdef123)”)

  7. In the security group, under the “Inbound” tab, change the source to allow the deis cluster hosts.

  8. Set the DATABASE_URL environment variable to match the RDS DB:

    deis config:set DATABASE_URL=postgres://username:password@endpoint/dbname
    
  9. Migrate DB tables on the new RDS instance:

    deis run python manage.py migrate
    
  10. Dock to app instance to create a superuser:

    deisctl dock dev-dashboard-username
    /app/.heroku/python/bin/python manage.py createsuperuser
    
  11. Open the new deis app:

    deis open
    

Enable Firefox Accounts Auth on your Deis app

To enable Firefox Account sign-ins on your Deis app, you will need to create your own Firefox Accounts OAuth Client for your app domain.

  1. Go to register your own Firefox Accounts OAuth Client:

    • Client name: dev-dashboard-username
    • Redirect URI: https://<your-push-dev-dashboard-app-on-deis-domain>/accounts/fxa/login/callback/
    • Trusted Mozilla Client: CHECKED

    Be sure to copy the client secret - you can’t see it again.

  2. Go to https://<your-push-dev-dashboard-app-on-deis-domain>/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

  3. Sign in at https://<your-push-dev-dashboard-app-on-deis-domain>/ with a Firefox Account.