openscanhub / openscanhub

OpenScanHub is a service for static and dynamic analysis.
https://openscanhub.dev
GNU General Public License v3.0
16 stars 11 forks source link

Shall we use resalloc to dynamically provision workers? #82

Open siteshwar opened 1 year ago

siteshwar commented 1 year ago

I am opening this issue after discussing dynamic provisioning of workers with @lzaoral and @praiskup.

resalloc is a resource manager for resources like virtual machines, containers etc. It is used inside Copr infrastrucutre to manage builders (workers). It currently support AWS, OpenStack, IBM cloud, kubernetes etc. and is extensible to other infrastrucutres. We can possibly use resalloc to dynamically allocate and manage workers in OpenScanHub deployments. This issue tracks if we should have a hard dependency on resalloc. If not, how resalloc could be used with OpenScanHub for dynamic provisioning of workers.

Project page:

Fedora Copr configuration:

The current "state" of the systems (overview page):

Available in Fedora and Fedora EPEL:

Helper scripts for starting VMs:

Example: vm_alloc.py Internal GitLab issue: https://gitlab.cee.redhat.com/covscan/covscan/-/issues/95

praiskup commented 1 year ago

I am opening this issue after discussing dynamic provisioning of workers with @lzaoral and @praiskup.

Thank you for the issue! Just a few additions:

It is used inside Copr infrastrucutre to manage builders (workers).

Yes, exactly - the "Builder" and "Worker" are a bit confusing terms when we talk about OpenScanHub and Copr. Copr isn't using the Kobo framework; in the Copr architecture we have basically just one "Worker" (named Backend), and that "Worker" controls all the (even hundreds of) parallel tasks alone and delegates the heavy work (Mock processes) to Builders over SSH.

Example: vm_alloc.py

If this needs to be generalized into a library for better reuse, let us know.

siteshwar commented 1 year ago

I discussed this issue with @kdudka and we agreed to introduce an optional dependency on resalloc in hub component.

siteshwar commented 11 months ago

This issue is still working in progress. @praiskup is prototyping a daemon that should fit OpenScanHub's workflow to dynamically spin up workers (https://github.com/praiskup/resalloc/pull/125).