|
|
|
|
@@ -53,9 +53,16 @@ func Test_hostOverlay(t *testing.T) {
|
|
|
|
|
log: host_dnsmasq,
|
|
|
|
|
header: "",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "host:dnsmasq(static)",
|
|
|
|
|
conf: "warewulf.conf-static",
|
|
|
|
|
args: []string{"--render", "host", "host", "etc/dnsmasq.d/ww4-hosts.conf.ww"},
|
|
|
|
|
log: host_dnsmasq_static,
|
|
|
|
|
header: "",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "host:/etc/exports",
|
|
|
|
|
conf: "",
|
|
|
|
|
conf: "warewulf.conf",
|
|
|
|
|
args: []string{"--render", "host", "host", "etc/exports.ww"},
|
|
|
|
|
log: host_exports,
|
|
|
|
|
header: "",
|
|
|
|
|
@@ -264,8 +271,6 @@ dhcp-boot=tag:aarch64,"/warewulf/snponly.efi"
|
|
|
|
|
# iPXE binary will get the following configuration file
|
|
|
|
|
dhcp-boot=tag:iPXE,"http://192.168.0.1:9873/ipxe/${mac:hexhyp}?assetkey=${asset}&uuid=${uuid}"
|
|
|
|
|
dhcp-no-override
|
|
|
|
|
# define the the range
|
|
|
|
|
dhcp-range=192.168.0.100,192.168.0.199,255.255.255.0,6h
|
|
|
|
|
|
|
|
|
|
# IPv6 routing announcements
|
|
|
|
|
enable-ra
|
|
|
|
|
@@ -282,6 +287,53 @@ dhcp-option=tag:aarch64,option6:bootfile-url,"tftp://[2001:db8::1]/warewulf/snpo
|
|
|
|
|
# IPv6 iPXE binary will get the following configuration file
|
|
|
|
|
dhcp-option=tag:iPXE,option6:bootfile-url,"http://[2001:db8::1]:9873/ipxe/${mac:hexhyp}?assetkey=${asset}&uuid=${uuid}"
|
|
|
|
|
|
|
|
|
|
# define the dhcp range
|
|
|
|
|
dhcp-range=192.168.0.100,192.168.0.199,255.255.255.0,6h
|
|
|
|
|
dhcp-range=2001:db8::,ra-stateless,64,6h
|
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
const host_dnsmasq_static string = `backupFile: false
|
|
|
|
|
writeFile: true
|
|
|
|
|
Filename: etc/dnsmasq.d/ww4-hosts.conf
|
|
|
|
|
# This file was autgenerated by warewulf
|
|
|
|
|
|
|
|
|
|
# select the x86 hosts which will get the iXPE binary
|
|
|
|
|
dhcp-match=set:bios,option:client-arch,0 #legacy boot
|
|
|
|
|
dhcp-match=set:x86PC,option:client-arch, 7 #EFI x86-64
|
|
|
|
|
dhcp-match=set:x86PC,option:client-arch, 6 #EFI x86-64
|
|
|
|
|
dhcp-match=set:x86PC,option:client-arch, 9 #EFI x86-64
|
|
|
|
|
dhcp-match=set:aarch64,option:client-arch, 11 #EFI aarch64
|
|
|
|
|
dhcp-match=set:iPXE,77,"iPXE"
|
|
|
|
|
dhcp-userclass=set:iPXE,iPXE
|
|
|
|
|
dhcp-vendorclass=set:efi-http,HTTPClient:Arch:00016
|
|
|
|
|
dhcp-option-force=tag:efi-http,60,HTTPClient
|
|
|
|
|
# for http boot always use shim/grub
|
|
|
|
|
dhcp-boot=tag:efi-http,"http://192.168.0.1:9873/efiboot/shim.efi"
|
|
|
|
|
dhcp-boot=tag:x86PC,"/warewulf/ipxe-snponly-x86_64.efi"
|
|
|
|
|
dhcp-boot=tag:aarch64,"/warewulf/snponly.efi"
|
|
|
|
|
# iPXE binary will get the following configuration file
|
|
|
|
|
dhcp-boot=tag:iPXE,"http://192.168.0.1:9873/ipxe/${mac:hexhyp}?assetkey=${asset}&uuid=${uuid}"
|
|
|
|
|
dhcp-no-override
|
|
|
|
|
|
|
|
|
|
# IPv6 routing announcements
|
|
|
|
|
enable-ra
|
|
|
|
|
|
|
|
|
|
# IPv6 matching (client-arch=61)
|
|
|
|
|
dhcp-match=set:x86PC,option6:61,0007 # EFI x86-64
|
|
|
|
|
dhcp-match=set:aarch64,option6:61,0011 # EFI aarch64
|
|
|
|
|
dhcp-vendorclass=set:x86PC,enterprise:343,PXEClient:Arch:00007 # EFI x86-64
|
|
|
|
|
dhcp-vendorclass=set:aarch64,enterprise:343,PXEClient:Arch:00011 # EFI aarch64
|
|
|
|
|
|
|
|
|
|
# IPv6 bootfile-url (iPXE EFI binary)
|
|
|
|
|
dhcp-option=tag:x86PC,option6:bootfile-url,"tftp://[2001:db8::1]/warewulf/ipxe-snponly-x86_64.efi"
|
|
|
|
|
dhcp-option=tag:aarch64,option6:bootfile-url,"tftp://[2001:db8::1]/warewulf/snponly.efi"
|
|
|
|
|
# IPv6 iPXE binary will get the following configuration file
|
|
|
|
|
dhcp-option=tag:iPXE,option6:bootfile-url,"http://[2001:db8::1]:9873/ipxe/${mac:hexhyp}?assetkey=${asset}&uuid=${uuid}"
|
|
|
|
|
|
|
|
|
|
# define the dhcp range
|
|
|
|
|
dhcp-range=192.168.0.100,192.168.0.199,255.255.255.0,6h
|
|
|
|
|
dhcp-range=2001:db8::100,2001:db8::1FF,6h
|
|
|
|
|
|
|
|
|
|
# hosts
|
|
|
|
|
dhcp-host=e6:92:39:49:7b:03,id:00:03:00:01:e6:92:39:49:7b:03,set:warewulf,192.168.3.21,[2001:db8::111],node1,infinite
|
|
|
|
|
dhcp-host=9a:77:29:73:14:f1,id:00:03:00:01:9a:77:29:73:14:f1,set:warewulf,192.168.3.22,[2001:db8::112],node1,infinite
|
|
|
|
|
|