diff options
Diffstat (limited to 'lava-master')
-rw-r--r-- | lava-master/Dockerfile | 12 | ||||
-rwxr-xr-x | lava-master/scripts/setup.sh | 4 |
2 files changed, 11 insertions, 5 deletions
diff --git a/lava-master/Dockerfile b/lava-master/Dockerfile index 5d2a119..9b56be8 100644 --- a/lava-master/Dockerfile +++ b/lava-master/Dockerfile @@ -1,4 +1,4 @@ -FROM baylibre/lava-master-base:2018.11-1_bpo9_1 +FROM baylibre/lava-master-base:2019.03_stretch COPY backup /root/backup/ @@ -20,11 +20,13 @@ COPY scripts/setup.sh / COPY settings.conf /etc/lava-server/ -COPY device-types-patch/ /root/device-types-patch/ -RUN cd /etc/lava-server/dispatcher-config/device-types/ && for patch in $(ls /root/device-types-patch/*patch) ; do sed -i 's,lava_scheduler_app/tests/device-types/,,' $patch && patch < $patch || exit $?; done - COPY lava-patch/ /root/lava-patch -RUN cd /usr/lib/python3/dist-packages && for patch in $(ls /root/lava-patch/*patch) ; do patch -p1 < $patch || exit $?;done +RUN cd /usr/lib/python3/dist-packages && for patch in $(ls /root/lava-patch/*patch| sort) ; do echo $patch && patch -p1 < $patch || exit $?;done +RUN rsync -avr /usr/lib/python3/dist-packages/lava_scheduler_app/tests/device-types/ /etc/lava-server/dispatcher-config/device-types/ + +COPY device-types-patch/ /root/device-types-patch/ +RUN cd /etc/lava-server/dispatcher-config/device-types/ && for patch in $(ls /root/device-types-patch/*patch) ; do sed -i 's,lava_scheduler_app/tests/device-types/,,' $patch && echo $patch && patch < $patch || exit $?; done +RUN chown -R lavaserver:lavaserver /etc/lava-server/dispatcher-config/device-types/ COPY zmq_auth/ /etc/lava-dispatcher/certificates.d/ diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh index c22a06f..489dd51 100755 --- a/lava-master/scripts/setup.sh +++ b/lava-master/scripts/setup.sh @@ -151,6 +151,10 @@ mkdir -p /root/.lavadocker/ if [ -e /root/device-types ];then for i in $(ls /root/device-types/*jinja2) do + if [ -e /etc/lava-server/dispatcher-config/device-types/$(basename $i) ];then + echo "WARNING: overwriting device-type $i" + diff -u "/etc/lava-server/dispatcher-config/device-types/$(basename $i)" $i + fi cp $i /etc/lava-server/dispatcher-config/device-types/ devicetype=$(basename $i |sed 's,.jinja2,,') lava-server manage device-types list | grep -q "[[:space:]]$devicetype[[:space:]]" |