Add testing distribution and ability to use non-main sections.

This commit is contained in:
Tomasz Rybak 2014-01-25 15:52:58 +01:00
parent 03db9823f9
commit 99ae9988ff
3 changed files with 55 additions and 6 deletions

View file

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

View file

@ -23,11 +23,14 @@ class AddDefaultSources(Task):
@classmethod
def run(cls, info):
info.source_lists.add('main', 'deb {apt_mirror} {system.release} main')
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} main')
if info.manifest.system['release'] != 'unstable':
info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates main')
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates main')
sections = 'main'
if 'sections' in info.manifest.system:
sections = ' '.join(info.manifest.system['sections'])
info.source_lists.add('main', 'deb {apt_mirror} {system.release} '+sections)
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} '+sections)
if info.manifest.system['release'] in {'testing', 'unstable'}:
info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates '+sections)
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates '+sections)
class InstallTrustedKeys(Task):

View file

@ -0,0 +1,45 @@
{
"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",
"sections": ["main", "contrib", "non-free"],
"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": "8GiB",
"filesystem": "ext4"
}
}
},
"plugins": {
"cloud_init": {
"username": "admin",
//"metadata_sources": "Ec2",
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
}
}
}