2020-03-19 10:42:41 +08:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
Vagrant.configure("2") do |config|
|
2020-04-29 07:15:46 +08:00
|
|
|
# Fedora box is used for testing cgroup v2 support
|
|
|
|
config.vm.box = "fedora/32-cloud-base"
|
2020-03-19 10:42:41 +08:00
|
|
|
config.vm.provider :virtualbox do |v|
|
|
|
|
v.memory = 2048
|
|
|
|
v.cpus = 2
|
|
|
|
end
|
|
|
|
config.vm.provider :libvirt do |v|
|
|
|
|
v.memory = 2048
|
|
|
|
v.cpus = 2
|
|
|
|
end
|
|
|
|
config.vm.provision "shell", inline: <<-SHELL
|
2020-05-03 05:18:08 +08:00
|
|
|
curl -OSs https://kojipkgs.fedoraproject.org/packages/criu/3.14/1.fc32/x86_64/criu-3.14-1.fc32.x86_64.rpm
|
2020-04-04 14:12:43 +08:00
|
|
|
cat << EOF | dnf -y shell
|
2020-05-03 05:31:50 +08:00
|
|
|
config exclude kernel,kernel-core
|
|
|
|
config install_weak_deps false
|
2020-05-03 05:18:08 +08:00
|
|
|
localinstall criu-3.14-1.fc32.x86_64.rpm
|
2020-04-04 14:12:43 +08:00
|
|
|
update
|
2020-05-03 05:31:50 +08:00
|
|
|
install iptables gcc make golang-go libseccomp-devel bats jq git-core
|
2020-04-04 14:12:43 +08:00
|
|
|
ts run
|
|
|
|
EOF
|
|
|
|
dnf clean all
|
2020-05-03 05:18:08 +08:00
|
|
|
rm -f criu-3.14-1.fc32.x86_64.rpm
|
2020-04-21 09:17:14 +08:00
|
|
|
|
2020-04-22 05:13:46 +08:00
|
|
|
# Add a user for rootless tests
|
|
|
|
useradd -u2000 -m -d/home/rootless -s/bin/bash rootless
|
|
|
|
|
|
|
|
# Add busybox for libcontainer/integration tests
|
|
|
|
. /vagrant/tests/integration/multi-arch.bash \
|
|
|
|
&& mkdir /busybox \
|
|
|
|
&& curl -fsSL $(get_busybox) | tar xfJC - /busybox
|
2020-03-19 10:42:41 +08:00
|
|
|
SHELL
|
|
|
|
end
|