Allow for building unstable release images.

This commit is contained in:
Tomasz Rybak 2014-01-09 20:39:17 +01:00
parent 1d7f0bd105
commit 4b9d801734
4 changed files with 60 additions and 5 deletions

View file

@ -25,7 +25,7 @@
"system": {
"type": "object",
"properties": {
"release": { "enum": ["wheezy"] },
"release": { "enum": ["wheezy", "unstable"] },
"architecture": { "enum": ["i386", "amd64"] },
"bootloader": { "enum": ["pvgrub", "grub", "extlinux"] },
"timezone": { "type": "string" },

View file

@ -0,0 +1,44 @@
{
"provider": "ec2",
"virtualization": "pvm",
"credentials": {
// "access-key": null,
// "secret-key": null
},
"bootstrapper": {
"workspace": "/target"
},
"image": {
"name": "debian-{system.release}-{system.architecture}-{virtualization}-{%Y}-{%m}-{%d}-ebs",
"description": "Debian {system.release} {system.architecture}"
},
"system": {
"release": "unstable",
"architecture": "amd64",
"bootloader": "pvgrub",
"timezone": "UTC",
"locale": "en_US",
"charmap": "UTF-8"
},
"packages": {
"mirror": "http://cloudfront.debian.net/debian"
},
"volume": {
"backing": "ebs",
"partitions": {
"type": "none",
"root": {
"size": 8192,
"filesystem": "ext4"
}
}
},
"plugins": {
"cloud_init": {
"username": "admin",
//"metadata_sources": "Ec2",
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
}
}
}

View file

@ -0,0 +1,11 @@
{
"squeeze": {
"amd64": "linux-image-xen-amd64",
"i386" : "linux-image-xen-686" },
"wheezy": {
"amd64": "linux-image-amd64",
"i386" : "linux-image-686" },
"unstable": {
"amd64": "linux-image-amd64",
"i386" : "linux-image-686" }
}

View file

@ -18,9 +18,9 @@ class DefaultPackages(Task):
info.exclude_packages.add('isc-dhcp-common')
# In squeeze, we need a special kernel flavor for xen
kernels = {'squeeze': {'amd64': 'linux-image-xen-amd64',
'i386': 'linux-image-xen-686', },
'wheezy': {'amd64': 'linux-image-amd64',
'i386': 'linux-image-686', }, }
kernels = {}
with open('packages-kernels.json') as stream:
import json
kernel = json.loads(stream.read())
kernel_package = kernels.get(info.manifest.system['release']).get(info.manifest.system['architecture'])
info.packages.add(kernel_package)