Skip to content

Debug CRI runners

Dmitrii Ustiugov edited this page Dec 29, 2022 · 6 revisions

You can a kind cluster to run CRI tests for your forked repo.

# Set up the host (the same script as for the self-hosted GitHub CI runner)
./scripts/github_runner/setup_runner_host.sh
# If the $HOSTNAME contains characters which are not allowed in Github runner name, change it to something concise.
export HOSTNAME=cloudlab
# start the runner and connect it to github
# More than 1 runners per machine do not work currently
/scripts/github_runner/start_runners.sh 1 https://github.com/<OWNER>/<REPO> <Github Access key> cri

You can SSH into the container using:

# find out the container name using
docker ps
# open a terminal inside the container
docker exec -it <container name> bash

If something goes wrong and you want to re-spawn the runner:

/scripts/github_runner/start_runners.sh 1 https://github.com/<OWNER>/<REPO> <Github Access key> cri restart

You should be able to see the runner listed on your repo after a few minutes and should be able to run your tests there. If you want to setup the vHive cluster manually inside a kind container, refer this.

How to set up a runner for Firecracker CRI tests in multipass

On host:

sudo apt -y install bridge-utils cpu-checker libvirt-clients libvirt-daemon qemu qemu-kvm
./vHive/scripts/github_runner/setup_runner_host.sh
sudo snap connect multipass:libvirt
kvm-ok
# Lunch a VM
multipass launch 20.04 --cpus=8 --mem=16G --disk=40G
multipass shell <NAME>

In the guest:

sudo apt -y install bridge-utils cpu-checker libvirt-clients libvirt-daemon qemu qemu-kvm
./vHive/scripts/github_runner/setup_runner_host.sh
kvm-ok

./vHive/scripts/github_runner/start_runners.sh <...>