rke2/tests/install
..
centos-9
opensuse-leap
oracle-9
rocky-8
ubuntu-2404
windows-2019
windows-2022
README.md
install_util.rb

README.md

Install Tests

These tests are used to validate the installation and operation of RKE2 on a variety of operating systems. The test themselves are Vagrantfiles describing single-node installations that are easily spun up with Vagrant for the libvirt and virtualbox providers:

Format

When adding new installer test(s) please copy the prevalent style for the Vagrantfile. Ideally, the boxes used for additional assertions will support the default libvirt provider which enables them to be used by our GitHub Actions Nightly Install Test Workflow.

Framework

If you are new to Vagrant, Hashicorp has written some pretty decent introductory tutorials and docs, see:

Plugins and Providers

The libvirtprovider cannot be used without first installing the vagrant-libvirt plugin. Libvirtd service must be installed and running on the host machine as well.

This can be installed with:

vagrant plugin install vagrant-libvirt

Environment Variables

These can be set on the CLI or exported before invoking Vagrant:

  • TEST_VM_CPUS (default ➡️ 2)
    The number of vCPU for the guest to use.
  • TEST_VM_MEMORY (default ➡️ 3072)
    The number of megabytes of memory for the guest to use.
  • TEST_VM_BOOT_TIMEOUT (default ➡️ 600)
    The time in seconds that Vagrant will wait for the machine to boot and be accessible.

Running

The Install Script tests can be run by changing to the fixture directory and invoking vagrant up, e.g.:

cd tests/install/rocky-8
vagrant up
# The following provisioners are optional. In GitHub Actions CI they are invoked
# explicitly to avoid certain timeout issues on slow runners
vagrant provision --provision-with=rke2-wait-for-node
vagrant provision --provision-with=rke2-wait-for-coredns
vagrant provision --provision-with=rke2-wait-for-local-storage
vagrant provision --provision-with=rke2-wait-for-metrics-server
vagrant provision --provision-with=rke2-wait-for-traefik
vagrant provision --provision-with=rke2-status
vagrant provision --provision-with=rke2-procps