Skip to content

Commit

Permalink
Packer hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsofapollo committed Mar 11, 2014
1 parent 80927a3 commit 808f2c7
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
Binary file added packer/base.box
Binary file not shown.
39 changes: 39 additions & 0 deletions packer/registry.json
@@ -0,0 +1,39 @@
{
"description": "taskcluster worker system dependencies",
"provisioners": [
{
"type": "shell",
"scripts": [
"packer/registry/scripts/docker.sh"
]
}
],
"builders": [
{
"type": "digitalocean",
"region_id": "3",
"image_id": "1505699"
},
{
"type": "amazon-ebs",
"region": "us-west-2",
"source_ami": "ami-62e78652",
"instance_type": "m3.large",
"ssh_username": "ubuntu",
"ami_name": "docker-registry {{timestamp}}",
"tags": {
"OS_Version": "Ubuntu",
"Release": "Latest"
}
}
],

"post-processors": [
{
"type": "vagrant",
"output": "packer/base.box",
"keep_input_artifact": true
}
]
}

25 changes: 25 additions & 0 deletions packer/registry/scripts/docker.sh
@@ -0,0 +1,25 @@
#!/bin/bash -e
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

# Add the Docker repository to your apt sources list.
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\
> /etc/apt/sources.list.d/docker.list"

# add docker group and add vagrant to it
sudo groupadd docker
sudo usermod -a -G docker $USER

# install curl
sudo apt-get update
sudo apt-get install -y -q curl

# add the docker gpg key
sudo curl https://get.docker.io/gpg > /tmp/docker-gpg
sudo apt-key add /tmp/docker-gpg

# Update your sources
sudo apt-get update
sudo apt-get upgrade -y

# Install. Confirm install.
sudo apt-get install -y -q cgroup-lite lxc-docker
2 changes: 2 additions & 0 deletions packer/registry/scripts/preload.sh
@@ -0,0 +1,2 @@
#!/bin/bash -e
sudo docker pull blalor/s3-registry

0 comments on commit 808f2c7

Please sign in to comment.