-
Notifications
You must be signed in to change notification settings - Fork 68
/
Vagrantfile
128 lines (111 loc) · 4.34 KB
/
Vagrantfile
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |vb|
vb.memory = 8192
vb.cpus = 2
end
# Regular debian testing box
config.vm.define "debian" do |debian|
debian.vm.box = "generic/debian12"
debian.vm.provision "file", source: "./", destination: "/home/vagrant/try"
debian.vm.provision "shell", privileged: false, inline: "
sudo apt-get update
sudo apt-get install -y git expect curl attr pandoc gcc make autoconf mergerfs
sudo chown -R vagrant:vagrant try
cd try
scripts/run_tests.sh
autoconf && ./configure && make
sudo make install
which try-commit || exit 2
scripts/run_tests.sh
"
end
# Regular debian testing box but we try the rustup oneliner
config.vm.define "debianrustup" do |debianrustup|
debianrustup.vm.box = "generic/debian12"
debianrustup.vm.provision "file", source: "./", destination: "/home/vagrant/try"
debianrustup.vm.provision "shell", privileged: false, inline: "
sudo apt-get update
sudo apt-get install -y curl attr pandoc gcc make autoconf mergerfs
sudo chown -R vagrant:vagrant try
cd try
mkdir rustup
./try -D rustup \"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y\"
ls -lah rustup/upperdir/home/vagrant/.cargo/bin
rm -rf rustup
autoconf && ./configure && make
sudo make install
which try-commit || exit 2
mkdir rustup
./try -D rustup \"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y\"
ls -lah rustup/upperdir/home/vagrant/.cargo/bin
"
end
# Regular debian testing box with LVM
config.vm.define "debianlvm" do |debianlvm|
debianlvm.vm.box = "generic/debian12"
debianlvm.vm.provision "file", source: "./", destination: "/home/vagrant/try"
debianlvm.vm.provision "shell", privileged: false, inline: "
sudo apt-get update
sudo apt-get install -y git expect lvm2 mergerfs curl attr pandoc gcc make autoconf mergerfs
# Create an image for the lvm disk
sudo fallocate -l 2G /root/lvm_disk.img
# Setup a loopback device
sudo losetup /dev/loop0 /root/lvm_disk.img
# Create the lv physicalvolume, volumegroup, and logicalvolumes
sudo pvcreate /dev/loop0
sudo vgcreate vg0 /dev/loop0
sudo lvcreate -n lv0 -l 50%FREE vg0
sudo lvcreate -n lv1 -l 100%FREE vg0
sudo mkfs.ext4 /dev/vg0/lv0
sudo mkfs.ext4 /dev/vg0/lv1
sudo mkdir /mnt/lv0
sudo mount /dev/vg0/lv0 /mnt/lv0
sudo mkdir /mnt/lv0/lv1
sudo mount /dev/vg0/lv1 /mnt/lv0/lv1
# This is intentional, if we moved try to lv1 it'd work since itself does not contain a nested mount
sudo mv /home/vagrant/try /mnt/lv0
sudo chown -R vagrant:vagrant /mnt/lv0/try
cd /mnt/lv0/try
scripts/run_tests.sh
autoconf && ./configure && make
sudo make install
which try-commit || exit 2
scripts/run_tests.sh
"
end
# Regular rocky testing box
config.vm.define "rocky9" do |rocky|
rocky.vm.box = "generic/rocky9"
rocky.vm.provision "file", source: "./", destination: "/home/vagrant/try"
rocky.vm.provision "shell", privileged: false, inline: "
sudo yum install -y git expect curl attr pandoc fuse
wget https://github.com/trapexit/mergerfs/releases/download/2.40.2/mergerfs-2.40.2-1.el9.x86_64.rpm
sudo rpm -i mergerfs-2.40.2-1.el9.x86_64.rpm
sudo chown -R vagrant:vagrant try
cd try
TRY_TOP=$(pwd) scripts/run_tests.sh
autoconf && ./configure && make
sudo make install
which try-commit || exit 2
TRY_TOP=$(pwd) scripts/run_tests.sh
"
end
#
# Regular rocky testing box
config.vm.define "fedora39" do |fedora|
fedora.vm.box = "generic/fedora39"
fedora.vm.provision "file", source: "./", destination: "/home/vagrant/try"
fedora.vm.provision "shell", privileged: false, inline: "
sudo yum install -y git expect curl attr pandoc fuse
wget https://github.com/trapexit/mergerfs/releases/download/2.40.2/mergerfs-2.40.2-1.fc39.x86_64.rpm
sudo rpm -i mergerfs-2.40.2-1.fc39.x86_64.rpm
sudo chown -R vagrant:vagrant try
cd try
TRY_TOP=$(pwd) scripts/run_tests.sh
autoconf && ./configure && make
sudo make install
which try-commit || exit 2
TRY_TOP=$(pwd) scripts/run_tests.sh
"
end
end