Merge branch '2024-11-updates' into 'main'
2024 11 updates Closes #18 See merge request greg/vms!13
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
distro = "alpine"
|
||||
version = "3.19.0"
|
||||
iso = {
|
||||
url = "http://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-extended-3.19.2-x86_64.iso"
|
||||
checksum = "508944822217be4c2c7b947a64220271055b1883a025e5cb351950b27f046a15"
|
||||
url = "http://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-extended-3.19.4-x86_64.iso"
|
||||
checksum = "1b7efcb485ec5ce6f662782ba318a8a75b33be07188b6da0e005e03744afe3c1"
|
||||
}
|
||||
boot_command = [
|
||||
"root<enter><wait1>",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
distro = "alpine"
|
||||
version = "3.20"
|
||||
iso = {
|
||||
url = "http://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-standard-3.20.1-x86_64.iso"
|
||||
checksum = "c3043af6421b6e0ab22994b01d10785728888b37d976a754f12f23b42aecd95e"
|
||||
url = "http://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-standard-3.20.3-x86_64.iso"
|
||||
checksum = "c66fc1e0470781f8ecbab8eb9cc8d906066171a5e0c6c1ab20aedc7061836d27"
|
||||
}
|
||||
boot_command = [
|
||||
"root<enter><wait1>",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
distro = "archlinux"
|
||||
version = "rolling"
|
||||
iso = {
|
||||
url = "http://mirror.rackspace.com/archlinux/iso/2024.06.01/archlinux-2024.06.01-x86_64.iso"
|
||||
checksum = "4cc7e1c9f4e97b384f0d8731f317b5995bde256fcc17160d32359cab923c5892"
|
||||
url = "http://mirror.rackspace.com/archlinux/iso/2024.11.01/archlinux-2024.11.01-x86_64.iso"
|
||||
checksum = "bceb3dded8935c1d3521c475a69ae557e082839b46d921c8b400524470b5c965"
|
||||
}
|
||||
boot_command = [
|
||||
"e<down><down><down><end> net.ifnames=0 biosdevnames=0 <enter>",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
distro = "debian"
|
||||
version = "11"
|
||||
iso = {
|
||||
url = "https://cdimage.debian.org/cdimage/archive/11.9.0/amd64/iso-cd/debian-11.9.0-amd64-netinst.iso"
|
||||
checksum = "01c540225250d42cda3809d7130d0c27e934c8aca260d01a86d33dee19623b0f"
|
||||
url = "https://cdimage.debian.org/cdimage/archive/11.11.0/amd64/iso-cd/debian-11.11.0-amd64-netinst.iso"
|
||||
checksum = "cd5b2a6fc22050affa1d141adb3857af07e94ff886dca1ce17214e2761a3b316"
|
||||
}
|
||||
boot_command = [
|
||||
"<down>e<wait><down><down><down><end><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
distro = "debian"
|
||||
version = "12"
|
||||
iso = {
|
||||
url = "http://cdimage.debian.org/cdimage/release/12.6.0/amd64/iso-cd/debian-12.6.0-amd64-netinst.iso"
|
||||
checksum = "ade3a4acc465f59ca2496344aab72455945f3277a52afc5a2cae88cdc370fa12"
|
||||
url = "http://cdimage.debian.org/cdimage/release/12.8.0/amd64/iso-cd/debian-12.8.0-amd64-netinst.iso"
|
||||
checksum = "04396d12b0f377958a070c38a923c227832fa3b3e18ddc013936ecf492e9fbb3"
|
||||
}
|
||||
boot_command = [
|
||||
"<down>e<wait><down><down><down><end><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
user --name=vagrant --password=vagrant
|
||||
rootpw --plaintext vagrant
|
||||
|
||||
text # don't use cmdline -- https://github.com/rhinstaller/anaconda/issues/931
|
||||
lang en_US.UTF-8
|
||||
keyboard us
|
||||
timezone --utc Etc/UTC
|
||||
|
||||
selinux --enforcing
|
||||
|
||||
firewall --disabled
|
||||
|
||||
# We pass net.ifnames=0 because we always want to use eth0 here on all the cloud images.
|
||||
bootloader --timeout=1 --location=mbr --append="no_timer_check net.ifnames=0 console=tty1 console=ttyS0,115200n8 biosdevnames=0"
|
||||
|
||||
services --enabled=sshd
|
||||
|
||||
# Configure for gpt with bios+uefi
|
||||
clearpart --all --initlabel --disklabel=gpt
|
||||
part prepboot --size=4 --fstype=prepboot
|
||||
part biosboot --size=1 --fstype=biosboot
|
||||
part /boot/efi --size=100 --fstype=efi
|
||||
part /boot --size=1000 --fstype=ext4 --label=boot
|
||||
part btrfs.007 --size=2000 --fstype=btrfs --grow
|
||||
btrfs none --label=fedora btrfs.007
|
||||
btrfs /home --subvol --name=home LABEL=fedora
|
||||
btrfs / --subvol --name=root LABEL=fedora
|
||||
|
||||
repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
|
||||
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
|
||||
url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
|
||||
|
||||
reboot
|
||||
|
||||
##### begin package list #############################################
|
||||
%packages --instLangs=en
|
||||
|
||||
# Include packages for the cloud-server-environment group
|
||||
@^cloud-server-environment
|
||||
|
||||
# Install the tracer dnf plugin to enable automatic reboots
|
||||
# IF the user requests package updates
|
||||
# AND requests a reboot
|
||||
# AND the packages updated require a reboot.
|
||||
# https://fedoraproject.org/wiki/Changes/Automatic_Cloud_Reboot_On_Updates
|
||||
python3-dnf-plugin-tracer
|
||||
|
||||
# Don't include the kernel toplevel package since it pulls in
|
||||
# kernel-modules. We're happy for now with kernel-core.
|
||||
-kernel
|
||||
kernel-core
|
||||
|
||||
# Don't include dracut-config-rescue. It will have dracut generate a
|
||||
# "rescue" entry in the grub menu, but that also means there is a
|
||||
# rescue kernel and initramfs that get created, which (currently) add
|
||||
# about another 40MiB to the /boot/ partition. Also the "rescue" mode
|
||||
# is generally not useful in the cloud.
|
||||
-dracut-config-rescue
|
||||
|
||||
# Plymouth provides a graphical boot animation. In the cloud we don't
|
||||
# need a graphical boot animation. This also means anaconda won't put
|
||||
# rhgb/quiet on kernel command line
|
||||
-plymouth
|
||||
|
||||
# Install qemu-guest-agent https://pagure.io/cloud-sig/issue/319 To
|
||||
# improve the integration with OpenStack and other VM management
|
||||
# systems (oVirt, KubeVirt).
|
||||
qemu-guest-agent
|
||||
|
||||
|
||||
# No need for firewalld for now. We don't have a firewall on by default.
|
||||
-firewalld
|
||||
|
||||
# Don't include the geolite2 databases, which end up with 66MiB
|
||||
# in /usr/share/GeoIP
|
||||
-geolite2-country
|
||||
-geolite2-city
|
||||
|
||||
# Specific to vagrant
|
||||
rsync
|
||||
fuse-sshfs
|
||||
%end
|
||||
##### end package list ###############################################
|
||||
|
||||
|
||||
##### begin kickstart post ###########################################
|
||||
%post --erroronfail
|
||||
#!/bin/bash
|
||||
set -x
|
||||
if [ -e /dev/vda ]; then
|
||||
device="/dev/vda"
|
||||
elif [ -e /dev/sda ]; then
|
||||
device="/dev/sda"
|
||||
else
|
||||
echo "No device found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
virt="$(systemd-detect-virt)"
|
||||
if [ "${virt}" == "microsoft" ]; then
|
||||
dnf install -y hyperv-daemons
|
||||
systemctl enable hpervfcopyd
|
||||
systemctl enable hypervkvpd
|
||||
systemctl enable hypervvssd
|
||||
fi
|
||||
|
||||
if [ "$(arch)" = "x86_64" ]; then
|
||||
# Set up legacy BIOS boot if we booted from UEFI
|
||||
grub2-install --target=i386-pc "${device}"
|
||||
fi
|
||||
|
||||
# Blivet sets pmbr_boot flag erroneously and we need to purge it
|
||||
# otherwise it'll fail to boot
|
||||
parted "${device}" disk_set pmbr_boot off
|
||||
|
||||
# linux-firmware is installed by default and is quite large. As of mid 2020:
|
||||
# Total download size: 97 M
|
||||
# Installed size: 268 M
|
||||
# So far we've been fine shipping without it so let's continue.
|
||||
# More discussion about this in #1234504.
|
||||
echo "Removing linux-firmware package."
|
||||
rpm -e linux-firmware
|
||||
|
||||
# See the systemd-random-seed.service man page that says:
|
||||
# " It is recommended to remove the random seed from OS images intended
|
||||
# for replication on multiple systems"
|
||||
echo "Removing random-seed so it's not the same in every image."
|
||||
rm -f /var/lib/systemd/random-seed
|
||||
|
||||
echo "Import RPM GPG key"
|
||||
releasever=$(rpm --eval '%{fedora}')
|
||||
basearch=$(uname -i)
|
||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||
|
||||
echo "Zeroing out empty space."
|
||||
# Create zeros file with nodatacow and no compression
|
||||
touch /var/tmp/zeros
|
||||
chattr +C /var/tmp/zeros
|
||||
# This forces the filesystem to reclaim space from deleted files
|
||||
dd bs=1M if=/dev/zero of=/var/tmp/zeros || :
|
||||
echo "(Don't worry -- that out-of-space error was expected.)"
|
||||
# Force sync to disk (Cf. https://pagure.io/cloud-sig/issue/340#comment-743430)
|
||||
btrfs filesystem sync /
|
||||
rm -f /var/tmp/zeros
|
||||
btrfs filesystem sync /
|
||||
|
||||
# When we build the image a networking config file gets left behind.
|
||||
# Let's clean it up.
|
||||
echo "Cleanup leftover networking configuration"
|
||||
rm -f /etc/NetworkManager/system-connections/*.nmconnection
|
||||
#*/
|
||||
|
||||
# Truncate the /etc/resolv.conf left over from NetworkManager during the
|
||||
# kickstart. This causes delays in boot with cloud-init because the
|
||||
# 192.168.122.1 DNS server cannot be reached.
|
||||
truncate -s 0 /etc/resolv.conf
|
||||
|
||||
# Clear machine-id on pre generated images
|
||||
truncate -s 0 /etc/machine-id
|
||||
|
||||
# Vagrant setup
|
||||
sed -i 's,Defaults\\s*requiretty,Defaults !requiretty,' /etc/sudoers
|
||||
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant-nopasswd
|
||||
sed -i 's/.*UseDNS.*/UseDNS no/' /etc/ssh/sshd_config
|
||||
|
||||
cat > /etc/ssh/sshd_config.d/10-vagrant-insecure-rsa-key.conf <<EOF
|
||||
# For now the vagrant insecure key is an rsa key
|
||||
# htfedoratps://github.com/hashicorp/vagrant/issues/11783
|
||||
PubkeyAcceptedKeyTypes=+ssh-rsa
|
||||
EOF
|
||||
|
||||
ssh-keygen -A
|
||||
|
||||
mkdir -m 0700 -p /home/vagrant/.ssh/
|
||||
curl -L -o /home/vagrant/.ssh/authorized_keys "https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub"
|
||||
chown -R vagrant:vagrant /home/vagrant/.ssh
|
||||
chmod 600 /home/vagrant/.ssh/authorized_keys
|
||||
chcon -R unconfined_u:object_r:user_home_t:s0 /home/vagrant/.ssh
|
||||
|
||||
%end
|
||||
##### end kickstart post ############################################
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
distro = "fedora"
|
||||
version = "41"
|
||||
iso = {
|
||||
url = "https://download.fedoraproject.org/pub/fedora/linux/releases/41/Server/x86_64/iso/Fedora-Server-dvd-x86_64-41-1.4.iso"
|
||||
checksum = "6037e489103401a6ad4e54a4bcb2df7525693bdc3f2ce4aa895838b65647e551"
|
||||
}
|
||||
boot_command = [
|
||||
"<up>e<down><down><end> ",
|
||||
"net.ifnames=0 biosdevnames=0 inst.ks=cdrom:/amd64-ks.cfg inst.notmux <f10>"
|
||||
]
|
||||
cd_files = [
|
||||
"distros/fedora/41/*.cfg"
|
||||
]
|
||||
vbox_os_type = "Fedora_64"
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf -y update
|
||||
|
||||
dnf clean all
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y qemu-guest-agent
|
||||
systemctl start qemu-guest-agent
|
||||
systemctl enable qemu-guest-agent
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y virtualbox-guest-additions
|
||||
systemctl start vboxservice
|
||||
systemctl enable vboxservice
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
dnf install -y open-vm-tools
|
||||
@@ -14,6 +14,10 @@
|
||||
version = "40";
|
||||
arch = "amd64";
|
||||
eol = false;
|
||||
} {
|
||||
version = "41";
|
||||
arch = "amd64";
|
||||
eol = false;
|
||||
} {
|
||||
version = "rawhide";
|
||||
arch = "amd64";
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
distro = "opensuse"
|
||||
version = "16.0"
|
||||
iso = {
|
||||
url = "https://download.opensuse.org/distribution/leap/16.0/installer/iso/agama-installer-Leap.x86_64-16.0.0-Leap-Build49.1.iso"
|
||||
checksum = "e930c07476556481fbe15c1e471c20a04bb06f3daea6e2431b0a77a852261dc9"
|
||||
}
|
||||
boot_command = [
|
||||
"e<wait>",
|
||||
"<down><down><down><down><end><wait>",
|
||||
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
|
||||
" agama.auto=http://{{ .HTTPIP }}:{{ .HTTPPort }}/profile.jsonnet<wait>",
|
||||
"<leftCtrlOn>x<leftCtrlOff>"
|
||||
]
|
||||
boot_wait = "8s"
|
||||
http_directory = "distros/opensuse/16.0/http/"
|
||||
vbox_os_type = "OpenSUSE_Leap_64"
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
zypper clean -a
|
||||
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE profile>
|
||||
<!-- https://doc.opensuse.org/projects/autoyast/#CreateProfile-General -->
|
||||
<profile xmlns="http://www.suse.com/1.0/yast2ns"
|
||||
xmlns:config="http://www.suse.com/1.0/configns">
|
||||
<general>
|
||||
<mode>
|
||||
<confirm config:type="boolean">false</confirm>
|
||||
<final_reboot config:type="boolean">true</final_reboot>
|
||||
</mode>
|
||||
</general>
|
||||
<groups config:type="list">
|
||||
<group>
|
||||
<groupname>wheel</groupname>
|
||||
<userlist>vagrant</userlist>
|
||||
</group>
|
||||
<group>
|
||||
<groupname>vagrant</groupname>
|
||||
<userlist>vagrant</userlist>
|
||||
</group>
|
||||
</groups>
|
||||
<firewall>
|
||||
<enable_firewall config:type="boolean">true</enable_firewall>
|
||||
<default_zone>external</default_zone>
|
||||
<zones config:type="list">
|
||||
<zone>
|
||||
<name>public</name>
|
||||
<interfaces config:type="list">
|
||||
<interface>eth0</interface>
|
||||
</interfaces>
|
||||
<services config:type="list">
|
||||
<service>ssh</service>
|
||||
</services>
|
||||
</zone>
|
||||
</zones>
|
||||
</firewall>
|
||||
<partitioning config:type="list">
|
||||
<drive>
|
||||
<use>all</use>
|
||||
<partitions config:type="list">
|
||||
<partition>
|
||||
<mount>/boot</mount>
|
||||
<size>512MiB</size>
|
||||
</partition>
|
||||
<partition>
|
||||
<mount>/</mount>
|
||||
<size>max</size>
|
||||
</partition>
|
||||
</partitions>
|
||||
</drive>
|
||||
</partitioning>
|
||||
<language>
|
||||
<language>en_US</language>
|
||||
</language>
|
||||
<networking>
|
||||
<backend>network_manager</backend>
|
||||
</networking>
|
||||
<services-manager>
|
||||
<services>
|
||||
<enable config:type="list">
|
||||
<service>sshd</service>
|
||||
</enable>
|
||||
</services>
|
||||
</services-manager>
|
||||
<software>
|
||||
<packages config:type="list">
|
||||
<package>openssh</package>
|
||||
<package>sudo</package>
|
||||
</packages>
|
||||
<do_online_update config:type="boolean">true</do_online_update>
|
||||
<install_recommended config:type="boolean">false</install_recommended>
|
||||
</software>
|
||||
<timezone>
|
||||
<hwclock>UTC</hwclock>
|
||||
<timezone>UTC</timezone>
|
||||
</timezone>
|
||||
<users config:type="list">
|
||||
<user>
|
||||
<username>root</username>
|
||||
<user_password>vagrant</user_password>
|
||||
<encrypted config:type="boolean">false</encrypted>
|
||||
</user>
|
||||
<user>
|
||||
<username>vagrant</username>
|
||||
<user_password>vagrant</user_password>
|
||||
<encrypted config:type="boolean">false</encrypted>
|
||||
</user>
|
||||
</users>
|
||||
<scripts>
|
||||
<pre-scripts config:type="list">
|
||||
<script>
|
||||
<interpreter>shell</interpreter>
|
||||
<filename>start.sh</filename>
|
||||
<!-- <location>some_url</location> -->
|
||||
<source>
|
||||
<![CDATA[
|
||||
#!/bin/sh
|
||||
echo "Starting installation"
|
||||
exit 0
|
||||
]]>
|
||||
</source>
|
||||
</script>
|
||||
</pre-scripts>
|
||||
</scripts>
|
||||
<files config:type="list">
|
||||
<file>
|
||||
<file_path>/etc/sudoers.d/vagrant</file_path>
|
||||
<file_contents>
|
||||
<![CDATA[
|
||||
Defaults:vagrant !requiretty
|
||||
vagrant ALL=(ALL) NOPASSWD: ALL
|
||||
root ALL=(ALL) NOPASSWD: ALL
|
||||
]]>
|
||||
</file_contents>
|
||||
<file_permissions>440</file_permissions>
|
||||
<file_owner>root</file_owner>
|
||||
</file>
|
||||
<file>
|
||||
<file_path>/home/vagrant/.ssh/authorized_keys</file_path>
|
||||
<file_permissions>600</file_permissions>
|
||||
<file_owner>vagrant</file_owner>
|
||||
<file_location>https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub</file_location>
|
||||
</file>
|
||||
</files>
|
||||
</profile>
|
||||
@@ -0,0 +1,101 @@
|
||||
// This is a Jsonnet file. Please, check https://jsonnet.org/ for more
|
||||
// information about the language.
|
||||
// For the schema, see
|
||||
// https://github.com/openSUSE/agama/blob/master/rust/agama-lib/share/profile.schema.json
|
||||
|
||||
// The "hw.libsonnet" file contains hardware information from the "lshw" tool.
|
||||
// Agama generates this file at runtime by running (with root privileges):
|
||||
//
|
||||
// lshw -json
|
||||
//
|
||||
// There are included also helpers to search this hardware tree. To see helpers check
|
||||
// "/usr/share/agama-cli/agama.libsonnet"
|
||||
local agama = import 'hw.libsonnet';
|
||||
|
||||
// Find the biggest disk which is suitable for installing the system.
|
||||
local findBiggestDisk(disks) =
|
||||
local sizedDisks = std.filter(function(d) std.objectHas(d, 'size'), disks);
|
||||
local sorted = std.sort(sizedDisks, function(x) -x.size);
|
||||
sorted[0].logicalname;
|
||||
|
||||
// Find how much physical memory system has.
|
||||
local memory = agama.findByID(agama.lshw, 'memory').size;
|
||||
|
||||
{
|
||||
product: {
|
||||
id: 'Leap_16.0',
|
||||
},
|
||||
software: {
|
||||
patterns: [
|
||||
],
|
||||
},
|
||||
user: {
|
||||
fullName: 'vagrant',
|
||||
userName: 'vagrant',
|
||||
password: 'vagrant',
|
||||
},
|
||||
root: {
|
||||
password: 'vagrant',
|
||||
},
|
||||
localization: {
|
||||
language: 'en_US',
|
||||
keyboard: 'us',
|
||||
},
|
||||
storage: {
|
||||
boot: {
|
||||
configure: true,
|
||||
device: findBiggestDisk(agama.selectByClass(agama.lshw, 'disk')),
|
||||
},
|
||||
drives: [{
|
||||
search: findBiggestDisk(agama.selectByClass(agama.lshw, 'disk')),
|
||||
ptableType: 'gpt',
|
||||
partitions: [{
|
||||
search: '*',
|
||||
delete: true
|
||||
},{
|
||||
id: 'esp',
|
||||
size: '512 MiB',
|
||||
filesystem: {
|
||||
type: 'vfat',
|
||||
path: '/boot',
|
||||
mountBy: 'label',
|
||||
label: 'boot',
|
||||
mountOptions: [ "noatime" ]
|
||||
},
|
||||
},{
|
||||
id: 'linux',
|
||||
size: {
|
||||
min: '9 GiB',
|
||||
},
|
||||
filesystem: {
|
||||
type: 'ext4',
|
||||
path: '/',
|
||||
mountBy: 'label',
|
||||
label: 'root',
|
||||
mountOptions: [ "noatime" ]
|
||||
}
|
||||
}]
|
||||
}]
|
||||
},
|
||||
scripts: {
|
||||
pre: [],
|
||||
post: [ {
|
||||
name: 'configure-vagrant',
|
||||
body: |||
|
||||
# Configure the insecure Vagrant SSH key
|
||||
mkdir -p /home/vagrant/.ssh
|
||||
curl -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub
|
||||
chown -R vagrant /home/vagrant/.ssh
|
||||
chmod 600 /home/vagrant/.ssh
|
||||
# Start services
|
||||
systemctl enable sshd
|
||||
# Configure sudo access for the vagrant user
|
||||
cat < EOF > /etc/sudoers/sudoers.d/00_vagrant
|
||||
Defaults:vagrant !requiretty
|
||||
vagrant ALL=(ALL) NOPASSWD: ALL
|
||||
root ALL=(ALL) NOPASSWD: ALL
|
||||
EOF
|
||||
|||
|
||||
} ]
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
zypper install -y qemu-guest-agent
|
||||
systemctl start qemu-guest-agent
|
||||
systemctl enable qemu-guest-agent
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
@@ -6,6 +6,10 @@
|
||||
version = "15.6";
|
||||
arch = "amd64";
|
||||
eol = false;
|
||||
} {
|
||||
version = "16.0";
|
||||
arch = "amd64";
|
||||
eol = true; # Not yet released, and bugged at the moment
|
||||
} {
|
||||
version = "tumbleweed";
|
||||
arch = "amd64";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
distro = "ubuntu"
|
||||
version = "22.04"
|
||||
iso = {
|
||||
url = "https://releases.ubuntu.com/22.04/ubuntu-22.04.4-live-server-amd64.iso"
|
||||
checksum = "45f873de9f8cb637345d6e66a583762730bbea30277ef7b32c9c3bd6700a32b2"
|
||||
url = "https://releases.ubuntu.com/22.04/ubuntu-22.04.5-live-server-amd64.iso"
|
||||
checksum = "9bc6028870aef3f74f4e16b900008179e78b130e6b0b9a140635434a46aa98b0"
|
||||
}
|
||||
boot_command = [
|
||||
"e<down><down><down><end><bs><bs><bs>",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
distro = "ubuntu"
|
||||
version = "24.04"
|
||||
iso = {
|
||||
url = "http://releases.ubuntu.com/24.04/ubuntu-24.04-live-server-amd64.iso"
|
||||
checksum = "8762f7e74e4d64d72fceb5f70682e6b069932deedb4949c6975d0f0fe0a91be3"
|
||||
url = "http://releases.ubuntu.com/24.04/ubuntu-24.04.01-live-server-amd64.iso"
|
||||
checksum = "e240e4b801f7bb68c20d1356b60968ad0c33a41d00d828e74ceb3364a0317be9"
|
||||
}
|
||||
boot_command = [
|
||||
"e<down><down><down><end><bs><bs><bs>",
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
distro = "ubuntu"
|
||||
version = "24.10"
|
||||
iso = {
|
||||
url = "http://releases.ubuntu.com/24.10/ubuntu-24.10-live-server-amd64.iso"
|
||||
checksum = "4fce7c02a5e5dbe3426da4aa0f8b7845e9a36aff29c5884d206a08e51b2c4c47"
|
||||
}
|
||||
boot_command = [
|
||||
"e<down><down><down><end><bs><bs><bs>",
|
||||
"fsck.mode=skip ",
|
||||
"locale=en_US ",
|
||||
"auto=true ",
|
||||
"priority=critical ",
|
||||
"autoinstall",
|
||||
"<F10>",
|
||||
]
|
||||
cd_files = [
|
||||
"distros/ubuntu/24.10/disc/*"
|
||||
]
|
||||
vbox_os_type = "Ubuntu24_64"
|
||||
@@ -0,0 +1,47 @@
|
||||
#cloud-config
|
||||
# vim: set ft=yaml:
|
||||
autoinstall:
|
||||
version: 1
|
||||
network: # Should disable networking, workaround for unattended-updates failing in install
|
||||
version: 2
|
||||
ethernets:
|
||||
eth0:
|
||||
match:
|
||||
name: e*
|
||||
dhcp4: yes
|
||||
dhcp6: no
|
||||
refresh-installer:
|
||||
update: no
|
||||
keyboard:
|
||||
layout: us
|
||||
toggle: null
|
||||
variant: ''
|
||||
locale: en_US.UTF-8
|
||||
identity:
|
||||
hostname: vagrant
|
||||
username: vagrant
|
||||
password: $6$rounds=4096$mJTRlY/vwPMquLe0$s4Ld3ZnvF.pM86xzbAgQD7Xpi/NMVgyQNb5CEfabFgL6nLRsP56WtwA.o.Jg/xC6HaJmM2p5fCGIo37jmKVRI0
|
||||
ssh:
|
||||
install-server: yes
|
||||
authorized_keys:
|
||||
- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
|
||||
allow-pw: yes
|
||||
user-data:
|
||||
disable_root: false
|
||||
package_update: false
|
||||
package_upgrade: false
|
||||
late-commands:
|
||||
- echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant
|
||||
- echo 'vagrant ALL=(ALL) NOPASSWD:ALL' >> /target/etc/sudoers.d/vagrant
|
||||
- chmod 440 /target/etc/sudoers.d/vagrant
|
||||
- >-
|
||||
curtin in-target --target=/target --
|
||||
bash -c 'if [ "$(systemd-detect-virt)" == "microsoft" ]; then
|
||||
apt-get update;
|
||||
apt-get install -y linux-azure;
|
||||
fi'
|
||||
- curtin in-target --target=/target -- logger "finished late-commands"
|
||||
packages:
|
||||
- ca-certificates
|
||||
- curl
|
||||
- sudo
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
apt remove cloud-init -y
|
||||
|
||||
apt update
|
||||
apt upgrade -y
|
||||
|
||||
# Make sshd faster
|
||||
cat << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
|
||||
UseDNS no
|
||||
PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
EOF
|
||||
|
||||
# Clean up after ourselves
|
||||
apt-get clean
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
apt install -y qemu-guest-agent
|
||||
systemctl start qemu-guest-agent
|
||||
systemctl enable qemu-guest-agent
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
apt install -y virtualbox-guest-utils
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
apt install -y open-vm-tools
|
||||
@@ -18,4 +18,8 @@
|
||||
version = "24.04";
|
||||
arch = "amd64";
|
||||
eol = false;
|
||||
} {
|
||||
version = "24.10";
|
||||
arch = "amd64";
|
||||
eol = false;
|
||||
} ]
|
||||
|
||||
@@ -87,6 +87,9 @@
|
||||
} {
|
||||
name = "PACKER_CONFIG_DIR";
|
||||
value = "./packer_config";
|
||||
} {
|
||||
name = "STORAGE_URL";
|
||||
value = "http://s3.thehellings.lan:9000";
|
||||
} ];
|
||||
};
|
||||
|
||||
@@ -94,10 +97,12 @@
|
||||
packages = let
|
||||
base = {
|
||||
runtimeInputs = with pkgs; [
|
||||
cdrtools
|
||||
findutils
|
||||
packer
|
||||
findutils
|
||||
qemu_full
|
||||
vagrant
|
||||
qemu_full
|
||||
vagrant
|
||||
xorriso
|
||||
];
|
||||
};
|
||||
build = d: let
|
||||
|
||||
Reference in New Issue
Block a user