mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +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": {
|
"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
|
||||||
|
|
|
@ -28,6 +28,8 @@ class AddDefaultSources(Task):
|
||||||
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)
|
||||||
|
|
|
@ -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']
|
||||||
|
|
|
@ -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):
|
||||||
|
|
|
@ -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'])
|
||||||
|
|
|
@ -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" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
"partitions": {
|
"partitions": {
|
||||||
"type": "none",
|
"type": "none",
|
||||||
"root": {
|
"root": {
|
||||||
"size": "1GiB",
|
"size": "4GiB",
|
||||||
"filesystem": "ext4"
|
"filesystem": "ext4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
"partitions": {
|
"partitions": {
|
||||||
"type": "none",
|
"type": "none",
|
||||||
"root": {
|
"root": {
|
||||||
"size": "1GiB",
|
"size": "4GiB",
|
||||||
"filesystem": "ext4"
|
"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