summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
AgeCommit message (Collapse)AuthorFilesLines
2019-09-03Use yaml safe_load insteald of loadCorentin LABBE1-4/+4
On my gentoo, using yaml.load now give: Traceback (most recent call last): raise RuntimeError("Unsafe load() call disabled by Gentoo. See bug #659348") RuntimeError: Unsafe load() call disabled by Gentoo. See bug #659348 Note that on recent ubuntu, a warning appears also. YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. This is due to a security risk of using yaml.load() Since we didnt rely on any behavour provided by load(), let's convert the call to safe_load().
2019-08-26Add support for device-type aliasCorentin LABBE1-0/+6
This patch adds support for the device-type aliases.
2019-08-26Upgrade to 2019.07Corentin LABBE1-4/+12
This patch upgrade LAVA to 2019.07 via their official docker images. Along with the change of the baseimage from our lava-xx-base to official 2019.07, some minor changes are needed: - Activate the en_US.UTF-8 locale needed for postgresql - chown to lavaserver all copied device-types - Fix the start scripts for using the official entrypoints
2019-06-25lavalab-gen.py: Do not use ser2net when connection_command is setCorentin LABBE1-2/+2
When a custom way of getting serial is set, we should not defaulting to ser2net. This is the case for hsdk which use a spetial console handler via connection_command.
2019-06-10lavalab-gen.py: add localhost to allowed_hostsTobias Olausson1-1/+1
The README mentions using localhost in the quickstart guide, but it doesn't work if only 127.0.0.1 is in that list.
2019-06-04Permit to host healtchecksCorentin LABBE1-2/+12
This patch adds an optional container which host healthchecks images.
2019-05-17lavalab-gen.py: fix read of bind_devCorentin LABBE1-3/+3
Since bind_dev could be set to false, just testing its presence is wrong. This patch made lavalab-gen.py check its value.
2019-05-17lavalab-gen.py: fix NFSCorentin LABBE1-2/+2
The NFS code produce a working docker-compose.yml but this file is dumped before this modification. This patch moves the docker-compose.yml dump after last modifications of the dockcomp variable.
2019-05-17lavalab-gen.py: Modify how to enable TAP devicesCorentin LABBE1-6/+5
Enabling TAP devices is global to a whole worker. So having the flag on devices is wrong. This patchs move the flag "tap" at worker level.
2019-05-13lava-slave: generate lavacli default identitiesCorentin LABBE1-0/+3
2019-05-13lava-slave: support lava-coordinatorCorentin LABBE1-2/+17
This patchs adds a new flag "lava-coordinator" for slave which enables the generation of a lava-coordinator.conf file.
2019-05-03Permit to add extra devices in the slaveCorentin LABBE1-1/+17
This patch permit to adds extra devices (like a USB relay) in the slave
2019-04-25Permit to set arch for arm64 slavesCorentin LABBE1-1/+8
Currently arm64 workers need to modify at hand the from in the dockerfile for using arm64 images. This patch automate this;
2019-04-25Permit to do NFS jobsCorentin LABBE1-1/+10
This patch adds an helper for doing NFS jobs
2019-04-01lavalab-gen.py: add ALLOWED_HOSTSCorentin LABBE1-3/+11
Since 2019.03 , ALLOWED_HOSTS is mandatory in settings.conf. Without it all requests are denied with code 500.
2019-01-15Merge pull request #83 from montjoie/misckhilman1-14/+44
Misc
2019-01-14Permit to choose loglevelCorentin LABBE1-2/+26
By default, all process use the DEBUG loglevel, this could be too much for a production server. This patch permits to tune the loglevel.
2019-01-08lavalab-gen.py: Permit qemu to use TAP devicesCorentin LABBE1-0/+5
For full networking capacity, qemu need to access TAP devices. This patch adds the choice of use it via the tap keyword.
2019-01-07lavalab-gen.py: prevent duplication of device mapCorentin LABBE1-12/+13
If two qemu with KVM enabled are on the same node, the device map "/dev/kvm:/dev/kvm" will be present twice. This patch adds an helper for preventing this. This will also clean the code later which adds serial device.
2018-12-19lavalab-gen: more flexible custom_optionsKevin Hilman1-2/+6
Adding custom options for LAVA often requires specific formatting for the LAVA jinja2 files, including single or double quotes. Rather than also using quotes in the boards.yaml file, use YAML "plain style"[1] avoids the need to add extra quotes or escapes. When using the "|-" for plain style, the custom_options will appear to lavalab-gen as a one long string, rather than a list of options, so here we modify lavalab-gen to handle strings slightly differently than a list. [1] https://yaml.org/spec/1.2/spec.html#id2788859 Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-12-07lavalab-gen.py: ease to use alternate uart than ser2netCorentin LABBE1-1/+3
When someone want to use screen/conmux for a board, the current situation imply to adds use_ser2net = False. This patchs remove this need.
2018-11-30lavalab-gen.py: Made ser2net the defaultCorentin LABBE1-7/+10
This patch makes ser2net the default uart handler.
2018-11-26lavalab-gen.py: Permits to bind host /dev to slaveCorentin LABBE1-2/+6
When using a PDU with crelay, we need to access the whole content /dev/hid/ and so need to bind the whole /dev/ This is also necessary when using the HSDK board which have a serial which appears only when board is powered.
2018-11-20lavalab-gen.py: support adding ser2net optionsCorentin LABBE1-6/+6
2018-11-19Merge pull request #67 from montjoie/interfacenumprkhilman1-12/+7
lavalab-gen.py: Remove udev template for support of interfacenum
2018-11-16lavalab-gen.py: Remove udev template for support of interfacenumCorentin LABBE1-12/+7
The current udev templating is bad since adding a new optional keyword lead to numerous ifelse and templates. This patch simply generate a udev line part by part. This made adding interfacenum easier. This will also permit to mix devpath/serial/etc.. without any problem
2018-11-15lavalab-gen.py: Add missing newline after overridesCorentin LABBE1-2/+2
This patch adds missing newline after overrides. Without them, the generated file is not a valid yaml file
2018-11-02lavalab-gen.py: permit to set env settings on slave via the master nodeCorentin LABBE1-1/+11
Since some setup use distinct boards.yaml for master and slave, a way to set env settings for a slave via the master node is needed.
2018-11-02lavalab-gen.py: permit to set env settings on slaveCorentin LABBE1-1/+14
This patch permits to add some env settings on slave. The primary goal of this is to permits to add a proxy for a specific slave.
2018-11-02lavalab-gen.py: Add slave_keys for copying public slave keysCorentin LABBE1-1/+6
When creating a split boards.yaml with only one master which uses ZMQ, no way to adds slave key exists. This patch fix that by adding a way to copy all slave keys.
2018-10-18lavalab-gen: permit to choose alternate boards.yamlCorentin LABBE1-0/+8
This patch adds an easy way to choose an alternate file than boards.yaml.
2018-10-17Permit to set a group on boardsCorentin LABBE1-0/+7
This patch permit to add a group on boards
2018-10-17Permit to create groupsCorentin LABBE1-2/+23
This patch adds support for creating groups
2018-10-15Permit to give board to userCorentin LABBE1-0/+4
By default LAVA give owning of boards to admin, this patch permit to give board to a specific user.
2018-10-15Rename export_ser2net to expose_ser2netCorentin LABBE1-4/+7
This patch rename export_ser2net to expose_ser2net. The old export_ser2net is still handled but we now print a deprecating message.
2018-10-15lavalab-gen.py: Permit to customize exposed ports to a slaveCorentin LABBE1-1/+4
This patch adds a way to choose a number of ports to be exposed from host to slave.
2018-09-13Permit to add tags to devicesCorentin LABBE1-0/+6
This patch permits to add tags to device Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
2018-09-13lavalab-gen.py: permit to have no master in boards.yamlCorentin LABBE1-11/+21
This patch permits to have a boards.yaml without the master node. In the same time, it permit to have also only a master node without slave. Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
2018-09-13lavalab-gen: fiz zmq key filename assumptionsKevin Hilman1-6/+6
The ZMQ key file names are expected to have specific names in the containers (e.g. $LAVA_MASTER.key). However, when using existing key files, they are simply copied into the containers, and if they don't match the exact requirements, encryption will silently fail. Fix this by allowing arbitrary filenames for existing keys, but ensure they are copied into the container with the expected filenames. Related, when using auto-generated keys, the generated master key is simply "master.key" in the slave. Fix this by ensuring that "master.key" is copied to $LAVA_MASTER.key when the slave container starts. Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-09-07lavalab-gen.py: add default max-connections for ser2netCorentin LABBE1-5/+34
This patch add a ser2net max-connections for all boards
2018-09-03lavalab-gen.py: change default start port for ser2netCorentin LABBE1-1/+2
ser2net port range started from 60000 which is between the Linux dynamic port range: 32768-60999 This patch changes it outside of this range to 63001.
2018-09-03lavalab-gen.py: default_slave is a valid keywordCorentin LABBE1-1/+1
default_slave was not in valid keyword and thus generate a warning. This patch set it as valid and document it in the mean time.
2018-09-03lavalab-gen.py: replace slave_name by worker_nameCorentin LABBE1-7/+7
In the board loop, the slave name is stored in slave_name, but some code after use worker_name. This works when only one slave exists, but fail when it exists multiple slave. This patch replace slave_name by worker_name for being consistent with the naming used in the rest of code.
2018-07-30Fix login failure on httpsCorentin LABBE1-1/+2
When login on LAVA via https, a CSRF failure is done. This is due to missing CSRF_TRUSTED_ORIGINS.
2018-07-26Permit to configure email for LAVA usersCorentin LABBE1-1/+4
2018-07-26lavalab-gen.py: use zmq_auth valueCorentin LABBE1-1/+3
The current script just check for zmq_auth presence and does not check if it is set to false. this patch fix that!
2018-07-26Permit to choose the FQDN printed in emailCorentin LABBE1-1/+8
2018-07-25Remove build-lavaCorentin LABBE1-2/+0
We no longer build LAVA from source, so all build-lava stuff must go.
2018-07-24lavalab-gen.py: token is optional for usersCorentin LABBE1-2/+3
2018-07-23Merge pull request #33 from montjoie/zmq_authkhilman1-3/+30
Zmq auth