mozilla / splice

Firefox Tiles Ingestion, Validation and Reporting tool
Mozilla Public License 2.0
7 stars 14 forks source link

Splice Distribution Cron #247

Open tspurway opened 8 years ago

tspurway commented 8 years ago

The cron job in Splice 1.X checks for new opportunities to create distributions and uploads them to s3. In Splice 2.X, we need to change the current check from a call to manage.py data deploy_scheduled to an HTTP POST to our distribution API.

The implementation should be a PR against this code:

https://github.com/mozilla-services/puppet-config/blob/master/tiles/modules/splice/manifests/init.pp#L90-L95

NB: this issue also covers removing obsolete manage.py functionality such as the the data command.

ncloudioj commented 8 years ago

The distribution API is,

 $ http POST :5000/api/distributions?channel_id=1&date="2015-11-17"

We can use cURL, HTTPie, or any CLI utility to hit this endpoint. The arguments channel_id and date in the query string are both optional. It'll use the current date by default, and distribute for every channel if not specified. The channel_id could be helpful if it only traffics tiles for a specific channel.

Loop in @relud @mostlygeek

mostlygeek commented 8 years ago

@relud we might want to revisit https://github.com/mozilla-services/puppet-config/pull/1663 since that doesn't include the GET params @ncloudioj mentions above

relud commented 8 years ago

from how @ncloudioj described it, I assumed date could be left out (because it defaults to today), and channel_id should be left out because we want the cron job to deploy all channels.

tspurway commented 8 years ago

This is correct, @relud - you won't need to specify the params.