k3s/tests/install/alma-10/Vagrantfile
Derek Nola 253f2a91f3
Some checks failed
Install Script / build (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Install Script / Smoke Test (push) Has been cancelled
Update install tests with new images, add alma10 (#13489)
* Update install tests with new images, add alma10

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Stop running each provisioning step individually for install tests

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2026-01-23 13:14:51 -08:00

72 lines
2.1 KiB
Ruby

# -*- mode: ruby -*-
# vi: set ft=ruby :
#
ENV['TEST_INSTALL_SH'] ||= '../../../install.sh'
ENV['INSTALL_K3S_CHANNEL'] ||= 'latest'
Vagrant.configure("2") do |config|
config.vagrant.plugins = ["vagrant-k3s"]
config.vm.box = "almalinux/10"
config.vm.boot_timeout = ENV['TEST_VM_BOOT_TIMEOUT'] || 600 # seconds
config.vm.synced_folder '.', '/vagrant', disabled: true
# Load in helper functions
load "../install_util.rb"
config.vm.define 'install-alma-10', primary: true do |test|
test.vm.hostname = 'smoke'
test.vm.provision "add-bin-path", type: "shell", inline: "echo \"export PATH=/usr/local/bin:\$PATH\" >> ~/.bashrc"
test.vm.provision "install-depedencies", type: "shell", inline: "dnf install -y kernel-modules-extra"
# This test image has an older kernel by default, so we need to reboot to load the new kernel modules
test.vm.provision 'k3s-reload', type: 'reload', run: 'once'
test.vm.provision 'k3s-upload', type: 'file', run: 'always', source: ENV['TEST_INSTALL_SH'], destination: 'install.sh'
test.vm.provision 'k3s-install', type: 'k3s', run: 'once' do |k3s|
k3s.installer_url = 'file:///home/vagrant/install.sh'
k3s.args = %w[server]
k3s.env = ENV.select{|k,v| k.start_with?('K3S_') || k.start_with?('INSTALL_K3S_')}.merge({
:INSTALL_K3S_NAME => 'server',
})
k3s.config = <<~YAML
selinux: true
token: 'vagrant'
YAML
end
waitForNodeReady(test.vm)
waitForCoreDns(test.vm)
waitForLocalStorage(test.vm)
waitForMetricsServer(test.vm)
waitForTraefik(test.vm)
kubectlStatus(test.vm)
checkK3sProcesses(test.vm)
checkCGroupV2(test.vm)
mountDirs(test.vm)
runUninstall(test.vm)
checkMountPoint(test.vm)
unmountDir(test.vm)
end
config.vm.provision 'selinux-status', type: 'shell', run: 'once', inline: 'sestatus'
%w[libvirt virtualbox vmware_desktop].each do |p|
config.vm.provider p do |v|
v.cpus = ENV['TEST_VM_CPUS'] || 2
v.memory = ENV['TEST_VM_MEMORY'] || 2048
end
end
config.vm.provider :virtualbox do |v,o|
v.gui = false
v.check_guest_additions = false
end
end