Skip to content

Instantly share code, notes, and snippets.

View lightsofapollo's full-sized avatar

James Lal lightsofapollo

View GitHub Profile
#! /bin/bash -e
configurations=$(ls procfile/* | sed 's/procfile\///');
usage() {
echo
echo " Usage: ./bin/test <configuration> <file...>"
echo
echo " Available configurations"
for name in $configurations
do
var azure = require('azure');
var table = 'testtable';
var BlobService = azure.BlobService;
var getACL = BlobService.prototype.getContainerAcl;
var tableService = azure.createTableService();
tableService.apiVersion = '2012-02-12';
tableService.getTableACL = BlobService.prototype.getContainerAcl;
tableService.setTableACL = BlobService.prototype.setContainerAcl;
{
task: 'http://...',
start: 'http:/...',
end: 'http://...'
}
{
"value": [
{
"PartitionKey": "aws-docker",
"RowKey": "031110672480958-4882e220-9a5d-11e3-a124-5d7e9372709c",
"Timestamp": "2014-02-20T19:22:42.8377149Z",
"exitCode": 0,
"ironMessageId": "5982550652071297833",
"log": "https://taskclusterproduction.blob.core.windows.net:443/taskclusterlogs/b9a22032-0cf5-421a-b38b-bd1ccfb84b00",
"queue": "aws-docker",

Worker deployment sketch

  • A "base" ami which is updated very infrequently which contains the mininmal requirements to run some version of docker.
  • docker worker itself runs in its own isolated LXC container but with access to docker via the unix socket
  • deploying a worker is done by:
    • pushing to github somewhere
    • building a docker image for the worker
    • start freshly built docker worker and run end-to-end tests (on either staging or production queue)
    • deploying docker image (somehow) to S3 or private docker index
{
version: "0.2.0",
provisionerId: "aws-provisioner",
workerType: "ami-1ad0bc2a",
routing: "task-testing.task-creator",
retries: 5,
// since we invented our own queue format might as well call it heartbeat instead of timeout or whatever else...
heartbeat: 30,
# /etc/default/docker
mkdir -p /mnt/var/lib/docker
mkdir -p /mnt/docker-tmp
export TMPDIR="/mnt/docker-tmp"
export DOCKER_OPTS=" -g /mnt/var/lib/docker"
client.executeAsyncScript(function() {
if (window.magicFooIsdone) return marionetteScriptFinished();
// wait for magic foo!
setTimeout(marionetteScriptFinished, 1000, 'retvalue');
});
argv: ['/tools/buildbot/bin/python', 'scripts/scripts/b2g_desktop_unittest.py', '--cfg', 'b2g/desktop_automation_config.py', '--test-suite', 'reftest', '--test-manifest', 'tests/layout/reftests/reftest-sanity/reftest.list', '--blob-upload-branch', 'b2g-inbound', '--download-symbols', 'ondemand']
module.exports = mem(function(databaseConnection) {
var MyOtherObjectThatDoesDbStuff = require('./stuff')(databaseConnection);
return {
};
});