Merge pull request #496 from andrewbogott/busterfixes

Busterfixes
This commit is contained in:
Anders Ingemann 2019-03-06 00:16:47 +01:00 committed by GitHub
commit 568f994367
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 136 additions and 2 deletions

View file

@ -14,6 +14,7 @@ properties:
- jessie - jessie
- stable - stable
- stretch - stretch
- buster
- testing - testing
- sid - sid
- unstable - unstable

View file

@ -3,10 +3,11 @@ from bootstrapvz.base import Task
from bootstrapvz.common import phases from bootstrapvz.common import phases
from bootstrapvz.common.tasks import apt from bootstrapvz.common.tasks import apt
from bootstrapvz.common.exceptions import TaskError from bootstrapvz.common.exceptions import TaskError
from bootstrapvz.common.releases import jessie, wheezy, stretch from bootstrapvz.common.releases import jessie, wheezy, stretch, buster
from bootstrapvz.common.tools import sed_i, log_check_call, rel_path from bootstrapvz.common.tools import sed_i, log_check_call, rel_path
ASSETS_DIR_BUSTER = rel_path(__file__, 'assets/gpg-keyrings-PC1/buster')
ASSETS_DIR_STRETCH = rel_path(__file__, 'assets/gpg-keyrings-PC1/stretch') ASSETS_DIR_STRETCH = rel_path(__file__, 'assets/gpg-keyrings-PC1/stretch')
ASSETS_DIR_JESSIE = rel_path(__file__, 'assets/gpg-keyrings-PC1/jessie') ASSETS_DIR_JESSIE = rel_path(__file__, 'assets/gpg-keyrings-PC1/jessie')
ASSETS_DIR_WHEEZY = rel_path(__file__, 'assets/gpg-keyrings-PC1/wheezy') ASSETS_DIR_WHEEZY = rel_path(__file__, 'assets/gpg-keyrings-PC1/wheezy')
@ -18,7 +19,7 @@ class CheckRequestedDebianRelease(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
if info.manifest.release not in (jessie, wheezy, stretch): if info.manifest.release not in (jessie, wheezy, stretch, buster):
msg = 'Debian {info.manifest.release} is not (yet) available in the Puppetlabs.com APT repository.' msg = 'Debian {info.manifest.release} is not (yet) available in the Puppetlabs.com APT repository.'
raise TaskError(msg) raise TaskError(msg)
@ -63,6 +64,8 @@ class InstallPuppetlabsPC1ReleaseKey(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
from shutil import copy from shutil import copy
if (info.manifest.release == buster):
key_path = os.path.join(ASSETS_DIR_BUSTER, 'puppetlabs-pc1-keyring.gpg')
if (info.manifest.release == stretch): if (info.manifest.release == stretch):
key_path = os.path.join(ASSETS_DIR_STRETCH, 'puppetlabs-pc1-keyring.gpg') key_path = os.path.join(ASSETS_DIR_STRETCH, 'puppetlabs-pc1-keyring.gpg')
if (info.manifest.release == jessie): if (info.manifest.release == jessie):
@ -79,6 +82,8 @@ class AddPuppetlabsPC1SourcesList(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
if (info.manifest.release == buster):
info.source_lists.add('puppetlabs', 'deb http://apt.puppetlabs.com buster PC1')
if (info.manifest.release == stretch): if (info.manifest.release == stretch):
info.source_lists.add('puppetlabs', 'deb http://apt.puppetlabs.com stretch PC1') info.source_lists.add('puppetlabs', 'deb http://apt.puppetlabs.com stretch PC1')
if (info.manifest.release == jessie): if (info.manifest.release == jessie):

View file

@ -11,6 +11,10 @@ stretch:
amd64: linux-image-amd64 amd64: linux-image-amd64
i386: linux-image-686-pae i386: linux-image-686-pae
arm64: linux-image-arm64 arm64: linux-image-arm64
buster:
amd64: linux-image-amd64
i386: linux-image-686-pae
arm64: linux-image-arm64
sid: sid:
amd64: linux-image-amd64 amd64: linux-image-amd64
i386: linux-image-686-pae i386: linux-image-686-pae

View file

@ -0,0 +1,48 @@
---
name: debian-{system.release}-{system.architecture}-{%Y}{%m}{%d}
provider:
name: kvm
virtio:
- virtio
- virtio_pci
- virtio_balloon
- virtio_blk
- virtio_net
- virtio_ring
console: virtual
bootstrapper:
workspace: /target
system:
release: stretch
architecture: amd64
bootloader: grub
charmap: UTF-8
locale: en_US
timezone: UTC
packages:
components:
- main
- contrib
- non-free
install_standard: true
install:
- task-ssh-server
- cloud-init
- cloud-utils
volume:
backing: qcow2
partitions:
type: msdos
root:
filesystem: ext4
size: 2GiB
mountopts:
- defaults
- noatime
- errors=remount-ro
plugins:
minimize_size:
zerofree: true
shrink: qemu-img
apt:
autoclean: true

View file

@ -0,0 +1,29 @@
---
name: debian-{system.release}-{system.architecture}-{%Y}{%m}{%d}
provider:
name: kvm
virtio:
- virtio_blk
- virtio_net
- virtio_ring
console: virtual
bootstrapper:
workspace: /target
system:
release: stretch
architecture: amd64
bootloader: grub
charmap: UTF-8
locale: en_US
timezone: UTC
volume:
backing: raw
partitions:
type: msdos
root:
filesystem: ext4
size: 2GiB
mountopts:
- defaults
- noatime
- errors=remount-ro

View file

@ -0,0 +1,47 @@
---
name: debian-{system.release}-{system.architecture}-{%Y}{%m}{%d}
provider:
name: kvm
virtio:
- virtio_pci
- virtio_blk
bootstrapper:
workspace: /target
system:
release: stretch
architecture: amd64
bootloader: grub
charmap: UTF-8
locale: en_US
timezone: UTC
volume:
backing: raw
partitions:
type: gpt
boot:
filesystem: ext2
size: 1GiB
swap:
size: 128MiB
root:
filesystem: ext4
size: 8GiB
tmp:
mountopts:
- nodev
- noexec
- nosuid
- journal_ioprio=3
filesystem: ext4
size: 1GiB
mode: '1777'
var:
filesystem: ext4
size: 1GiB
var/tmp:
filesystem: ext4
size: 1GiB
plugins:
root_password:
password: test