mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
commit
1d755abfc6
13 changed files with 6 additions and 101 deletions
|
@ -15,11 +15,11 @@ def validate_manifest(data, validator, error):
|
||||||
from bootstrapvz.common.tools import rel_path
|
from bootstrapvz.common.tools import rel_path
|
||||||
validator(data, rel_path(__file__, 'manifest-schema.yml'))
|
validator(data, rel_path(__file__, 'manifest-schema.yml'))
|
||||||
|
|
||||||
from bootstrapvz.common.releases import get_release, squeeze
|
from bootstrapvz.common.releases import get_release, wheezy
|
||||||
release = get_release(data['system']['release'])
|
release = get_release(data['system']['release'])
|
||||||
|
|
||||||
if release < squeeze:
|
if release < wheezy:
|
||||||
error('Only Debian squeeze and later is supported', ['system', 'release'])
|
error('Only Debian wheezy and later is supported', ['system', 'release'])
|
||||||
|
|
||||||
# Check the bootloader/partitioning configuration.
|
# Check the bootloader/partitioning configuration.
|
||||||
# Doing this via the schema is a pain and does not output a useful error message.
|
# Doing this via the schema is a pain and does not output a useful error message.
|
||||||
|
@ -28,9 +28,6 @@ def validate_manifest(data, validator, error):
|
||||||
if data['volume']['partitions']['type'] == 'none':
|
if data['volume']['partitions']['type'] == 'none':
|
||||||
error('Grub cannot boot from unpartitioned disks', ['system', 'bootloader'])
|
error('Grub cannot boot from unpartitioned disks', ['system', 'bootloader'])
|
||||||
|
|
||||||
if release == squeeze:
|
|
||||||
error('Grub installation on squeeze is not supported', ['system', 'bootloader'])
|
|
||||||
|
|
||||||
# Check the provided apt.conf(5) options
|
# Check the provided apt.conf(5) options
|
||||||
if 'packages' in data:
|
if 'packages' in data:
|
||||||
for name, val in data['packages'].get('apt.conf.d', {}).iteritems():
|
for name, val in data['packages'].get('apt.conf.d', {}).iteritems():
|
||||||
|
|
|
@ -25,11 +25,6 @@ class ConfigureExtlinux(Task):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from bootstrapvz.common.releases import squeeze
|
|
||||||
if info.manifest.release == squeeze:
|
|
||||||
# On squeeze /etc/default/extlinux is generated when running extlinux-update
|
|
||||||
log_check_call(['chroot', info.root,
|
|
||||||
'extlinux-update'])
|
|
||||||
from bootstrapvz.common.tools import sed_i
|
from bootstrapvz.common.tools import sed_i
|
||||||
extlinux_def = os.path.join(info.root, 'etc/default/extlinux')
|
extlinux_def = os.path.join(info.root, 'etc/default/extlinux')
|
||||||
sed_i(extlinux_def, r'^EXTLINUX_PARAMETERS="([^"]+)"$',
|
sed_i(extlinux_def, r'^EXTLINUX_PARAMETERS="([^"]+)"$',
|
||||||
|
|
|
@ -51,10 +51,7 @@ class RemoveHWClock(Task):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from bootstrapvz.common.releases import squeeze
|
|
||||||
info.initd['disable'].append('hwclock.sh')
|
info.initd['disable'].append('hwclock.sh')
|
||||||
if info.manifest.release == squeeze:
|
|
||||||
info.initd['disable'].append('hwclockfirst.sh')
|
|
||||||
|
|
||||||
|
|
||||||
class AdjustExpandRootScript(Task):
|
class AdjustExpandRootScript(Task):
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
---
|
---
|
||||||
# This is a mapping of Debian release codenames to NIC configurations
|
# This is a mapping of Debian release codenames to NIC configurations
|
||||||
squeeze: |
|
|
||||||
auto lo
|
|
||||||
iface lo inet loopback
|
|
||||||
auto eth0
|
|
||||||
iface eth0 inet dhcp
|
|
||||||
wheezy: |
|
wheezy: |
|
||||||
auto eth0
|
auto eth0
|
||||||
iface eth0 inet dhcp
|
iface eth0 inet dhcp
|
||||||
|
|
|
@ -30,12 +30,9 @@ class AddSSHKeyGeneration(Task):
|
||||||
try:
|
try:
|
||||||
log_check_call(['chroot', info.root,
|
log_check_call(['chroot', info.root,
|
||||||
'dpkg-query', '-W', 'openssh-server'])
|
'dpkg-query', '-W', 'openssh-server'])
|
||||||
from bootstrapvz.common.releases import squeeze
|
|
||||||
from bootstrapvz.common.releases import wheezy
|
from bootstrapvz.common.releases import wheezy
|
||||||
from bootstrapvz.common.releases import jessie
|
from bootstrapvz.common.releases import jessie
|
||||||
if info.manifest.release == squeeze:
|
if info.manifest.release == wheezy:
|
||||||
install['generate-ssh-hostkeys'] = os.path.join(init_scripts_dir, 'squeeze/generate-ssh-hostkeys')
|
|
||||||
elif info.manifest.release == wheezy:
|
|
||||||
install['generate-ssh-hostkeys'] = os.path.join(init_scripts_dir, 'wheezy/generate-ssh-hostkeys')
|
install['generate-ssh-hostkeys'] = os.path.join(init_scripts_dir, 'wheezy/generate-ssh-hostkeys')
|
||||||
elif info.manifest.release == jessie:
|
elif info.manifest.release == jessie:
|
||||||
install['generate-ssh-hostkeys'] = os.path.join(init_scripts_dir, 'jessie/generate-ssh-hostkeys')
|
install['generate-ssh-hostkeys'] = os.path.join(init_scripts_dir, 'jessie/generate-ssh-hostkeys')
|
||||||
|
|
|
@ -10,11 +10,7 @@ properties:
|
||||||
type: string
|
type: string
|
||||||
enum: [amd64]
|
enum: [amd64]
|
||||||
release:
|
release:
|
||||||
not:
|
|
||||||
type: string
|
type: string
|
||||||
enum:
|
|
||||||
- squeeze
|
|
||||||
- oldstable
|
|
||||||
plugins:
|
plugins:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
---
|
---
|
||||||
# This is a mapping of Debian release codenames to processor architectures to kernel packages
|
# This is a mapping of Debian release codenames to processor architectures to kernel packages
|
||||||
squeeze:
|
|
||||||
amd64: linux-image-amd64
|
|
||||||
i386: linux-image-686
|
|
||||||
wheezy:
|
wheezy:
|
||||||
amd64: linux-image-amd64
|
amd64: linux-image-amd64
|
||||||
i386: linux-image-686
|
i386: linux-image-686
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
---
|
---
|
||||||
# This is a mapping of Debian release codenames to processor architectures to kernel packages
|
# This is a mapping of Debian release codenames to processor architectures to kernel packages
|
||||||
squeeze: # In squeeze, we need a special kernel flavor for xen
|
|
||||||
amd64: linux-image-xen-amd64
|
|
||||||
i386: linux-image-xen-686
|
|
||||||
wheezy:
|
wheezy:
|
||||||
amd64: linux-image-amd64
|
amd64: linux-image-amd64
|
||||||
i386: linux-image-686
|
i386: linux-image-686
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
---
|
---
|
||||||
# This is a mapping of Debian release codenames to processor architectures to kernel packages
|
# This is a mapping of Debian release codenames to processor architectures to kernel packages
|
||||||
squeeze:
|
|
||||||
amd64: linux-image-amd64
|
|
||||||
i386: linux-image-686
|
|
||||||
wheezy:
|
wheezy:
|
||||||
amd64: linux-image-amd64
|
amd64: linux-image-amd64
|
||||||
i386: linux-image-686
|
i386: linux-image-686
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
---
|
---
|
||||||
# This is a mapping of Debian release codenames to processor architectures to kernel packages
|
# This is a mapping of Debian release codenames to processor architectures to kernel packages
|
||||||
squeeze:
|
|
||||||
amd64: linux-image-amd64
|
|
||||||
i386: linux-image-686
|
|
||||||
wheezy:
|
wheezy:
|
||||||
amd64: linux-image-amd64
|
amd64: linux-image-amd64
|
||||||
i386: linux-image-686
|
i386: linux-image-686
|
||||||
|
|
|
@ -151,7 +151,7 @@ system and does not fit under any other section.
|
||||||
Valid values: Any locale mentioned in ``/etc/locale.gen``
|
Valid values: Any locale mentioned in ``/etc/locale.gen``
|
||||||
``required``
|
``required``
|
||||||
- ``release``: Defines which debian release should be bootstrapped.
|
- ``release``: Defines which debian release should be bootstrapped.
|
||||||
Valid values: ``squeeze``, ``wheezy``, ``jessie``, ``sid``,
|
Valid values: ``wheezy``, ``jessie``, ``stretch``, ``sid``,
|
||||||
``oldstable``, ``stable``, ``testing``, ``unstable``
|
``oldstable``, ``stable``, ``testing``, ``unstable``
|
||||||
``required``
|
``required``
|
||||||
- ``timezone``: Timezone of the system.
|
- ``timezone``: Timezone of the system.
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
---
|
|
||||||
name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs
|
|
||||||
provider:
|
|
||||||
name: ec2
|
|
||||||
virtualization: pvm
|
|
||||||
# credentials:
|
|
||||||
# access-key: AFAKEACCESSKEYFORAWS
|
|
||||||
# secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva
|
|
||||||
description: Debian {system.release} {system.architecture}
|
|
||||||
bootstrapper:
|
|
||||||
workspace: /target
|
|
||||||
system:
|
|
||||||
release: squeeze
|
|
||||||
architecture: amd64
|
|
||||||
bootloader: pvgrub
|
|
||||||
charmap: UTF-8
|
|
||||||
locale: en_US
|
|
||||||
timezone: UTC
|
|
||||||
volume:
|
|
||||||
backing: ebs
|
|
||||||
partitions:
|
|
||||||
type: none
|
|
||||||
root:
|
|
||||||
filesystem: ext4
|
|
||||||
size: 8GiB
|
|
||||||
packages:
|
|
||||||
mirror: http://cloudfront.debian.net/debian
|
|
||||||
plugins:
|
|
||||||
admin_user:
|
|
||||||
username: admin
|
|
|
@ -1,30 +0,0 @@
|
||||||
---
|
|
||||||
name: debian-{system.release}-{system.architecture}-{provider.virtualization}-{%Y}-{%m}-{%d}-ebs
|
|
||||||
provider:
|
|
||||||
name: ec2
|
|
||||||
virtualization: pvm
|
|
||||||
# credentials:
|
|
||||||
# access-key: AFAKEACCESSKEYFORAWS
|
|
||||||
# secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva
|
|
||||||
description: Debian {system.release} {system.architecture}
|
|
||||||
bootstrapper:
|
|
||||||
workspace: /target
|
|
||||||
system:
|
|
||||||
release: squeeze
|
|
||||||
architecture: i386
|
|
||||||
bootloader: pvgrub
|
|
||||||
charmap: UTF-8
|
|
||||||
locale: en_US
|
|
||||||
timezone: UTC
|
|
||||||
volume:
|
|
||||||
backing: ebs
|
|
||||||
partitions:
|
|
||||||
type: none
|
|
||||||
root:
|
|
||||||
filesystem: ext4
|
|
||||||
size: 8GiB
|
|
||||||
packages:
|
|
||||||
mirror: http://cloudfront.debian.net/debian
|
|
||||||
plugins:
|
|
||||||
admin_user:
|
|
||||||
username: admin
|
|
Loading…
Add table
Reference in a new issue