mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
Merge pull request #33 from JamesBromberger/master
Manifest, deb Descurity in apt sources.list
This commit is contained in:
commit
6cafdbee14
17 changed files with 107 additions and 25 deletions
|
@ -25,7 +25,7 @@
|
|||
"system": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"release": { "enum": ["wheezy", "jessie", "testing", "unstable"] },
|
||||
"release": { "enum": ["squeeze", "wheezy", "jessie", "testing", "unstable"] },
|
||||
"sections": {
|
||||
"type": "array",
|
||||
"minItems": 1
|
||||
|
|
|
@ -26,8 +26,10 @@ class AddDefaultSources(Task):
|
|||
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)
|
||||
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 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'}:
|
||||
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)
|
||||
|
|
|
@ -14,8 +14,8 @@ def resolve_tasks(taskset, manifest):
|
|||
if manifest.system['release'] in ['wheezy', 'stable']:
|
||||
taskset.add(tasks.AddBackports)
|
||||
|
||||
taskset.update([tasks.AddCloudInitPackages,
|
||||
tasks.SetMetadataSource,
|
||||
taskset.update([ tasks.SetMetadataSource,
|
||||
tasks.AddCloudInitPackages,
|
||||
])
|
||||
|
||||
options = manifest.plugins['cloud_init']
|
||||
|
|
|
@ -52,7 +52,9 @@ class SetUsername(Task):
|
|||
|
||||
class SetMetadataSource(Task):
|
||||
description = 'Setting metadata source'
|
||||
phase = phases.system_modification
|
||||
#phase = phases.system_modification
|
||||
phase = phases.package_installation
|
||||
successors = [apt.AptUpdate]
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
|
@ -67,7 +69,7 @@ class SetMetadataSource(Task):
|
|||
'skipping selections setting.').format(info.manifest.provider)
|
||||
logging.getLogger(__name__).warn(msg)
|
||||
return
|
||||
sources = "cloud-init cloud-init/datasources multiselect " + sources
|
||||
sources = "cloud-init cloud-init/datasources multiselect " + sources
|
||||
log_check_call(['chroot', info.root, 'debconf-set-selections'], sources)
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ class ConfigurePVGrub(Task):
|
|||
grub_def = os.path.join(info.root, 'etc/default/grub')
|
||||
sed_i(grub_def, '^GRUB_TIMEOUT=[0-9]+', 'GRUB_TIMEOUT=0\n'
|
||||
'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
|
||||
log_check_call(['chroot', info.root, 'update-grub'])
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
"plugins": {
|
||||
"cloud_init": {
|
||||
"username": "admin",
|
||||
//"metadata_sources": "Ec2",
|
||||
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
|
||||
"metadata_sources": "Ec2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
"plugins": {
|
||||
"cloud_init": {
|
||||
"username": "admin",
|
||||
//"metadata_sources": "Ec2",
|
||||
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
|
||||
"metadata_sources": "Ec2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
"plugins": {
|
||||
"cloud_init": {
|
||||
"username": "admin",
|
||||
//"metadata_sources": "Ec2",
|
||||
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
|
||||
"metadata_sources": "Ec2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
"plugins": {
|
||||
"cloud_init": {
|
||||
"username": "admin",
|
||||
//"metadata_sources": "Ec2",
|
||||
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
|
||||
"metadata_sources": "Ec2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
"plugins": {
|
||||
"cloud_init": {
|
||||
"username": "admin",
|
||||
//"metadata_sources": "Ec2",
|
||||
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
|
||||
"metadata_sources": "Ec2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
"plugins": {
|
||||
"cloud_init": {
|
||||
"username": "admin",
|
||||
//"metadata_sources": "Ec2",
|
||||
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
|
||||
"metadata_sources": "Ec2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
"plugins": {
|
||||
"cloud_init": {
|
||||
"username": "admin",
|
||||
//"metadata_sources": "Ec2",
|
||||
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
|
||||
"metadata_sources": "Ec2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,8 +38,7 @@
|
|||
"plugins": {
|
||||
"cloud_init": {
|
||||
"username": "admin",
|
||||
//"metadata_sources": "Ec2",
|
||||
"disable_modules": [ "landscape", "byobu", "ssh-import-id" ]
|
||||
"metadata_sources": "Ec2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"partitions": {
|
||||
"type": "none",
|
||||
"root": {
|
||||
"size": "1GiB",
|
||||
"size": "4GiB",
|
||||
"filesystem": "ext4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"partitions": {
|
||||
"type": "none",
|
||||
"root": {
|
||||
"size": "1GiB",
|
||||
"size": "4GiB",
|
||||
"filesystem": "ext4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue