summaryrefslogtreecommitdiff
path: root/docker/ironic
diff options
context:
space:
mode:
authorWill Szumski <will@stackhpc.com>2018-04-19 17:36:08 +0100
committerWill Szumski <will@stackhpc.com>2018-05-15 16:21:18 +0100
commitd63930e3dd80b313822e9f65a76b9c338ef9e389 (patch)
tree9f553f74601092c74843b94009f572c65ec01407 /docker/ironic
parent4b9e6d419148a1fcbe900b7e685ece2a2a3d201c (diff)
downloadkolla-d63930e3dd80b313822e9f65a76b9c338ef9e389.tar.gz
kolla-d63930e3dd80b313822e9f65a76b9c338ef9e389.zip
copy iPXE NBP to /tftpboot during PXE bootstrap
This allows you to chainload iPXE from a standard PXE environment. As the PXE container already has apache installed, we now have everything we need to support iPXE booting. Change-Id: Ide32dc1910e9f8b3ff875238648726f719e271b2 Implements: blueprint ironic-ipxe
Diffstat (limited to 'docker/ironic')
-rw-r--r--docker/ironic/ironic-pxe/extend_start.sh20
1 files changed, 17 insertions, 3 deletions
diff --git a/docker/ironic/ironic-pxe/extend_start.sh b/docker/ironic/ironic-pxe/extend_start.sh
index f7297988c..0ba57a834 100644
--- a/docker/ironic/ironic-pxe/extend_start.sh
+++ b/docker/ironic/ironic-pxe/extend_start.sh
@@ -1,8 +1,7 @@
#!/bin/bash
-# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
-# of the KOLLA_BOOTSTRAP variable being set, including empty.
-if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
+
+function prepare_pxe {
chown -R ironic: /tftpboot
for pxe_file in /var/lib/tftpboot/pxelinux.0 /var/lib/tftpboot/chain.c32 /usr/lib/syslinux/pxelinux.0 \
/usr/lib/syslinux/chain.c32 /usr/lib/PXELINUX/pxelinux.0 \
@@ -11,6 +10,21 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
cp "$pxe_file" /tftpboot
fi
done
+}
+
+function prepare_ipxe {
+ if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
+ cp /usr/lib/ipxe/{undionly.kpxe,ipxe.efi} /tftpboot
+ elif [[ "${KOLLA_BASE_DISTRO}" =~ centos|oraclelinux|rhel ]]; then
+ cp /usr/share/ipxe/{undionly.kpxe,ipxe.efi} /tftpboot
+ fi
+}
+
+# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
+# of the KOLLA_BOOTSTRAP variable being set, including empty.
+if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
+ prepare_pxe
+ prepare_ipxe
exit 0
fi