forked from CentaurusInfra/mizar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·39 lines (32 loc) · 1.21 KB
/
bootstrap.sh
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
#!/bin/bash
sudo apt-get update
sudo apt-get install -y \
build-essential clang-7 llvm-7 \
libelf-dev \
python3 \
python3-pip \
libcmocka-dev \
lcov
sudo apt install docker.io
sudo pip3 install netaddr docker scapy
sudo systemctl unmask docker.service
sudo systemctl unmask docker.socket
sudo systemctl start docker
sudo systemctl enable docker
sudo docker build -f ./test/Dockerfile -t buildbox:v2 ./test
git submodule update --init --recursive
kernel_ver=`uname -r`
echo "Running kernel version: $kernel_ver"
if [ "$kernel_ver" != "5.6.0-rc2" ]; then
echo "Mizar requires an updated kernel: linux-5.6-rc2 for TCP to function correctly. Current version is $kernel_ver"
read -p "Execute kernel update script (y/n)?" choice
case "$choice" in
y|Y ) sh ./kernelupdate.sh;;
n|N ) echo "Please run kernelupdate.sh to download and update the kernel!"; exit;;
* ) echo "Please run kernelupdate.sh to download and update the kernel!"; exit;;
esac
fi
ver=$(curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')
curl -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/$ver/kind-$(uname)-amd64
chmod +x kind
mv kind /usr/local/bin