Merge branch 'master' into development

This commit is contained in:
Anders Ingemann 2014-04-08 20:03:26 +02:00
commit 71b28af3bd
17 changed files with 107 additions and 25 deletions

View file

@ -25,7 +25,7 @@
"system": { "system": {
"type": "object", "type": "object",
"properties": { "properties": {
"release": { "enum": ["wheezy", "jessie", "testing", "unstable"] }, "release": { "enum": ["squeeze", "wheezy", "jessie", "testing", "unstable"] },
"sections": { "sections": {
"type": "array", "type": "array",
"minItems": 1 "minItems": 1

View file

@ -26,8 +26,10 @@ class AddDefaultSources(Task):
sections = 'main' sections = 'main'
if 'sections' in info.manifest.system: if 'sections' in info.manifest.system:
sections = ' '.join(info.manifest.system['sections']) sections = ' '.join(info.manifest.system['sections'])
info.source_lists.add('main', 'deb {apt_mirror} {system.release} ' + sections) info.source_lists.add('main', 'deb {apt_mirror} {system.release} '+sections)
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} ' + sections) info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} '+sections)
info.source_lists.add('main', 'deb http://security.debian.org/ {system.release}/updates '+sections)
info.source_lists.add('main', 'deb-src http://security.debian.org/ {system.release}/updates '+sections)
if info.manifest.system['release'] not in {'testing', 'unstable'}: if info.manifest.system['release'] not in {'testing', 'unstable'}:
info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates ' + sections) 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) info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates ' + sections)

View file

@ -14,8 +14,8 @@ def resolve_tasks(taskset, manifest):
if manifest.system['release'] in ['wheezy', 'stable']: if manifest.system['release'] in ['wheezy', 'stable']:
taskset.add(tasks.AddBackports) taskset.add(tasks.AddBackports)
taskset.update([tasks.AddCloudInitPackages, taskset.update([ tasks.SetMetadataSource,
tasks.SetMetadataSource, tasks.AddCloudInitPackages,
]) ])
options = manifest.plugins['cloud_init'] options = manifest.plugins['cloud_init']

View file

@ -52,7 +52,9 @@ class SetUsername(Task):
class SetMetadataSource(Task): class SetMetadataSource(Task):
description = 'Setting metadata source' description = 'Setting metadata source'
phase = phases.system_modification #phase = phases.system_modification
phase = phases.package_installation
successors = [apt.AptUpdate]
@classmethod @classmethod
def run(cls, info): def run(cls, info):

View file

@ -43,6 +43,8 @@ class ConfigurePVGrub(Task):
grub_def = os.path.join(info.root, 'etc/default/grub') grub_def = os.path.join(info.root, 'etc/default/grub')
sed_i(grub_def, '^GRUB_TIMEOUT=[0-9]+', 'GRUB_TIMEOUT=0\n' sed_i(grub_def, '^GRUB_TIMEOUT=[0-9]+', 'GRUB_TIMEOUT=0\n'
'GRUB_HIDDEN_TIMEOUT=true') 'GRUB_HIDDEN_TIMEOUT=true')
sed_i(grub_def, '^#GRUB_TERMINAL=console', 'GRUB_TERMINAL=console')
sed_i(grub_def, '^GRUB_CMDLINE_LINUX_DEFAULT="quiet"', 'GRUB_CMDLINE_LINUX_DEFAULT="console=hvc0"')
from bootstrapvz.common.tools import log_check_call from bootstrapvz.common.tools import log_check_call
log_check_call(['chroot', info.root, 'update-grub']) log_check_call(['chroot', info.root, 'update-grub'])

View file

@ -37,8 +37,7 @@
"plugins": { "plugins": {
"cloud_init": { "cloud_init": {
"username": "admin", "username": "admin",
//"metadata_sources": "Ec2", "metadata_sources": "Ec2"
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
} }
} }
} }

View file

@ -37,8 +37,7 @@
"plugins": { "plugins": {
"cloud_init": { "cloud_init": {
"username": "admin", "username": "admin",
//"metadata_sources": "Ec2", "metadata_sources": "Ec2"
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
} }
} }
} }

View file

@ -37,8 +37,7 @@
"plugins": { "plugins": {
"cloud_init": { "cloud_init": {
"username": "admin", "username": "admin",
//"metadata_sources": "Ec2", "metadata_sources": "Ec2"
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
} }
} }
} }

View file

@ -37,8 +37,7 @@
"plugins": { "plugins": {
"cloud_init": { "cloud_init": {
"username": "admin", "username": "admin",
//"metadata_sources": "Ec2", "metadata_sources": "Ec2"
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
} }
} }
} }

View file

@ -37,8 +37,7 @@
"plugins": { "plugins": {
"cloud_init": { "cloud_init": {
"username": "admin", "username": "admin",
//"metadata_sources": "Ec2", "metadata_sources": "Ec2"
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
} }
} }
} }

View file

@ -37,8 +37,7 @@
"plugins": { "plugins": {
"cloud_init": { "cloud_init": {
"username": "admin", "username": "admin",
//"metadata_sources": "Ec2", "metadata_sources": "Ec2"
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
} }
} }
} }

View file

@ -37,8 +37,7 @@
"plugins": { "plugins": {
"cloud_init": { "cloud_init": {
"username": "admin", "username": "admin",
//"metadata_sources": "Ec2", "metadata_sources": "Ec2"
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
} }
} }
} }

View file

@ -38,8 +38,7 @@
"plugins": { "plugins": {
"cloud_init": { "cloud_init": {
"username": "admin", "username": "admin",
//"metadata_sources": "Ec2", "metadata_sources": "Ec2"
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
} }
} }
} }

View file

@ -33,7 +33,7 @@
"partitions": { "partitions": {
"type": "none", "type": "none",
"root": { "root": {
"size": "1GiB", "size": "4GiB",
"filesystem": "ext4" "filesystem": "ext4"
} }
} }

View file

@ -33,7 +33,7 @@
"partitions": { "partitions": {
"type": "none", "type": "none",
"root": { "root": {
"size": "1GiB", "size": "4GiB",
"filesystem": "ext4" "filesystem": "ext4"
} }
} }

View file

@ -0,0 +1,42 @@
{
"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": "squeeze",
"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": {
"admin_user": {
"username": "admin"
}
}
}

View file

@ -0,0 +1,42 @@
{
"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": "squeeze",
"architecture": "i386",
"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": {
"admin_user": {
"username": "admin"
}
}
}