mirror of
https://github.com/containers/youki
synced 2024-11-22 17:02:00 +01:00
25edc95648
* Remove unnecessary chdir Co-authored-by: jiaxiao zhou <jiazho@microsoft.com> Co-authored-by: Jorge Prendes <jorge.prendes@gmail.com> Signed-off-by: utam0k <k0ma@utam0k.jp> * fixup! Remove unnecessary chdir Signed-off-by: utam0k <k0ma@utam0k.jp> * fixup! Remove unnecessary chdir Signed-off-by: utam0k <k0ma@utam0k.jp> * fixup! Remove unnecessary chdir Signed-off-by: utam0k <k0ma@utam0k.jp> * Enable run_hooks to be passed cwd Signed-off-by: utam0k <k0ma@utam0k.jp> * fixup! Enable run_hooks to be passed cwd Signed-off-by: utam0k <k0ma@utam0k.jp> * fixup! Enable run_hooks to be passed cwd Signed-off-by: utam0k <k0ma@utam0k.jp> --------- Signed-off-by: utam0k <k0ma@utam0k.jp> Co-authored-by: jiaxiao zhou <jiazho@microsoft.com> Co-authored-by: Jorge Prendes <jorge.prendes@gmail.com>
61 lines
2.0 KiB
Ruby
61 lines
2.0 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
GO_VERSION = "1.20.12"
|
|
CONTAINERD_VERSION = "1.7.11"
|
|
|
|
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
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
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/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
|
|
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 v#{CONTAINERD_VERSION}
|
|
|
|
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
|
|
ln -s /vagrant/youki/youki /usr/bin/runc
|
|
SHELL
|
|
end
|
|
|
|
config.vm.provision "test", type: "shell" do |s|
|
|
s.inline = <<-SHELL
|
|
export RUNC_FLAVOR=crun
|
|
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
|