From 2d87a01a4ac16cdbb56eb72a6071b719bd614b70 Mon Sep 17 00:00:00 2001 From: Inga Piass Date: Wed, 21 May 2025 19:39:28 +0300 Subject: [PATCH] Update Debian templates Debian 11 and 12 now use other cloud-init configuration to be unified with other distros. Adapt templates accordingly, so all neccessary tools will present in the virtual machines. Drop Debian 10 support. --- debian/packages-11.sh | 14 +++++ debian/{packages.sh => packages-12.sh} | 6 ++- debian/solusvm2-debian-10.json | 72 -------------------------- debian/solusvm2-debian-11.json | 8 +-- debian/solusvm2-debian-12.json | 4 +- 5 files changed, 24 insertions(+), 80 deletions(-) create mode 100644 debian/packages-11.sh rename debian/{packages.sh => packages-12.sh} (66%) delete mode 100644 debian/solusvm2-debian-10.json diff --git a/debian/packages-11.sh b/debian/packages-11.sh new file mode 100644 index 0000000..144b967 --- /dev/null +++ b/debian/packages-11.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -euxo pipefail + +PACKAGES=" +cloud-init-22.4.2 +cloud-utils +qemu-guest-agent +netcat-openbsd +net-tools +resolvconf +" +apt-get install -y --no-install-recommends ${PACKAGES} +systemctl enable qemu-guest-agent diff --git a/debian/packages.sh b/debian/packages-12.sh similarity index 66% rename from debian/packages.sh rename to debian/packages-12.sh index 446b906..0e85f87 100644 --- a/debian/packages.sh +++ b/debian/packages-12.sh @@ -6,7 +6,9 @@ PACKAGES=" cloud-init cloud-utils qemu-guest-agent -systemd-resolved +netcat-openbsd +net-tools +resolvconf " apt-get install -y --no-install-recommends ${PACKAGES} -systemctl enable qemu-guest-agent systemd-resolved +systemctl enable qemu-guest-agent diff --git a/debian/solusvm2-debian-10.json b/debian/solusvm2-debian-10.json deleted file mode 100644 index 479060c..0000000 --- a/debian/solusvm2-debian-10.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "variables": { - "user": "root", - "password": "root", - "disk_size": "3000", - "output_directory": "output/debian", - "output_image_name": "solus-debian-10" - }, - - "builders": [ - { - "name": "solusvm2", - "vm_name": "{{user `output_image_name`}}.qcow2", - "type": "qemu", - "qemuargs": [ - [ "-m", "3072m" ] - ], - "format": "qcow2", - "headless": true, - "accelerator": "kvm", - "disk_size": "{{ user `disk_size` }}", - "iso_url": "https://cdimage.debian.org/cdimage/archive/10.12.0/amd64/iso-cd/debian-10.12.0-amd64-netinst.iso", - "iso_checksum": "file:https://cdimage.debian.org/cdimage/archive/10.12.0/amd64/iso-cd/SHA256SUMS", - "output_directory": "{{user `output_directory`}}", - "shutdown_command": "/sbin/shutdown -hP now", - "http_directory": "debian/http", - "ssh_username": "{{ user `user` }}", - "ssh_password": "{{ user `password` }}", - "disk_compression": true, - "host_port_min" : 2222, - "host_port_max" : 4444, - "vnc_port_min": 5901, - "vnc_port_max": 5901, - "http_port_min": 8501, - "http_port_max": 8501, - "ssh_wait_timeout": "40m", - "net_device": "virtio-net", - "disk_interface": "virtio", - "vnc_bind_address": "0.0.0.0", - "boot_wait": "10s", - "boot_command": [ - "", - "install ", - " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian-10.cfg ", - "debian-installer=en_US.UTF-8 ", - "auto ", - "locale=en_US.UTF-8 ", - "kbd-chooser/method=us ", - "keyboard-configuration/xkb-keymap=us ", - "netcfg/get_hostname=localhost ", - "netcfg/get_domain=localdomain ", - "fb=false ", - "debconf/frontend=noninteractive ", - "console-setup/ask_detect=false ", - "console-keymaps-at/keymap=us ", - "grub-installer/bootdev=/dev/vda ", - "" - ] - } - ], - - "provisioners": [ - { - "type": "shell", - "execute_command": "echo '{{ user `password` }}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'", - "scripts": [ - "debian/packages.sh", - "debian/cleanup.sh" - ] - } - ] -} diff --git a/debian/solusvm2-debian-11.json b/debian/solusvm2-debian-11.json index 877db46..598154e 100644 --- a/debian/solusvm2-debian-11.json +++ b/debian/solusvm2-debian-11.json @@ -4,7 +4,7 @@ "password": "root", "disk_size": "4000", "output_directory": "output/debian", - "output_image_name": "solus-debian-11" + "output_image_name": "solusvm2-debian-11" }, "builders": [ @@ -19,8 +19,8 @@ "headless": true, "accelerator": "kvm", "disk_size": "{{ user `disk_size` }}", - "iso_url": "https://cdimage.debian.org/cdimage/release/current/amd64/iso-cd/debian-11.6.0-amd64-netinst.iso", - "iso_checksum": "file:https://cdimage.debian.org/cdimage/release/current/amd64/iso-cd/SHA256SUMS", + "iso_url": "https://cdimage.debian.org/cdimage/archive/11.6.0/amd64/iso-cd/debian-11.6.0-amd64-netinst.iso", + "iso_checksum": "file:https://cdimage.debian.org/cdimage/archive/11.6.0/amd64/iso-cd/SHA256SUMS", "output_directory": "{{user `output_directory`}}", "shutdown_command": "/sbin/shutdown -hP now", "http_directory": "debian/http", @@ -64,7 +64,7 @@ "type": "shell", "execute_command": "echo '{{ user `password` }}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'", "scripts": [ - "debian/packages.sh", + "debian/packages-11.sh", "debian/cleanup.sh" ] } diff --git a/debian/solusvm2-debian-12.json b/debian/solusvm2-debian-12.json index 080fd20..1b8f7df 100644 --- a/debian/solusvm2-debian-12.json +++ b/debian/solusvm2-debian-12.json @@ -19,7 +19,7 @@ "headless": true, "accelerator": "kvm", "disk_size": "{{ user `disk_size` }}", - "iso_url": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.0.0-amd64-netinst.iso", + "iso_url": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.11.0-amd64-netinst.iso", "iso_checksum": "file:https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA256SUMS", "output_directory": "{{user `output_directory`}}", "shutdown_command": "/sbin/shutdown -hP now", @@ -64,7 +64,7 @@ "type": "shell", "execute_command": "echo '{{ user `password` }}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'", "scripts": [ - "debian/packages.sh", + "debian/packages-12.sh", "debian/cleanup.sh" ] }