mirror of
https://github.com/containerd/containerd.git
synced 2026-08-09 09:33:06 +00:00
Vagrant is no longer well maintained: e.g., its apt repository does not provide packages for Ubuntu 26.04 (hashicorp/vagrant#13811), and recent Fedora boxes are no longer published to HashiCorp's registry, so the CI had to download the box file manually from Fedora mirrors. The test scripts in the Vagrantfile were split out to script/vm/*.sh . The scripts depend on neither Vagrant nor Lima, and can be used with other VM environments too. Assisted-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
1.5 KiB
1.5 KiB
VM scripts
The scripts in this directory run the containerd integration tests inside a
virtual machine (Fedora or an EL distribution, with SELinux Enforcing by
default). They are used by the integration-vm job in
.github/workflows/ci.yml, but do not depend on Lima
and can be used with other VM environments too.
Local usage with Lima
# Boot a plain VM. template:almalinux-8, -9, and -10 are tested too.
# --plain keeps the guest pristine (no guest agent, no mounts, no port forwards).
limactl start --plain --name=default --cpus=2 --memory=4 --disk=60 template:fedora-44
# Copy the source tree into the guest.
limactl cp -r . default:containerd
lima bash -c 'sudo mkdir -p /go/src/github.com/containerd && sudo mv ~/containerd /go/src/github.com/containerd/containerd'
export LIMA_WORKDIR=/go/src/github.com/containerd/containerd
# Provision the guest (packages, Go, runc, CNI plugins, cri-tools, containerd, ...).
lima sudo script/vm/provision.sh
# Run the test suites.
lima sudo script/vm/test-integration.sh
lima sudo CGROUP_DRIVER=systemd script/vm/test-cri-integration.sh
lima sudo CGROUP_DRIVER=systemd script/vm/test-cri.sh
# Clean up.
limactl delete -f default
Environment variables
provision.sh:GO_VERSION,RUNC_FLAVOR(runcorcrun),SELINUX(Enforcing,Permissive, orDisabled),INSTALL_PACKAGEStest-integration.sh:RUNC_FLAVORtest-cri-integration.sh:CGROUP_DRIVER(empty orsystemd),RUNC_FLAVORtest-cri.sh:CGROUP_DRIVER(empty orsystemd),REPORT_DIR