Starting lava-run in a user container
We would like to allow users to submit jobs in which they specify the name of a docker container that should be used to run the jobs.
- Allow to use custom tools (qemu, adb, ...) while using a normal LAVA job definition
- testing the tool itself (CI for qemu, gdb or adb)
- using non-upstreamed builds
- The docker image should be able to run lava-run directly (Debian based image)
- Make support a bit more difficult if users are using old versions of the docker image
- Using hub.l.o images might help
- Make some uses cases more difficult (access to /dev/, ...)
- listing the needed devices
- running as privileged? (should be avoided)
- Would need to inherit elements from the wrapper script set by the admins or may need to use configuration set by the admins.
Add a new keyword called image in the job definition at the root level.
job_name: testing qemu docker: image: my_image:latest # or docker_image: my_image:latest
In the device configuration, add the list of device and volumes to bind.
When lava-slave receive the START signal, instead of spawning
lava-run directly, it will call
docker run --rm -it --name lava-<job_id> my_image:latest /usr/bin/lava-run ARGS...