mirror of
https://github.com/k3s-io/k3s.git
synced 2026-02-03 20:39:49 -05:00
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>
This commit is contained in:
parent
5fa9226c2b
commit
253f2a91f3
6 changed files with 81 additions and 47 deletions
46
.github/workflows/install.yaml
vendored
46
.github/workflows/install.yaml
vendored
|
|
@ -30,7 +30,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
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
|
||||
defaults:
|
||||
run:
|
||||
|
|
@ -77,50 +77,12 @@ jobs:
|
|||
path: tests/install/${{ matrix.vm }}
|
||||
- name: "Vagrant Up"
|
||||
run: vagrant up --no-tty --no-provision
|
||||
- name: "Upload k3s binary to VM"
|
||||
- name: "Prepare K3s binary"
|
||||
run: |
|
||||
chmod +x k3s
|
||||
vagrant scp k3s /tmp/k3s
|
||||
vagrant ssh -c "sudo mv /tmp/k3s /usr/local/bin/k3s"
|
||||
vagrant provision --provision-with=k3s-upload
|
||||
- name: Add binary to PATH
|
||||
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: Run K3s Install Test
|
||||
run: vagrant provision
|
||||
- name: Cleanup VM
|
||||
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
|
||||
|
|
|
|||
2
.github/workflows/nightly-install.yaml
vendored
2
.github/workflows/nightly-install.yaml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
channel: [stable, latest]
|
||||
vm: [rocky-9, fedora, opensuse-leap, ubuntu-2404]
|
||||
vm: [alma-10, fedora, opensuse-leap, ubuntu-2404]
|
||||
max-parallel: 4
|
||||
defaults:
|
||||
run:
|
||||
|
|
|
|||
72
tests/install/alma-10/Vagrantfile
vendored
Normal file
72
tests/install/alma-10/Vagrantfile
vendored
Normal 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
|
||||
2
tests/install/centos-9/Vagrantfile
vendored
2
tests/install/centos-9/Vagrantfile
vendored
|
|
@ -6,7 +6,7 @@ ENV['TEST_INSTALL_SH'] ||= '../../../install.sh'
|
|||
|
||||
Vagrant.configure("2") do |config|
|
||||
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.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
|
|
|
|||
2
tests/install/opensuse-leap/Vagrantfile
vendored
2
tests/install/opensuse-leap/Vagrantfile
vendored
|
|
@ -6,7 +6,7 @@ ENV['TEST_INSTALL_SH'] ||= '../../../install.sh'
|
|||
|
||||
Vagrant.configure("2") do |config|
|
||||
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.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
|
|
|
|||
4
tests/install/rocky-9/Vagrantfile
vendored
4
tests/install/rocky-9/Vagrantfile
vendored
|
|
@ -3,11 +3,11 @@
|
|||
#
|
||||
|
||||
ENV['TEST_INSTALL_SH'] ||= '../../../install.sh'
|
||||
ENV['INSTALL_K3S_CHANNEL'] ||= 'testing'
|
||||
ENV['INSTALL_K3S_CHANNEL'] ||= 'latest'
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
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.synced_folder '.', '/vagrant', disabled: true
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue