Reorganize Lava Config project
Some issues left I won't have time to resolve.
Lava Config project should be free of heavy code. All the scripting should be moved to a separate project and pulled from there with Lava Ansible Playbooks when an update is triggered.
Part under the question: https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/tree/dce7182b79bc2a213bc520c0f01fdbc346d410da/lava.ostc-eu.org/dispatcher-configs/common.warsaw/lava-dispatcher-host/build/tools
At the moment referred set of scripts has the following problems in addition to the already mentioned one above:
- Scripts manipulating network devices are restricted to a single set of credentials in the configuration file per device type. Therefore from one worker, only one device of each type could be manipulated or all the devices of a type have to have the same set of credentials. The workaround is to set the environment variables with credentials during the script execution, but there is no way to hide environment variables during lava job submission/execution. Devices affected: PDUs and switches controlling power on DUTs.
- Credentials are stored as plain text on workers.
- GPIO-related scripts have GPIO pins hardcoded. Setups are required to be connected to certain predefined pins to function.
The setup as in its current state is unsuitable for large deployments.