diff --git a/multi-node-aio/README.rst b/multi-node-aio/README.rst index 1b309030..e26930f8 100644 --- a/multi-node-aio/README.rst +++ b/multi-node-aio/README.rst @@ -175,8 +175,8 @@ Instruct the system to use a set amount of ram for the logging VM type: Instruct the system to use a set amount of ram for the swift VM type: ``SWIFT_VM_SERVER_RAM=${SWIFT_VM_SERVER_RAM:-1024}`` -Instruct the system to use a customized iPXE kernel: - ``IPXE_KERNEL_URL=${IPXE_KERNEL_URL:-'http://boot.ipxe.org/ipxe.lkrn'}`` +Instruct the system where to obtain iPXE kernels (looks for ipxe.lkrn, ipxe.efi, etc): + ``IPXE_KERNEL_BASE_URL=${IPXE_KERNEL_BASE_URL:-'http://boot.ipxe.org'}`` Instruct the system to use a customized iPXE script during boot of VMs: ``IPXE_PATH_URL=${IPXE_PATH_URL:-''}`` diff --git a/multi-node-aio/build.sh b/multi-node-aio/build.sh index 04c1d076..967a1da6 100755 --- a/multi-node-aio/build.sh +++ b/multi-node-aio/build.sh @@ -53,7 +53,7 @@ ansible-playbook -vv \ -e logging_vm_server_ram=${LOGGING_VM_SERVER_RAM:-"2048"} \ -e swift_vm_server_ram=${SWIFT_VM_SERVER_RAM:-"2048"} \ -e container_tech=${CONTAINER_TECH:-"lxc"} \ - -e ipxe_kernel_url=${IPXE_KERNEL_URL:-"http://boot.ipxe.org/ipxe.lkrn"} \ + -e ipxe_kernel_base_url=${IPXE_KERNEL_BASE_URL:-"http://boot.ipxe.org"} \ -e ipxe_path_url=${IPXE_PATH_URL:-""} ${MNAIO_ANSIBLE_PARAMETERS} \ --force-handlers \ --flush-cache \ diff --git a/multi-node-aio/playbooks/deploy-pxe.yml b/multi-node-aio/playbooks/deploy-pxe.yml index 96bb43b3..038c922b 100644 --- a/multi-node-aio/playbooks/deploy-pxe.yml +++ b/multi-node-aio/playbooks/deploy-pxe.yml @@ -94,9 +94,13 @@ - name: Download iPXE get_url: - url: "{{ ipxe_kernel_url }}" - dest: "/var/lib/tftpboot/ipxe.lkrn" + url: "{{ ipxe_kernel_base_url }}/{{ item.filename }}" + dest: "/var/lib/tftpboot/{{ item.dest }}" tmp_dest: /tmp/ + with_items: + - { filename: 'ipxe.lkrn', dest: 'ipxe.lkrn' } + - { filename: 'ipxe.efi', dest: 'ipxe.efi' } + - { filename: 'undionly.kpxe', dest: 'undionly.kpxe' } - name: Drop ipxe default menu template: diff --git a/multi-node-aio/playbooks/dhcp/dhcpd.conf.j2 b/multi-node-aio/playbooks/dhcp/dhcpd.conf.j2 index 7fbe4339..81dd8a5d 100644 --- a/multi-node-aio/playbooks/dhcp/dhcpd.conf.j2 +++ b/multi-node-aio/playbooks/dhcp/dhcpd.conf.j2 @@ -6,6 +6,58 @@ allow bootp; log-facility local7; authoritative; +# Declare the iPXE option space +option space ipxe; +option ipxe-encap-opts code 175 = encapsulate ipxe; + +# iPXE options, can be set in DHCP response packet +option ipxe.priority code 1 = signed integer 8; +option ipxe.keep-san code 8 = unsigned integer 8; +option ipxe.skip-san-boot code 9 = unsigned integer 8; +option ipxe.syslogs code 85 = string; +option ipxe.cert code 91 = string; +option ipxe.privkey code 92 = string; +option ipxe.crosscert code 93 = string; +option ipxe.no-pxedhcp code 176 = unsigned integer 8; +option ipxe.bus-id code 177 = string; +option ipxe.san-filename code 188 = string; +option ipxe.bios-drive code 189 = unsigned integer 8; +option ipxe.username code 190 = string; +option ipxe.password code 191 = string; +option ipxe.reverse-username code 192 = string; +option ipxe.reverse-password code 193 = string; +option ipxe.version code 235 = string; +option iscsi-initiator-iqn code 203 = string; + +# iPXE feature flags, set in DHCP request packet +option ipxe.pxeext code 16 = unsigned integer 8; +option ipxe.iscsi code 17 = unsigned integer 8; +option ipxe.aoe code 18 = unsigned integer 8; +option ipxe.http code 19 = unsigned integer 8; +option ipxe.https code 20 = unsigned integer 8; +option ipxe.tftp code 21 = unsigned integer 8; +option ipxe.ftp code 22 = unsigned integer 8; +option ipxe.dns code 23 = unsigned integer 8; +option ipxe.bzimage code 24 = unsigned integer 8; +option ipxe.multiboot code 25 = unsigned integer 8; +option ipxe.slam code 26 = unsigned integer 8; +option ipxe.srp code 27 = unsigned integer 8; +option ipxe.nbi code 32 = unsigned integer 8; +option ipxe.pxe code 33 = unsigned integer 8; +option ipxe.elf code 34 = unsigned integer 8; +option ipxe.comboot code 35 = unsigned integer 8; +option ipxe.efi code 36 = unsigned integer 8; +option ipxe.fcoe code 37 = unsigned integer 8; +option ipxe.vlan code 38 = unsigned integer 8; +option ipxe.menu code 39 = unsigned integer 8; +option ipxe.sdi code 40 = unsigned integer 8; +option ipxe.nfs code 41 = unsigned integer 8; + +# Other useful general options +option arch code 93 = unsigned integer 16; +option client-architecture code 93 = unsigned integer 16; +option conf-file code 209 = text; + shared-network all-networks { {% for dhcp in dhcp_list %} subnet {{ dhcp.subnet }} netmask {{ dhcp.netmask }} { @@ -35,8 +87,12 @@ shared-network all-networks { {% elif ipxe_boot_file is defined and ipxe_boot_file|length > 0 %} filename "{{ ipxe_boot_file }}"; {% endif %} + } elsif option arch = 00:07 { + filename "ipxe.efi"; + } elsif option arch = 00:00 { + filename "ipxe.lkrn"; } else { - filename "ipxe.lkrn"; + filename "undionly.kpxe"; } } diff --git a/multi-node-aio/playbooks/group_vars/all.yml b/multi-node-aio/playbooks/group_vars/all.yml index 05972f22..d30fda0f 100644 --- a/multi-node-aio/playbooks/group_vars/all.yml +++ b/multi-node-aio/playbooks/group_vars/all.yml @@ -30,7 +30,7 @@ default_proxy_url: 'http://10.0.2.1:3142/' default_container_tech: "{{ container_tech | default('lxc') }}" -ipxe_kernel_url: "http://boot.ipxe.org/ipxe.lkrn" +ipxe_kernel_base_url: "http://boot.ipxe.org" # The timeout for the SSH check to the vm_servers vm_ssh_timeout: 1500 diff --git a/multi-node-aio/playbooks/pxe/tftp/boot.ipxe.j2 b/multi-node-aio/playbooks/pxe/tftp/boot.ipxe.j2 index 516a02c9..5ea9e442 100644 --- a/multi-node-aio/playbooks/pxe/tftp/boot.ipxe.j2 +++ b/multi-node-aio/playbooks/pxe/tftp/boot.ipxe.j2 @@ -6,8 +6,8 @@ set space:hex 20:20 set space ${space:string} set timeout 10 -{% if ipxe_kernel_url is defined and ipxe_kernel_url|length > 0%} -iseq ${version} {{ ipxe_ubuntu_version }} && chain --autofree {{ ipxe_kernel_url }} || +{% if ipxe_kernel_base_url is defined and ipxe_kernel_base_url|length > 0%} +iseq ${version} {{ ipxe_ubuntu_version }} && chain --autofree {{ ipxe_kernel_base_url }}/ipxe.lkrn || {% else %} iseq ${version} {{ ipxe_ubuntu_version }} && chain --autofree ipxe.lkrn || {% endif %}