/
Submitting Jobs to LAVA Lab

Submitting Jobs to LAVA Lab

This page provides instructions on setting up and submitting jobs to the Linaro production LAVA server, aka LAVA lab, aka https://validation.linaro.org . These instruction are very similar to steps required for local Docker-based LAVA setup: Getting Started with LAVA, Docker, and a FRDM-K64F:#SetupUser&Token , but for quick reference are provided on this page.

One-time setup: Creating server identity for lavacli tool

The tool for LAVA job submission (and performing other LAVA operations), lavacli, needs to know to which server you want to submit, and how to authenticate to it. It achieves that using concept of "identity" which is effectively a short ID for a following triple: a) target LAVA server API endpoint; b) username; c) auth token. Following are step require to set up LAVA Lab server identity on a system from which you will submit tests:

  1. Make sure that lavacli is installed: lavacli --version. If not, install it with pip3 install --user lavacli .
  2. Log in to https://validation.linaro.org/ . Choose "API" menu at the top bar, and "Authentication Tokens" under it.
  3. Click "New" button.
  4. Once created, click button with icon of an eye, to show auth token value (long string letters and digits).
  5. On your local command line, execute: lavacli identities add --username <first.last> --token <token> --uri https://validation.linaro.org/RPC2 vlo . <first.last> is your Linaro username, <token> is the token value. This will create identity named "vlo". You can choose another name if you like.

If you intend to submit from multiple systems, repeat the above setup steps on each of them. It's up to you whether to use single token for all systems, or generate individual tokens for each (the security best practices suggest the latter).

Submitting a job

You are now ready to submit a job. As a quick-start example, assuming you have a checkout of https://github.com/Linaro/lite-lava-docker-compose repository:

lavacli -i vlo jobs submit example/tfm-regression-qemu.job

The output of the command will be the ID of the submitted job. You can reach that job via the https://validation.linaro.org/scheduler/alljobs page, it will be among the jobs at the top of the list, or directly via URL https://validation.linaro.org/scheduler/job/ID , replacing ID with the output id from the lavacli command.

Referencing test binaries in the job

You should keep in mind that LAVA Lab server should be able to download test binary as specified in your job. Of course, for this it needs to be hosted on a public HTTP server. In the https://github.com/Linaro/lite-lava-docker-compose repository, we mostly follow a convention that test binaries are included in the repository itself, and are referenced using file:// scheme. In other words, test examples in that repository are optimized for running with local LAVA setup, without relying on the Internet connection (which may be quite helpful on the go). example/tfm-regression-qemu.job is about the only job which references test binary via HTTP URL, and that's why it was used in the submission example above.

Going forward, we may want to establish some conventions to deal with that. Actually, already now many example jobs included in that repository offer both local and remote URLs for test binaries, with remote being commented by default, but can be easily uncommented to submit to a remote server like https://validation.linaro.org/ :

images:
zephyr:
image_arg: '-kernel {zephyr}'
#url: http://snapshots.linaro.org/components/kernel/aeolus-2/micropython/pfalcon/zephyr/qemu_cortex_m3/923/zephyr.bin
url: file:///test-images/qemu_cortex_m3/micropython/zephyr.bin


Related content