cloudbase / garm-provider-common

Common functionality for GARM providers
https://github.com/cloudbase/garm-provider-common
Apache License 2.0
0 stars 5 forks source link

Use overlayfs on system that supports it for cached runner #29

Closed gabriel-samfira closed 3 months ago

gabriel-samfira commented 4 months ago

This change allows providers to use overlayfs for the cached runner, with a fallback to the old way of copying everything.

The writable upper dir is customizable via extra specs by setting the extra_context["OVF_DIR"] value to a different location on disk.

Example:

garm-cli pool update 84944b12-5f80-469c-9152-4e352ea570f8 
  --extra-specs='{"extra_context": {"OFS_DIR": "/home/runner/overlay-work"}}'

If your runner has a volume attached that you'd rather use for the overlay data, or just because you prefer a different location on disk, this option should give you the desired result. If not set, it falls back to /opt/work

This should speed up runner installation considerably.

Providers will have to be updated and the extra_context extra spec to be added to the allowed extra specs of the provider before this works.

gabriel-samfira commented 4 months ago

CC @maigl @bavarianbidi

gabriel-samfira commented 4 months ago

CC @Hdom