2022-05-14 16:36:19 +02:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
2024-01-02 11:08:55 +01:00
|
|
|
GO_VERSION = "1.20.12"
|
|
|
|
CONTAINERD_VERSION = "1.7.11"
|
|
|
|
|
2022-05-14 16:36:19 +02:00
|
|
|
Vagrant.configure("2") do |config|
|
2022-06-06 16:40:22 +02:00
|
|
|
config.vm.box = "generic/ubuntu2204"
|
2022-10-24 13:14:14 +02:00
|
|
|
config.vm.synced_folder '.', '/vagrant/youki', disabled: false
|
2022-05-14 16:36:19 +02:00
|
|
|
|
|
|
|
config.vm.provider "virtualbox" do |v|
|
|
|
|
v.memory = 4096
|
2022-11-22 10:44:26 +01:00
|
|
|
v.cpus = 4
|
2022-05-14 16:36:19 +02:00
|
|
|
end
|
|
|
|
|
2022-10-24 13:14:14 +02:00
|
|
|
config.vm.provision "bootstrap", type: "shell" do |s|
|
|
|
|
s.inline = <<-SHELL
|
|
|
|
set -e -u -o pipefail
|
2024-01-02 11:08:55 +01:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
2022-10-24 13:14:14 +02:00
|
|
|
apt-get update && apt-get install -y \
|
|
|
|
make \
|
|
|
|
pkg-config \
|
|
|
|
libsystemd-dev \
|
|
|
|
libdbus-glib-1-dev \
|
|
|
|
build-essential \
|
|
|
|
libelf-dev \
|
|
|
|
libseccomp-dev \
|
|
|
|
libbtrfs-dev \
|
|
|
|
btrfs-progs
|
2024-01-02 11:08:55 +01:00
|
|
|
wget --quiet https://go.dev/dl/go#{GO_VERSION}.linux-amd64.tar.gz -O /tmp/go#{GO_VERSION}.linux-amd64.tar.gz
|
|
|
|
rm -rf /usr/local/go && tar -C /usr/local -xzf /tmp/go#{GO_VERSION}.linux-amd64.tar.gz
|
2022-10-24 13:14:14 +02:00
|
|
|
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
|
|
|
|
echo "export GOPATH=$HOME/go" >> ~/.bashrc
|
|
|
|
export PATH=$PATH:$HOME/.cargo/bin:/usr/local/go/bin
|
|
|
|
export GOPATH=$HOME/go
|
2022-05-14 16:36:19 +02:00
|
|
|
|
2022-10-24 13:14:14 +02:00
|
|
|
git clone https://github.com/containerd/containerd \
|
2024-01-02 11:08:55 +01:00
|
|
|
/root/go/src/github.com/containerd/containerd -b v#{CONTAINERD_VERSION}
|
2022-05-14 16:36:19 +02:00
|
|
|
|
2022-10-24 13:14:14 +02:00
|
|
|
cd /root/go/src/github.com/containerd/containerd
|
|
|
|
make
|
|
|
|
make binaries
|
|
|
|
make install
|
|
|
|
./script/setup/install-cni
|
|
|
|
./script/setup/install-critools
|
|
|
|
rm -rf /bin/runc /sbin/runc /usr/sbin/runc /usr/bin/runc
|
2022-05-14 16:36:19 +02:00
|
|
|
|
2022-10-24 13:14:14 +02:00
|
|
|
cp /vagrant/youki/youki /usr/bin/runc
|
|
|
|
SHELL
|
|
|
|
end
|
|
|
|
|
|
|
|
config.vm.provision "test", type: "shell" do |s|
|
|
|
|
s.inline = <<-SHELL
|
2024-01-02 11:08:55 +01:00
|
|
|
export RUNC_FLAVOR=crun
|
2022-10-24 13:14:14 +02:00
|
|
|
cd /root/go/src/github.com/containerd/containerd/
|
|
|
|
export PATH=$PATH:$HOME/.cargo/bin:/usr/local/go/bin
|
|
|
|
make TEST_RUNTIME=io.containerd.runc.v2 TESTFLAGS="-timeout 120m" integration | tee result.txt
|
2022-11-22 10:44:26 +01:00
|
|
|
grep "FAIL: " result.txt || true
|
2022-10-24 13:14:14 +02:00
|
|
|
SHELL
|
|
|
|
end
|
2022-05-14 16:36:19 +02:00
|
|
|
end
|