This is the back-end server for the Mozilla Tile Service (MTS).
The goal of this service is to pass tiles from partners along to Firefox for display while ensuring customer privacy and choice as discussed in the support article "Sponsored tiles on the New Tab page".
Supports the TopSites feature within Firefox.
See also:
- In-repo documentation
- Monitoring dashboard (Mozilla internal)
This system uses Actix web, and Google Cloud APIs (currently vendored).
Contile uses Rust, and requires the latest stable iteration. See rustup.rs for how to install this application.
Once Rust is installed you can compile using cargo build
. This will
create a development release.
Contile is configured via environment variables. To see the complete list of available settings in contile::settings::Settings
(note, you can use cargo doc --open
to generate documentation.) In general, we have tried to provide sensible default values for most of these,
however you may need to specify the following:
CONTILE_ADM_ENDPOINT_URL={Your ADM endpoint} \
cargo run
Please note that the {}
indicate a variable replacement and should not be included, for example, a real environmet variable would look like: CONTILE_ADM_ENDPOINT_URL=https://example.com/
To run Contile's unit tests, run
cargo test
This will test everything, except for Google Storage for images. In order to test that, you will need to include the following:
GOOGLE_APPLICATION_CREDENTIALS={path to your credential.json file} \
CONTILE_TEST_PROJECT={GCP Project name} \
CONTILE_TEST_BUCKET={GCP Bucket name} \
cargo test
Contract tests are currently run using Docker images. This is so that they can be run as part of our automated continuous integration (CI) testing. See the dedicated contract-tests README for details.
It's a portmanteau of "Context" and "Tile", which turns out to be the name of a small village in the Parma region of Italy. So it's pronounced "kon tē` lā"