forked from youki-dev/youki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile.containerd2youki
56 lines (49 loc) · 1.86 KB
/
Vagrantfile.containerd2youki
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu2204"
config.vm.synced_folder '.', '/vagrant/youki', disabled: false
config.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 4
end
config.vm.provision "bootstrap", type: "shell" do |s|
s.inline = <<-SHELL
set -e -u -o pipefail
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
wget --quiet https://go.dev/dl/go1.18.1.linux-amd64.tar.gz -O /tmp/go1.18.1.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf /tmp/go1.18.1.linux-amd64.tar.gz
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
git clone https://github.com/containerd/containerd \
/root/go/src/github.com/containerd/containerd -b v1.6.20
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
cp /vagrant/youki/youki /usr/bin/runc
SHELL
end
config.vm.provision "test", type: "shell" do |s|
s.inline = <<-SHELL
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
grep "FAIL: " result.txt || true
SHELL
end
end