Remove kata-containers
Some checks failed
buildbot/travis_bionic Build done.

- docker support was deprecated
This commit is contained in:
Peter Šurda 2021-11-19 22:40:28 +08:00
parent 0fb6628b47
commit 5fba2af5c6
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -26,24 +26,6 @@ cores=$(grep -E '^cpu cores' /proc/cpuinfo |head -1|cut -d: -f2|tr -d '[:space:]
mem=$(sed -E 's/^MemTotal: +([0-9]+) kB/\1/p;d' < /proc/meminfo)
mempercore=$(((mem/1024-4096)/cores))
# install kata containers
if ! docker info 2>/dev/null|grep Runtimes:|grep -qs kata-qemu-virtiofs; then
echo "Installing kata...."
cid=$(docker run -d --runtime=runc -v /opt/kata:/opt/kata -v /var/run/dbus:/var/run/dbus -v /run/systemd:/run/systemd -v /etc/docker:/etc/docker -it katadocker/kata-deploy kata-deploy-docker install)
# wait for finish
while [ "$(docker container inspect -f '{{.State.Running}}' "$cid")" == "true" ]; do
sleep 1
done
# delete container
docker rm $cid
# update default container CPU and memory
sed -i "s/default_vcpus = .*/default_vcpus = 2/g;s/default_memory = .*/default-memory = $mempercore/g" /opt/kata/share/defaults/kata-containers/configuration-qemu-virtiofs.toml
echo "Kata installed"
fi
trusty
xenial
bionic