taskcluster/docker-worker — pull request #20 by jonasfj (2014-03-13 01:29:04+00:00)
Title: Packer updating ami

This adds a hack where we can define `-var update_type=updating` to get an auto-updating AMI that uses the latest code from github.
Yes. that part is a horrible hack. To counter it I fixed some alignment issues too :)

It also incorporates the move from EBS to instance storage for docker tmp folder. This, however, has the unfortunate side effect of rendering the prefilled images useless (`docker_prefill.sh` which loads gaia images also loads the `ubuntu` image).

We might be able to hack `/etc/default/docker` into copying `/var/lib/docker/` over to `/mnt/...` on boot. But the documentation did not specify whether or not this folder is relocatable.
An alternative is to consider instance-store only images, packer can build these, but it needs a little extra config keys.

Long term, I think we need to consider instance-store backed vs. EBS. But short term EBS is fine, and it may be so long too, because of faster boot times. But this should indeed be tested.
(As long as docker lives on `/mnt/` I don't think it's important whether or not the system partition is EBS backed).

**Note** I think we should consider moving to named `workerType`s soon, as it seems like updating the docker-worker code on github won't be enough. A lot of what we want to change is configuration related.
The only workaround I see is reducing the provisioning script to copy in various credentials, and running `npm script install` then letting `npm script install` handle all the instance configuration and setup. Out auto-updating AMI would then have to do that on every launch, so it would be very slow. But it's an option.