A web application for managing user experiments for Mozilla Firefox.
Перейти к файлу
Jared Lockhart 3169d054aa
Rename master to main fixes #2949 (#2950)
2020-06-30 13:52:09 -04:00
.circleci Rename master to main fixes #2949 (#2950) 2020-06-30 13:52:09 -04:00
.github Change dependabot to PR against dependencies branch fixes #2944 (#2945) 2020-06-29 20:38:20 -04:00
app Bump jest from 26.0.1 to 26.1.0 in /app/experimenter/static/rapid (#2920) 2020-06-30 00:23:58 +00:00
kinto Add remote settings to docker compose fixes #2673 (#2803) 2020-06-15 16:28:20 -04:00
nginx Use separate docker stack for integration tests fixes #1641 (#1644) 2019-09-11 10:28:22 -04:00
scripts Change to continuous deployment fixes #2401 (#2408) 2020-03-24 20:25:37 -04:00
.env.integration removed data science bugzilla stuff with jira (#2316) 2020-03-09 11:58:59 -07:00
.env.sample Add remote settings to docker compose fixes #2673 (#2803) 2020-06-15 16:28:20 -04:00
.gitignore Docker ignore .cache folders fixes #2891 (#2892) 2020-06-25 15:56:28 -04:00
CODE_OF_CONDUCT.md Rename master to main fixes #2949 (#2950) 2020-06-30 13:52:09 -04:00
LICENSE Initial commit 2016-10-20 14:42:32 -04:00
Makefile Add TS/React skeleton for Rapid Experiments (#2712) 2020-06-02 14:36:10 -04:00
README.md Simplify integration test workflow fixes #1914 (#2354) 2020-03-17 13:35:06 -04:00
contributing.md Rename master to main fixes #2949 (#2950) 2020-06-30 13:52:09 -04:00
docker-compose-full.yml Explicitly set postgres password and version fixes #2291 (#2292) 2020-02-19 13:30:44 -05:00
docker-compose-test.yml Explicitly set postgres password and version fixes #2291 (#2292) 2020-02-19 13:30:44 -05:00
docker-compose.integration-test.yml Updated makefile for headless firefox. (#2414) 2020-03-30 11:04:18 -05:00
docker-compose.yml Docker ignore .cache folders fixes #2891 (#2892) 2020-06-25 15:56:28 -04:00

README.md

Mozilla Experimenter

CircleCI What's deployed on dev,stage,prod?


1. Design 2. Launch 3. Analyze

Experimenter is a platform for managing experiments in Mozilla Firefox.

Deployments

Shared Dev

https://experimenter-app.dev.mozaws.net/

Staging

https://experimenter.stage.mozaws.net/

Production

https://experimenter.services.mozilla.com/

What is an experiment?

An experiment is a way to measure how a change to your product affects how people use it.

An experiment has three parts:

  1. A new feature that can be selectively enabled
  2. A group of users to test the new feature
  3. Telemetry to measure how people interact with the new feature

How do I run an experiment?


  1. Build a new feature behind a pref flag
  2. Define an experiment for that feature in Experimenter
  3. Send it to Shield
  4. After Shield reviews and approves it, it is sent to Firefox
  5. Firefox clients check whether they should enroll in the experiment and configure themselves accordingly
  6. Telemetry about the experiment is collected
  7. Dashboards are created to visualize the telemetry
  8. Analyze and collect the results to understand how the new feature impacted users
  9. Do it again!

Installation

  1. Install docker on your machine

  2. Clone the repo

    git clone <your fork>
    
  3. Copy the sample env file

    cp .env.sample .env
    
  4. Set DEBUG=True for local development

    vi .env
    
  5. Create a new secret key and put it in .env

    make secretkey
    
  6. Run tests

    make test
    
  7. Setup the database

    make refresh
    
  8. Run a dev instance

    make up
    
  9. Navigate to it and add an SSL exception to your browser

    https://localhost/
    

Done!

Usage

Experimenter uses docker for all development, testing, and deployment.

The following helpful commands have been provided via a Makefile:

build

Build the application container by executing the build script

compose_build

Build the supporting services (nginx, postgresql) defined in the compose file

up

Start a dev server listening on port 80 using the Django runserver

test

Run the Django test suite with code coverage

lint

Run flake8 against the code

check

Run both test and lint

migrate

Apply all django migrations

createuser

Create an admin user in the local dev instance

load_locales_countries

Populates locales and countries

load_dummy_experiments

Populates db with dummy experiments

shell

Start an ipython shell inside the container (this lets you import and test code, interact with the db, etc)

bash

Start a bash shell inside the container (this lets you interact with the containerized filesystem)

ssl

Create dummy SSL certs to use the dev server over a locally secure connection. This helps test client behaviour with a secure connection. This task is run automatically when needed.

kill

Stop and delete all docker containers. WARNING: this will remove your database and all data. Use this to reset your dev environment.

refresh

Run kill, migrate, load_locales_countries load_dummy_experiments

up_all

Start up a normandy and delivery console instance. Prereqs. Symlink normandy and delivery console eg. ln -s ../normandy normandy, ensure user is assigned superuser status

integration_test

Run the integration test suite inside a containerized instance of Firefox. You must also be already running a make up dev instance in another shell to run the integration tests.

integration_vnc_up

Start a linux VM container with VNC available over vnc://localhost:5900 with password secret. Right click on the desktop and select Applications > Shell > Bash and enter tox -c tests/integration/ to run the integration tests and watch them run in a Firefox instance you can watch and interact with.

API

API documentation can be found here

Contributing

Please see our Contributing Guidelines

License

Experimenter uses the Mozilla Public License