The version of containerd
that OpenFaaS
will download during the
installation doesn't support cgroup v2, so we need to configure
systemd
to avoid using the Unified cgroup Hierarchy, and reboot the
system:
sudo dnf install -y grubby
sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
sudo systemctl reboot
sudo dnf install -y iptables golang git make perl-Digest-SHA
git clone https://github.com/slp/faasd
cd faasd
./hack/install.sh
git checkout faasd-libkrun
make local
sudo mv /usr/local/bin/faasd /usr/local/bin/faasd.bak
sudo cp bin/faasd /usr/local/bin/faasd
sudo systemctl reboot
sudo dnf copr enable -y slp/libkrunfw
sudo dnf copr enable -y slp/libkrun
sudo dnf copr enable -y slp/crun-krun
sudo dnf install -y crun-krun
sudo mv /usr/bin/runc /usr/bin/runc.bak
sudo cp /usr/bin/crun-krun /usr/bin/runc
libkrun TSI-based networking only supports AF_INET streams at the moment, so we need to do DNS resolution via TCP:
printf '\noptions use-vc' | sudo tee -a /var/lib/faasd/resolv.conf
printf '\noptions use-vc' | sudo tee -a /var/lib/faasd-provider/resolv.conf
sudo cat /var/lib/faasd/secrets/basic-auth-password | faas-cli login -s
faas-cli store deploy "ASCII Cows"
curl http://127.0.0.1:8080/function/cows
To "prove it":
ctr exec
runs in the same kernel as the host however.