Elektrobit / flake-pilot

Registration/Control utility for applications launched through a runtime-engine, e.g containers
MIT License
9 stars 5 forks source link

Firecracker Robot Tests #151

Open Ichmed opened 1 year ago

Ichmed commented 1 year ago

In order to run firecracker tests in GitHub actions we need a publicly available and stable way to install firecracker on the runner.

schaefi commented 1 year ago

I suggest to use a custom container which includes firecracker. Such a container can be found here

I think we can reference this container in a github action like this

jobs:
  test:
    runs-on: ubuntu-latest
    container: registry.opensuse.org/home/marcus.schaefer/delta_containers/images_15.4/flakeos:latest
    steps:
        ...

I haven't tested this but it should pull the container and allows to run the workflow. Missing components, e.g the robot framework can either be added inside of the container or installed by the action inside of the container instance. For performance reasons it might be better to add the framework into the container imho

But there is probably another issue.

Running firecracker requires KVM, meaning the runner must expose /dev/kvm and I doubt that this is done by the github runners. If we cannot have a runner with KVM support we need to host our own runner. This would require some infrastructure to maintain.

Thus this issue can cause some headaches

schaefi commented 1 year ago

In addition it might require the containers called on the runners to be privileged such that access to /dev/kvm is granted. So there are some unknowns which needs to be tested at best outside of github to know the pre-conditions better

schaefi commented 1 year ago

One option to maintain our own runner would be a metal instance in AWS or GCE supporting nested virtualization. Keeping such an instance open 24x7 will produce costs though. This is the reason why I don't have an always running instance of this type in my AWS account. I think at EB you could ask for this to allow the tests to run. Not sure if the small project here is enough justification. Maybe a topic for Bo to clarify