Skip to content
Snippets Groups Projects
Verified Commit 4cb5a868 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

build_iso.sh: Allow IPXE_NET to be defined in the yaml

And fallback generation to the default hard-coded name otherwise.

Refs. sysadm-environment#5250
parent 6f17946b
No related branches found
No related tags found
1 merge request!2Add config for rancher-node-staging-rke2-metal01
......@@ -16,6 +16,9 @@ fi
j2 -f yaml "${BASEDIR}/configs/template.ipxe.j2" "${CONFIG}" >"${IPXE_SCRIPT}"
# If not provided in the hostname configuration, fallback to the net0
sed -i s'/{{IPXE_NET}}/net0/g' "${IPXE_SCRIPT}"
IPXE_TARGET=bin-x86_64-efi/ipxe.iso
make -C "${BASEDIR}/src" -j8 "${IPXE_TARGET}" EMBED="${IPXE_SCRIPT}" DEBUG=eth_slow NO_WERROR=1
......
......@@ -9,6 +9,7 @@ DOMAINNAME: internal.staging.swh.network
DEPLOYMENT: staging
SUBNET: sesi_rocquencourt_staging
BOOT_DISK_ID_PATTERN: "wwn-0x61866da0734677001fbdcb6b0f36a29c"
IPXE_NET: net8
# 1 raid virtual disk (and no boot controller disk)
# PARTMAN_METHOD: raid
# RAID_DISKS:
......
#!ipxe
# Open the network interface; this sets up the lacp responder
ifopen net0
ifopen {{IPXE_NET}}
prompt --key 0x02 --timeout 60000 waiting 60s for lacp to come up && shell ||
# Bring up a tagged VLAN interface on net0 (net0-{{VLAN_ID}})
vcreate --tag {{VLAN_ID}} net0
# Bring up a tagged VLAN interface on {{IPXE_NET}} ({{IPXE_NET}}-{{VLAN_ID}})
vcreate --tag {{VLAN_ID}} {{IPXE_NET}}
set net0-{{VLAN_ID}}/ip {{IPADDRESS}}
set net0-{{VLAN_ID}}/netmask {{NETMASK}}
set net0-{{VLAN_ID}}/gateway {{GATEWAY}}
set {{IPXE_NET}}-{{VLAN_ID}}/ip {{IPADDRESS}}
set {{IPXE_NET}}-{{VLAN_ID}}/netmask {{NETMASK}}
set {{IPXE_NET}}-{{VLAN_ID}}/gateway {{GATEWAY}}
set ipxe_gateway {{GATEWAY}}
set dns {{NAMESERVER}}
......@@ -20,7 +21,7 @@ set dns {{NAMESERVER}}
prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE command line... && shell ||
ping --count 1 ${net0-{{VLAN_ID}}/gateway} && goto installer ||
ping --count 1 ${ipxe_gateway} && goto installer ||
echo "Could not ping gateway, retrying..."
goto cli_prompt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment