Merge "Support PXE network boot with grub"
This commit is contained in:
commit
18712af740
@ -17,6 +17,7 @@
|
|||||||
USE_DHCP: "{{ use_dhcp | default(false) | bool | lower }}"
|
USE_DHCP: "{{ use_dhcp | default(false) | bool | lower }}"
|
||||||
ZUUL_BRANCH: "{{ zuul.branch }}"
|
ZUUL_BRANCH: "{{ zuul.branch }}"
|
||||||
BOOT_MODE: "{{ boot_mode | default('') }}"
|
BOOT_MODE: "{{ boot_mode | default('') }}"
|
||||||
|
ENABLE_GRUB_NETWORK_BOOT: "{{ enable_grub_network_boot | default(false) | bool | lower }}"
|
||||||
TEST_VM_NODE_DRIVER: "{{ test_driver | default('ipmi') }}"
|
TEST_VM_NODE_DRIVER: "{{ test_driver | default('ipmi') }}"
|
||||||
NOAUTH_MODE: "{{ noauth_mode | default(false) | bool | lower }}"
|
NOAUTH_MODE: "{{ noauth_mode | default(false) | bool | lower }}"
|
||||||
ENABLE_TLS: "{{ enable_tls | default(false) | bool | lower }}"
|
ENABLE_TLS: "{{ enable_tls | default(false) | bool | lower }}"
|
||||||
|
@ -88,6 +88,9 @@ dhcp-option=42,{{dnsmasq_ntp_servers}}
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
dhcp-match=set:ipxe,175 # iPXE sends a 175 option.
|
dhcp-match=set:ipxe,175 # iPXE sends a 175 option.
|
||||||
|
dhcp-match=set:efi,option:client-arch,7
|
||||||
|
dhcp-match=set:efi,option:client-arch,9
|
||||||
|
dhcp-match=set:efi,option:client-arch,11
|
||||||
|
|
||||||
dhcp-optsdir={{ dnsmasq_dhcp_optsdir }}
|
dhcp-optsdir={{ dnsmasq_dhcp_optsdir }}
|
||||||
{% if dhcp_provider == 'none' %}
|
{% if dhcp_provider == 'none' %}
|
||||||
@ -97,10 +100,10 @@ dhcp-optsdir={{ dnsmasq_dhcp_optsdir }}
|
|||||||
dhcp-userclass=set:gpxe,"gPXE"
|
dhcp-userclass=set:gpxe,"gPXE"
|
||||||
dhcp-boot=tag:gpxe,/ipxe.pxe
|
dhcp-boot=tag:gpxe,/ipxe.pxe
|
||||||
|
|
||||||
{% if 'ipxe' in enabled_boot_interfaces.split(',') %}
|
{% if default_boot_interface is defined and default_boot_interface == 'pxe' %}
|
||||||
dhcp-match=set:efi,option:client-arch,7
|
# Client is PXE booting over EFI, boot with the grub shim
|
||||||
dhcp-match=set:efi,option:client-arch,9
|
dhcp-boot=tag:efi,/bootx64.efi
|
||||||
dhcp-match=set:efi,option:client-arch,11
|
{% elif 'ipxe' in enabled_boot_interfaces.split(',') %}
|
||||||
# Client is PXE booting over EFI without iPXE ROM; send EFI version of iPXE chainloader
|
# Client is PXE booting over EFI without iPXE ROM; send EFI version of iPXE chainloader
|
||||||
dhcp-boot=tag:efi,tag:!ipxe,/{{ ipxe_efi_binary }}
|
dhcp-boot=tag:efi,tag:!ipxe,/{{ ipxe_efi_binary }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
10
releasenotes/notes/grub-network-boot-a27beef089e041ef.yaml
Normal file
10
releasenotes/notes/grub-network-boot-a27beef089e041ef.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
It is now possible to do a PXE network boot with grub as an alternative to
|
||||||
|
iPXE. Grub is loaded via the signed shim, so it may allow end-to-end
|
||||||
|
automated deployments with secure-boot enabled.
|
||||||
|
|
||||||
|
To use grub network boot, deploy bifrost with variable
|
||||||
|
``default_boot_interface`` set to ``pxe`` and use the ``pxe`` boot interface
|
||||||
|
when deploying nodes.
|
@ -12,6 +12,7 @@ ENABLE_KEYSTONE="${ENABLE_KEYSTONE:-false}"
|
|||||||
ZUUL_BRANCH=${ZUUL_BRANCH:-}
|
ZUUL_BRANCH=${ZUUL_BRANCH:-}
|
||||||
CLI_TEST=${CLI_TEST:-false}
|
CLI_TEST=${CLI_TEST:-false}
|
||||||
BOOT_MODE=${BOOT_MODE:-}
|
BOOT_MODE=${BOOT_MODE:-}
|
||||||
|
ENABLE_GRUB_NETWORK_BOOT=${ENABLE_GRUB_NETWORK_BOOT:-false}
|
||||||
ENABLE_TLS=${ENABLE_TLS:-false}
|
ENABLE_TLS=${ENABLE_TLS:-false}
|
||||||
ENABLE_PROMETHEUS_EXPORTER=${ENABLE_PROMETHEUS_EXPORTER:-false}
|
ENABLE_PROMETHEUS_EXPORTER=${ENABLE_PROMETHEUS_EXPORTER:-false}
|
||||||
USE_VMEDIA=${USE_VMEDIA:-false}
|
USE_VMEDIA=${USE_VMEDIA:-false}
|
||||||
@ -45,6 +46,7 @@ PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-900}
|
|||||||
NOAUTH_MODE=${NOAUTH_MODE:-false}
|
NOAUTH_MODE=${NOAUTH_MODE:-false}
|
||||||
CLOUD_CONFIG=""
|
CLOUD_CONFIG=""
|
||||||
WAIT_FOR_DEPLOY=true
|
WAIT_FOR_DEPLOY=true
|
||||||
|
TEST_VM_NODE_DRIVER=${TEST_VM_NODE_DRIVER:-}
|
||||||
|
|
||||||
# Get OS information
|
# Get OS information
|
||||||
source /etc/os-release || source /usr/lib/os-release
|
source /etc/os-release || source /usr/lib/os-release
|
||||||
@ -119,8 +121,13 @@ fi
|
|||||||
if [ ${USE_VMEDIA} = "true" ]; then
|
if [ ${USE_VMEDIA} = "true" ]; then
|
||||||
TEST_VM_NODE_DRIVER=redfish
|
TEST_VM_NODE_DRIVER=redfish
|
||||||
CLOUD_CONFIG+=" -e default_boot_interface=redfish-virtual-media"
|
CLOUD_CONFIG+=" -e default_boot_interface=redfish-virtual-media"
|
||||||
# The default won't work for other hardware types
|
elif [ ${ENABLE_GRUB_NETWORK_BOOT} = "true" ]; then
|
||||||
CLOUD_CONFIG+=" -e enabled_hardware_types=redfish"
|
CLOUD_CONFIG+=" -e default_boot_interface=pxe"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$TEST_VM_NODE_DRIVER" ]]; then
|
||||||
|
VM_SETUP_EXTRA+=" --driver $TEST_VM_NODE_DRIVER"
|
||||||
|
CLOUD_CONFIG+=" -e enabled_hardware_types=$TEST_VM_NODE_DRIVER"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
on_exit() {
|
on_exit() {
|
||||||
@ -150,7 +157,6 @@ done
|
|||||||
--memory ${VM_MEMORY_SIZE:-1024} \
|
--memory ${VM_MEMORY_SIZE:-1024} \
|
||||||
--disk ${VM_DISK:-5} \
|
--disk ${VM_DISK:-5} \
|
||||||
--inventory "${BAREMETAL_DATA_FILE}" \
|
--inventory "${BAREMETAL_DATA_FILE}" \
|
||||||
--driver ${TEST_VM_NODE_DRIVER:-ipmi} \
|
|
||||||
--extra-vars git_url_root="${WORKSPACE:-https://opendev.org}" \
|
--extra-vars git_url_root="${WORKSPACE:-https://opendev.org}" \
|
||||||
${VM_SETUP_EXTRA:-} \
|
${VM_SETUP_EXTRA:-} \
|
||||||
${BIFROST_CLI_EXTRA:-}
|
${BIFROST_CLI_EXTRA:-}
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
name: bifrost-integration-redfish-uefi-fedora-latest
|
name: bifrost-integration-redfish-uefi-fedora-latest
|
||||||
parent: bifrost-integration-tinyipa-fedora-latest
|
parent: bifrost-integration-tinyipa-fedora-latest
|
||||||
vars:
|
vars:
|
||||||
|
enable_grub_network_boot: true
|
||||||
test_driver: redfish
|
test_driver: redfish
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
|
Loading…
Reference in New Issue
Block a user