diff options
author | Kevin Hilman <khilman@baylibre.com> | 2020-09-04 16:09:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 16:09:05 -0700 |
commit | ea5ae2e3cc03560683b019d9bcf78657dec35138 (patch) | |
tree | 2fb0d01b5a5ace52d1a180c94284842880de5548 | |
parent | 9b1a827ac2eecb9f251881f2092305baace99c45 (diff) | |
parent | 0b86dcfa7ca3bc1342d1379a29a91f30f861fee2 (diff) |
Merge pull request #127 from montjoie/misc-09-2020
Misc 09 2020
-rw-r--r-- | README.md | 27 | ||||
-rwxr-xr-x | backup.sh | 12 | ||||
-rwxr-xr-x | deploy.sh | 4 |
3 files changed, 35 insertions, 8 deletions
@@ -23,6 +23,8 @@ The following packages are necessary on the host machine: * docker-compose * pyyaml +If you plan to use docker/fastboot tests, you will need probably also to install lava-dispatcher-host. + ## Quickstart Example to use lava-docker with only one QEMU device: @@ -410,6 +412,31 @@ For running all images, simply run: docker-compose up -d ``` +### Enabling ZMQ encryption +Enabling ZMQ is all or nothing. +You need to generate keys for both master AND workers. +Generate thoses keys via: +``` +zmqauth/zmq_auth_gen/create_certificate.py --directory . nameofyourworker +``` +This will produce two files: +* A public key ending with ".key" +* A private key ending with ".key_secret" + +Since ZMQ keys does not store any information like name, filename could be different between master and workers. + +As general note, LAVA will use the hostname (and so the name in the master/worker node) for finding ZMQ keys. + +#### Naming convention for master +ZMQ key for master should be named according to the name used in master node. +ZMQ key for worker should be named according to the name in the worker node +lava-docker will automaticly copy master zmq_auth_key/zmq_auth_key_secret to name.key/name.key_secret + +#### Naming convention for workers +ZMQ public key for master should be named according to the remote_address used in worker node. +ZMQ key for worker should be named according to the name in the worker node +lava-docker will automaticly copy master zmq_auth_master_key to remote_address.key + ## Proxy cache (Work in progress) A squid docker is provided for caching all LAVA downloads (image, dtb, rootfs, etc...)<br/> For the moment, it is unsupported and unbuilded. @@ -15,19 +15,19 @@ if [ -z "$DOCKERID" ];then exit 1 fi -docker exec -t $DOCKERID tar czf /root/devices.tar.gz /etc/lava-server/dispatcher-config/devices/ || exit $? +docker exec $DOCKERID tar czf /root/devices.tar.gz /etc/lava-server/dispatcher-config/devices/ || exit $? docker cp $DOCKERID:/root/devices.tar.gz $BACKUP_DIR/ || exit $? # for an unknown reason pg_dump > file doesnt work -docker exec -t $DOCKERID sudo -u postgres pg_dump --create --clean lavaserver --file /tmp/db_lavaserver || exit $? -docker exec -t $DOCKERID gzip /tmp/db_lavaserver || exit $? +docker exec $DOCKERID sudo -u postgres pg_dump --create --clean lavaserver --file /tmp/db_lavaserver || exit $? +docker exec $DOCKERID gzip /tmp/db_lavaserver || exit $? docker cp $DOCKERID:/tmp/db_lavaserver.gz $BACKUP_DIR/ || exit $? -docker exec -t $DOCKERID rm /tmp/db_lavaserver.gz || exit $? +docker exec $DOCKERID rm /tmp/db_lavaserver.gz || exit $? # tar outputs warnings when file changes on disk while creating tar file. So do not "exit on error" -docker exec -t $DOCKERID tar czf /root/joboutput.tar.gz /var/lib/lava-server/default/media/job-output/ || echo "WARNING: tar operation returned $?" +docker exec $DOCKERID tar czf /root/joboutput.tar.gz /var/lib/lava-server/default/media/job-output/ || echo "WARNING: tar operation returned $?" docker cp $DOCKERID:/root/joboutput.tar.gz $BACKUP_DIR/ || exit $? -docker exec -t $DOCKERID rm /root/joboutput.tar.gz || exit $? +docker exec $DOCKERID rm /root/joboutput.tar.gz || exit $? echo "Backup done in $BACKUP_DIR" rm -f backup-latest @@ -5,8 +5,8 @@ BEROOT="" if [ $(id -u) -ne 0 ];then BEROOT="sudo " fi -$BEROOT rm /etc/udev/rules.d/*lava*rules -$BEROOT cp udev/*lava*rules /etc/udev/rules.d/ +$BEROOT rm /etc/udev/rules.d/*lavaworker-udev*rules +$BEROOT cp udev/*lavaworker-udev*rules /etc/udev/rules.d/ $BEROOT udevadm control --reload-rules || exit $? $BEROOT udevadm trigger || exit $? |