This repo contains:
server/nixos
is the NixOS configwindows10/*
is for Windows 10 runnersubuntu2204/*
is for Ubuntu 22.04 runners*/configure-base.sh
*/configure-runner.sh
create-runner.sh
creates and registers a new runnerdestroy-runner.sh
destroys the libvirt guest and ZFS volume for a runnerregister-runner.sh
registers a runner with the GitHub APIunregister-runner.sh
unregisters a runner with the GitHub APImount-runner.sh
mounts the main filesystem of a runner on the hostmonitor
is the service.env.example
contains the settingsOverview of the server scripts:
server/build-nixos-installer-kexec.sh
server/start-nixos-installer.sh
server/first-time-install.sh <hostname> <disk> [disk ...]
server/install-or-reinstall.sh <hostname> <path/to/mnt>
server/deploy.sh
server/update.sh
Start the rescue system, then run the following:
$ git clone https://github.com/servo/ci-runners.git
$ cd ci-runners/server
$ apt install -y zsh
$ ./start-nixos-installer.sh
Reconnect over SSH, then run the following:
$ nix-shell -p git zsh jq
$ git clone https://github.com/servo/ci-runners.git
$ cd ci-runners/server
$ ./first-time-install.sh ci0 /dev/nvme{0,1}n1
$ reboot
Reconnect over SSH again, then run the following:
$ git clone https://github.com/servo/ci-runners.git /config
$ /config/server/update.sh
To get a GITHUB_TOKEN for the monitor service:
servo/ci-runners ci0
To set up the monitor service, run the following:
$ zfs create tank/base
$ zfs create tank/ci
$ virsh net-define cinet.xml
$ virsh net-autostart cinet
$ virsh net-start cinet
$ rustup default stable
$ git clone https://github.com/servo/servo.git ~/servo
$ cp /config/.env.example /config/.env
$ vim /config/.env
$ cd /config
$ RUST_LOG=debug cargo run
Runners created from this image preinstall all dependencies (including those specified in the main repo, like GStreamer and Chocolatey deps), preload the main repo, and prebuild Servo in the release profile.
To build the base vm, first build a clean image:
zfs create -V 90G tank/base/servo-windows10.clean
virsh define windows10.xml
virt-clone --preserve-data --check path_in_use=off -o servo-windows10.init -n servo-windows10.clean -f /dev/zvol/tank/base/servo-windows10.clean
virsh undefine servo-windows10.init
virsh start servo-windows10.clean
E:\vioscsi\w10\amd64
virsh shutdown servo-windows10.clean
zfs snapshot tank/base/servo-windows10.clean@fresh-install
virsh start servo-windows10.clean
servo
shutdown /s /t 0
zfs snapshot tank/base/servo-windows10.clean@oobe
Then build the base image:
zfs clone tank/base/servo-windows10{.clean@oobe,.new}
virt-clone --preserve-data --check path_in_use=off -o servo-windows10.clean -n servo-windows10.new -f /dev/zvol/tank/base/servo-windows10.new
./mount-runner.sh servo-windows10.new $PWD/windows10/configure-base.sh
zfs snapshot tank/base/servo-windows10.new@configure-base
virsh start servo-windows10.new
C:\init\init.ps1
shutdown /s /t 0
zfs snapshot tank/base/servo-windows10.new@ready
zfs destroy -r tank/base/servo-windows10
zfs rename tank/base/servo-windows10{.new,}
virsh undefine servo-windows10.new
virt-clone --preserve-data --check path_in_use=off -o servo-windows10.clean -n servo-windows10 -f /dev/zvol/tank/base/servo-windows10
To clone and start a new runner:
$ ./create-runner.sh servo-windows10 ready windows10
To build the base vm, first build a clean image:
zfs create -V 90G tank/base/servo-ubuntu2204.clean
virsh define ubuntu2204.xml
virt-clone --preserve-data --check path_in_use=off -o servo-ubuntu2204.init -n servo-ubuntu2204.clean -f /dev/zvol/tank/base/servo-ubuntu2204.clean
virsh undefine servo-ubuntu2204.init
virsh start servo-ubuntu2204.clean
servo-ubuntu2204
servo
and servo2024!
zfs snapshot tank/base/servo-ubuntu2204.clean@fresh-install
Then build the base image:
zfs clone tank/base/servo-ubuntu2204{.clean@fresh-install,.new}
virt-clone --preserve-data --check path_in_use=off -o servo-ubuntu2204.clean -n servo-ubuntu2204.new -f /dev/zvol/tank/base/servo-ubuntu2204.new
./mount-runner.sh servo-ubuntu2204.new $PWD/ubuntu2204/configure-base.sh
zfs snapshot tank/base/servo-ubuntu2204.new@configure-base
virsh start servo-ubuntu2204.new
journalctl -b
zfs snapshot tank/base/servo-ubuntu2204.new@ready
zfs destroy -r tank/base/servo-ubuntu2204
zfs rename tank/base/servo-ubuntu2204{.new,}
virsh undefine servo-ubuntu2204.new
virt-clone --preserve-data --check path_in_use=off -o servo-ubuntu2204.clean -n servo-ubuntu2204 -f /dev/zvol/tank/base/servo-ubuntu2204
To clone and start a new runner:
$ ./create-runner.sh servo-ubuntu2204 ready ubuntu2204
To build the base vm, first build a clean image:
git clone https://github.com/kholia/OSX-KVM.git /var/lib/libvirt/images/OSX-KVM
zfs create -V 90G tank/base/servo-macos13.clean
virsh define macos13.xml
virt-clone --preserve-data --check path_in_use=off -o servo-macos13.init -n servo-macos13.clean --nvram /var/lib/libvirt/images/OSX-KVM/OVMF_VARS.servo-macos13.clean.fd -f /var/lib/libvirt/images/OSX-KVM/OpenCore/OpenCore.qcow2 -f /dev/zvol/tank/base/servo-macos13.clean -f /var/lib/libvirt/images/OSX-KVM/BaseSystem.img
cp /var/lib/libvirt/images/OSX-KVM/{OVMF_VARS-1920x1080.fd,OVMF_VARS.servo-macos13.clean.fd}
virsh undefine --keep-nvram servo-macos13.init
virsh start servo-macos13.clean
diskutil list | grep GB
and find the diskN
line that is around 96.6 GBdiskutil partitionDisk diskN 2 GPT ExFAT a 60G APFS macOS 0G
virsh shutdown servo-macos13.clean
zfs snapshot tank/base/servo-macos13.clean@fresh-install
virsh start servo-macos13.clean
servo
servo
servo2024!
virsh shutdown servo-macos13.clean
zfs snapshot tank/base/servo-macos13.clean@oobe
SERVO_CI_DONT_CREATE_RUNNERS
, to free up some resourcesgit -C ~/servo pull
zfs destroy
stepSERVO_CI_DONT_CREATE_RUNNERS
./mach try win -r upstream
SERVO_CI_DONT_CREATE_RUNNERS