58 lines
1.7 KiB
Bash
Executable File
58 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
cd /build
|
|
|
|
echo "##################################################### Installing basic packages"
|
|
apk add alpine-base \
|
|
openrc busybox-openrc bash nftables \
|
|
lm-sensors lm-sensors-fancontrol lm-sensors-fancontrol-openrc e2fsprogs
|
|
|
|
# For diagnotics
|
|
apk add \
|
|
iproute2 iproute2-ss curl bind-tools procps strace tcpdump lsof jq binutils \
|
|
openssl nftables conntrack-tools ethtool findmnt kmod coreutils util-linux
|
|
echo '[ -x /bin/bash ] && exec /bin/bash -l' >> "/root/.profile"
|
|
|
|
# Compat layer for kubelet for now. Will look into building it myself later. If needed
|
|
apk add gcompat
|
|
kubelet --version || exit 1
|
|
|
|
echo "##################################################### Installing CRI-O"
|
|
mkdir -p /usr/local/bin
|
|
|
|
tar zxf crio.tar.gz
|
|
cd cri-o
|
|
|
|
./install
|
|
|
|
crio config 2>&1 > /dev/null
|
|
if [ $? -ne 0 ]; then
|
|
crio config
|
|
exit $?
|
|
fi
|
|
|
|
sed -i "s/default_runtime = \"crun\"/\0\ncgroup_manager = \"cgroupfs\"/g" /etc/crio/crio.conf.d/10-crio.conf
|
|
grep cgroup_manager /etc/crio/crio.conf.d/10-crio.conf || exit 1
|
|
|
|
mkdir -p /var/run/crio
|
|
mkdir -p /var/lib/containers/storage
|
|
mkdir -p /var/lib/cni
|
|
mkdir -p /var/log/crio
|
|
mkdir -p /var/log/kubelet
|
|
mkdir -p /var/log/monok8s
|
|
mkdir -p /etc/cni/net.d
|
|
mkdir -p /opt/cni/bin
|
|
mkdir -p /etc/kubernetes/manifests
|
|
mkdir -p /run/crun
|
|
mkdir -p /run/runc
|
|
|
|
# Kubernetes legacy things that need to exists but have no use for us
|
|
mkdir -p /usr/libexec/kubernetes/kubelet-plugins/volume/exec
|
|
chmod 0755 /usr/libexec/kubernetes \
|
|
/usr/libexec/kubernetes/kubelet-plugins \
|
|
/usr/libexec/kubernetes/kubelet-plugins/volume \
|
|
/usr/libexec/kubernetes/kubelet-plugins/volume/exec
|
|
|
|
touch /var/log/crio/crio.log
|
|
touch /var/log/crio/kubelet.log
|