From 33574c86eab25bd85db00948f20a2d9e5b70292c Mon Sep 17 00:00:00 2001 From: andrewbogott Date: Mon, 4 Mar 2019 01:17:04 -0600 Subject: [PATCH 1/4] kvm: support buster targets --- bootstrapvz/providers/kvm/tasks/packages-kernels.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootstrapvz/providers/kvm/tasks/packages-kernels.yml b/bootstrapvz/providers/kvm/tasks/packages-kernels.yml index 25635d5..82b8c2b 100644 --- a/bootstrapvz/providers/kvm/tasks/packages-kernels.yml +++ b/bootstrapvz/providers/kvm/tasks/packages-kernels.yml @@ -11,6 +11,10 @@ stretch: amd64: linux-image-amd64 i386: linux-image-686-pae arm64: linux-image-arm64 +buster: + amd64: linux-image-amd64 + i386: linux-image-686-pae + arm64: linux-image-arm64 sid: amd64: linux-image-amd64 i386: linux-image-686-pae From 64aeeadbdb9447d99de52f8aa481c366d770d8ed Mon Sep 17 00:00:00 2001 From: andrewbogott Date: Mon, 4 Mar 2019 01:17:25 -0600 Subject: [PATCH 2/4] cloud_init: allow buster as a target --- bootstrapvz/plugins/cloud_init/manifest-schema.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrapvz/plugins/cloud_init/manifest-schema.yml b/bootstrapvz/plugins/cloud_init/manifest-schema.yml index 0f2a706..dde0974 100644 --- a/bootstrapvz/plugins/cloud_init/manifest-schema.yml +++ b/bootstrapvz/plugins/cloud_init/manifest-schema.yml @@ -14,6 +14,7 @@ properties: - jessie - stable - stretch + - buster - testing - sid - unstable From 0d0e3e5513ea88e7f7a6ac9e4c2f84784c993398 Mon Sep 17 00:00:00 2001 From: andrewbogott Date: Mon, 4 Mar 2019 01:17:47 -0600 Subject: [PATCH 3/4] Puppet plugin: support Debian Buster Note that the puppetlabs upstream repo doesn't actually have buster builds yet, so this patch won't work until they do that. --- bootstrapvz/plugins/puppet/tasks.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bootstrapvz/plugins/puppet/tasks.py b/bootstrapvz/plugins/puppet/tasks.py index 28ad810..6de8951 100644 --- a/bootstrapvz/plugins/puppet/tasks.py +++ b/bootstrapvz/plugins/puppet/tasks.py @@ -3,10 +3,11 @@ from bootstrapvz.base import Task from bootstrapvz.common import phases from bootstrapvz.common.tasks import apt 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 +ASSETS_DIR_BUSTER = rel_path(__file__, 'assets/gpg-keyrings-PC1/buster') ASSETS_DIR_STRETCH = rel_path(__file__, 'assets/gpg-keyrings-PC1/stretch') ASSETS_DIR_JESSIE = rel_path(__file__, 'assets/gpg-keyrings-PC1/jessie') ASSETS_DIR_WHEEZY = rel_path(__file__, 'assets/gpg-keyrings-PC1/wheezy') @@ -18,7 +19,7 @@ class CheckRequestedDebianRelease(Task): @classmethod 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.' raise TaskError(msg) @@ -63,6 +64,8 @@ class InstallPuppetlabsPC1ReleaseKey(Task): @classmethod def run(cls, info): 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): key_path = os.path.join(ASSETS_DIR_STRETCH, 'puppetlabs-pc1-keyring.gpg') if (info.manifest.release == jessie): @@ -79,6 +82,8 @@ class AddPuppetlabsPC1SourcesList(Task): @classmethod 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): info.source_lists.add('puppetlabs', 'deb http://apt.puppetlabs.com stretch PC1') if (info.manifest.release == jessie): From 4ecfa66b3a70b5e65013eba5fc739ebe4ce504d2 Mon Sep 17 00:00:00 2001 From: Andrew Bogott Date: Tue, 5 Mar 2019 21:46:03 +0000 Subject: [PATCH 4/4] Added some cursory buster/kvm example manifests --- manifests/examples/kvm/buster-cloudimg.yml | 48 +++++++++++++++++++ manifests/examples/kvm/buster-console.yml | 29 +++++++++++ .../examples/kvm/buster-virtio-partitions.yml | 47 ++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 manifests/examples/kvm/buster-cloudimg.yml create mode 100644 manifests/examples/kvm/buster-console.yml create mode 100644 manifests/examples/kvm/buster-virtio-partitions.yml diff --git a/manifests/examples/kvm/buster-cloudimg.yml b/manifests/examples/kvm/buster-cloudimg.yml new file mode 100644 index 0000000..98cc366 --- /dev/null +++ b/manifests/examples/kvm/buster-cloudimg.yml @@ -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 diff --git a/manifests/examples/kvm/buster-console.yml b/manifests/examples/kvm/buster-console.yml new file mode 100644 index 0000000..4ab74e0 --- /dev/null +++ b/manifests/examples/kvm/buster-console.yml @@ -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 diff --git a/manifests/examples/kvm/buster-virtio-partitions.yml b/manifests/examples/kvm/buster-virtio-partitions.yml new file mode 100644 index 0000000..d5803d3 --- /dev/null +++ b/manifests/examples/kvm/buster-virtio-partitions.yml @@ -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