Update install tests with new images, add alma10 (#13489)
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

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>
This commit is contained in:
Derek Nola 2026-01-23 13:14:51 -08:00 committed by GitHub
parent 5fa9226c2b
commit 253f2a91f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 81 additions and 47 deletions

View file

@ -30,7 +30,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
vm: [centos-9, rocky-8, rocky-9, fedora, opensuse-leap, ubuntu-2404] vm: [centos-9, alma-10, rocky-9, fedora, opensuse-leap, ubuntu-2404]
max-parallel: 3 max-parallel: 3
defaults: defaults:
run: run:
@ -77,50 +77,12 @@ jobs:
path: tests/install/${{ matrix.vm }} path: tests/install/${{ matrix.vm }}
- name: "Vagrant Up" - name: "Vagrant Up"
run: vagrant up --no-tty --no-provision run: vagrant up --no-tty --no-provision
- name: "Upload k3s binary to VM" - name: "Prepare K3s binary"
run: | run: |
chmod +x k3s chmod +x k3s
vagrant scp k3s /tmp/k3s vagrant scp k3s /tmp/k3s
vagrant ssh -c "sudo mv /tmp/k3s /usr/local/bin/k3s" vagrant ssh -c "sudo mv /tmp/k3s /usr/local/bin/k3s"
vagrant provision --provision-with=k3s-upload - name: Run K3s Install Test
- name: Add binary to PATH run: vagrant provision
if: matrix.vm == 'centos-9' || matrix.vm == 'rocky-8' || matrix.vm == 'rocky-9' || matrix.vm == 'opensuse-leap'
run: vagrant provision --provision-with=add-bin-path
- name: "⏩ Install K3s"
run: |
vagrant provision --provision-with=k3s-prepare
vagrant provision --provision-with=k3s-install
if [ ${{ matrix.vm }} = 'opensuse-microos' ]; then vagrant reload --no-provision; fi
- name: "⏳ Node"
run: vagrant provision --provision-with=k3s-wait-for-node
- name: "⏳ CoreDNS"
run: vagrant provision --provision-with=k3s-wait-for-coredns
- name: "⏳ Local Storage"
run: vagrant provision --provision-with=k3s-wait-for-local-storage
continue-on-error: true
- name: "⏳ Metrics Server"
run: vagrant provision --provision-with=k3s-wait-for-metrics-server
continue-on-error: true
- name: "⏳ Traefik"
run: vagrant provision --provision-with=k3s-wait-for-traefik
continue-on-error: true
- name: "k3s-status"
run: vagrant provision --provision-with=k3s-status
- name: "k3s-procps"
run: vagrant provision --provision-with=k3s-procps
- name: "k3s-mount-directory"
run: vagrant provision --provision-with=k3s-mount-directory
- name: "k3s-uninstall"
run: vagrant provision --provision-with=k3s-uninstall
- name: "k3s-check-mount"
run: vagrant provision --provision-with=k3s-check-mount
- name: "k3s-unmount-dir"
run: vagrant provision --provision-with=k3s-unmount-dir
- name: Cleanup VM - name: Cleanup VM
run: vagrant destroy -f run: vagrant destroy -f
- name: On Failure, launch debug session
uses: lhotari/action-upterm@v1
if: ${{ failure() }}
with:
## If no one connects after 5 minutes, shut down server.
wait-timeout-minutes: 5

View file

@ -16,7 +16,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
channel: [stable, latest] channel: [stable, latest]
vm: [rocky-9, fedora, opensuse-leap, ubuntu-2404] vm: [alma-10, fedora, opensuse-leap, ubuntu-2404]
max-parallel: 4 max-parallel: 4
defaults: defaults:
run: run:

72
tests/install/alma-10/Vagrantfile vendored Normal file
View file

@ -0,0 +1,72 @@
# -*- 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

View file

@ -6,7 +6,7 @@ ENV['TEST_INSTALL_SH'] ||= '../../../install.sh'
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
config.vagrant.plugins = ["vagrant-k3s"] config.vagrant.plugins = ["vagrant-k3s"]
config.vm.box = "eurolinux-vagrant/centos-stream-9" config.vm.box = "bento/centos-stream-9"
config.vm.boot_timeout = ENV['TEST_VM_BOOT_TIMEOUT'] || 600 # seconds config.vm.boot_timeout = ENV['TEST_VM_BOOT_TIMEOUT'] || 600 # seconds
config.vm.synced_folder '.', '/vagrant', disabled: true config.vm.synced_folder '.', '/vagrant', disabled: true

View file

@ -6,7 +6,7 @@ ENV['TEST_INSTALL_SH'] ||= '../../../install.sh'
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
config.vagrant.plugins = ["vagrant-k3s"] config.vagrant.plugins = ["vagrant-k3s"]
config.vm.box = 'opensuse/Leap-15.6.x86_64' config.vm.box = 'bento/opensuse-leap-15'
config.vm.boot_timeout = ENV['TEST_VM_BOOT_TIMEOUT'] || 600 # seconds config.vm.boot_timeout = ENV['TEST_VM_BOOT_TIMEOUT'] || 600 # seconds
config.vm.synced_folder '.', '/vagrant', disabled: true config.vm.synced_folder '.', '/vagrant', disabled: true

View file

@ -3,11 +3,11 @@
# #
ENV['TEST_INSTALL_SH'] ||= '../../../install.sh' ENV['TEST_INSTALL_SH'] ||= '../../../install.sh'
ENV['INSTALL_K3S_CHANNEL'] ||= 'testing' ENV['INSTALL_K3S_CHANNEL'] ||= 'latest'
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
config.vagrant.plugins = ["vagrant-k3s"] config.vagrant.plugins = ["vagrant-k3s"]
config.vm.box = "eurolinux-vagrant/rocky-9" config.vm.box = "bento/rockylinux-9"
config.vm.boot_timeout = ENV['TEST_VM_BOOT_TIMEOUT'] || 600 # seconds config.vm.boot_timeout = ENV['TEST_VM_BOOT_TIMEOUT'] || 600 # seconds
config.vm.synced_folder '.', '/vagrant', disabled: true config.vm.synced_folder '.', '/vagrant', disabled: true