summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lava-slave/Dockerfile3
-rwxr-xr-xlava-slave/scripts/setup.sh6
2 files changed, 7 insertions, 2 deletions
diff --git a/lava-slave/Dockerfile b/lava-slave/Dockerfile
index d6375f2..5fdae2f 100644
--- a/lava-slave/Dockerfile
+++ b/lava-slave/Dockerfile
@@ -41,8 +41,7 @@ RUN apt-get -y install lavacli
RUN if [ $(uname -m) != amd64 ]; then dpkg --add-architecture amd64 && apt-get update; fi
RUN apt-get -y install grub-efi-amd64-bin:amd64
RUN if [ $(uname -m) != amd64 ]; then dpkg --remove architecture amd64 && apt-get update; fi
-RUN cd /var/lib/lava/dispatcher/tmp && grub-mknetdir --net-directory=.
-COPY grub.cfg /var/lib/lava/dispatcher/tmp/boot/grub/
+COPY grub.cfg /root/
COPY default/* /etc/default/
diff --git a/lava-slave/scripts/setup.sh b/lava-slave/scripts/setup.sh
index fce01f8..1fb0bb3 100755
--- a/lava-slave/scripts/setup.sh
+++ b/lava-slave/scripts/setup.sh
@@ -10,6 +10,12 @@ if [ -z "$LAVA_MASTER_URI" ];then
exit 11
fi
+# Install PXE
+OPWD=$(pwd)
+cd /var/lib/lava/dispatcher/tmp && grub-mknetdir --net-directory=.
+cp /root/grub.cfg /var/lib/lava/dispatcher/tmp/boot/grub/
+cd $OPWD
+
lavacli identities add --uri $LAVA_MASTER_BASEURI --token $LAVA_MASTER_TOKEN --username $LAVA_MASTER_USER default
echo "Dynamic slave for $LAVA_MASTER ($LAVA_MASTER_URI)"