Skip to content
Snippets Groups Projects

Draft: gitlab_runner: Add custom libvirt executor

Closed Kristian Klausen requested to merge klausenbusk/infrastructure:libvirt-executor into master
All threads resolved!

arch-boxes and archiso currently runs the build inside a TCG accelerated qemu VM. It works but it is slow and adds unnecessary complexity to both projects.

With this MR I want to add a custom executor which would allow us to run the jobs inside a real KVM accelerated VM. It would make the builds faster and remove complexity from both arch-boxes and archiso (and add some complexity to the infra).

The basic idea (from the issue: #283 (closed) (slightly modified)):

  • Create a script which download the newest arch-boxes basic image once a day and:
    • Create a new VM (virtio-rng, virtio-balloon, watchdog?)
    • Boot it and wait for network
    • Set mirror to https://mirror.pkgbuild.com
    • pacman -Syu
    • Install all the relevant packages required by gitlab (git, git-lfs and gitlab-runner)
    • IgnorePkg = linux
  • Create a custom executor (inspiration)
    • It should clone the VM prepared by the mentioned script
    • Wait for it to boot and SSH into it
    • Run the job
    • Delete the VM

TODO:

  • Is the idea feasible / worth it? Go/no go?
  • Add libvirt role
  • Switch from the arch-boxes basic image to the cloud image (should remove some complexity in theory)
  • Finish the custom executor scripts (they are POC at best right now)
  • Add systemd service and timer for syncing

Ref #283 (closed)

Edited by Kristian Klausen

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    Compare with previous version

  • Kristian Klausen resolved all threads

    resolved all threads

  • Kristian Klausen added 3 commits

    added 3 commits

    • 8726878f - Move libvirt-executor to the correct role (gitlab_runner)
    • 7ab00a17 - Use the cloud image and userdata instead of sshpass magic
    • abb57b96 - IgnorePkg = linux

    Compare with previous version

  • Kristian Klausen marked the checklist item Switch from the arch-boxes basic image to the cloud image (should remove some complexity in theory) as completed

    marked the checklist item Switch from the arch-boxes basic image to the cloud image (should remove some complexity in theory) as completed

  • added 1 commit

    Compare with previous version

  • Kristian Klausen resolved all threads

    resolved all threads

  • added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading