Compare commits
28 Commits
aaf1380c59
...
03a9af8ceb
Author | SHA1 | Date |
---|---|---|
Philippe Caseiro | 03a9af8ceb | |
Philippe Caseiro | fbd712bb72 | |
Philippe Caseiro | e506d26b65 | |
Philippe Caseiro | cc2e938f0a | |
Philippe Caseiro | 52c70e8b30 | |
Philippe Caseiro | be6d05b075 | |
Philippe Caseiro | 6232664fe6 | |
Philippe Caseiro | 3b5f18114d | |
Philippe Caseiro | 3b88e57992 | |
Philippe Caseiro | da99a58d98 | |
Philippe Caseiro | 0bef57b467 | |
Philippe Caseiro | 6196c22acf | |
Philippe Caseiro | 6449c907bb | |
Philippe Caseiro | 759d308265 | |
Philippe Caseiro | 339e7700f2 | |
Philippe Caseiro | d9caab8427 | |
Philippe Caseiro | a39738d93b | |
Philippe Caseiro | 8b7fee1ea4 | |
Philippe Caseiro | 987a8fe67e | |
Philippe Caseiro | bd09786714 | |
Philippe Caseiro | 013d8b9384 | |
Philippe Caseiro | f718356ad9 | |
Philippe Caseiro | ff7dac1b94 | |
Philippe Caseiro | 73f3fe3550 | |
Philippe Caseiro | 7c8b20f2ce | |
Philippe Caseiro | 214a84994c | |
Philippe Caseiro | 632c4cd517 | |
Philippe Caseiro | d2c161e9bd |
|
@ -71,8 +71,7 @@ locals {
|
||||||
BootingMessage = "Booting from network the Cadoles way"
|
BootingMessage = "Booting from network the Cadoles way"
|
||||||
DHCPRangeStart = ""
|
DHCPRangeStart = ""
|
||||||
DHCPRangeEnd = ""
|
DHCPRangeEnd = ""
|
||||||
DHCPLeaseDuration = "1h"
|
DHCPLeaseDuration = "12h"
|
||||||
TFTPRoot = "/var/lib/tftpboot"
|
|
||||||
}
|
}
|
||||||
MatchBox = {
|
MatchBox = {
|
||||||
Hostname = "mb.cadoles.com"
|
Hostname = "mb.cadoles.com"
|
||||||
|
|
|
@ -48,12 +48,6 @@ EOF
|
||||||
source = "${local.locations.provisionning}/conf/${build.name}/initmatchbox.start"
|
source = "${local.locations.provisionning}/conf/${build.name}/initmatchbox.start"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy tftp provisionning script
|
|
||||||
provisioner "file" {
|
|
||||||
destination = "/etc/local.d/inittftp.start"
|
|
||||||
source = "${local.locations.provisionning}/conf/${build.name}/inittftp.start"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generate default configuration for kubernetes
|
// Generate default configuration for kubernetes
|
||||||
provisioner "shell" {
|
provisioner "shell" {
|
||||||
max_retries = 3
|
max_retries = 3
|
||||||
|
@ -85,7 +79,6 @@ EOF
|
||||||
provisioner "shell" {
|
provisioner "shell" {
|
||||||
inline = [
|
inline = [
|
||||||
"chmod +x /etc/local.d/initmatchbox.start",
|
"chmod +x /etc/local.d/initmatchbox.start",
|
||||||
"chmod +x /etc/local.d/inittftp.start",
|
|
||||||
"chmod +x /etc/one-context.d/net-96-templater"
|
"chmod +x /etc/one-context.d/net-96-templater"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
dest="${1}"
|
|
||||||
|
|
||||||
ipxeEFISource="http://boot.ipxe.org/ipxe.efi"
|
|
||||||
kpxeSource="http://boot.ipxe.org/undionly.kpxe"
|
|
||||||
|
|
||||||
cd "${dest}"
|
|
||||||
wget "${ipxeEFISource}"
|
|
||||||
wget "${kpxeSource}"
|
|
|
@ -13,25 +13,22 @@ strict-order
|
||||||
addn-hosts=/etc/dnsmasq-hosts.conf
|
addn-hosts=/etc/dnsmasq-hosts.conf
|
||||||
domain=${Vars.PXE.DNSDomain}
|
domain=${Vars.PXE.DNSDomain}
|
||||||
local=/${Vars.PXE.DNSDomain}/
|
local=/${Vars.PXE.DNSDomain}/
|
||||||
localise-queries
|
|
||||||
|
|
||||||
|
|
||||||
|
enable-tftp
|
||||||
|
|
||||||
|
pxe-prompt="${Vars.PXE.GreetingMessage}",${Vars.PXE.DelayTime}
|
||||||
|
pxe-service=X86PC,"${Vars.PXE.BootingMessage}", http://${Vars.ETH0.IP}:${Vars.MatchBox.HTTPPort}/boot.ipxe
|
||||||
|
|
||||||
%{ if Vars.PXE.DHCPMode == "proxy" }
|
%{ if Vars.PXE.DHCPMode == "proxy" }
|
||||||
#dhcp-no-override
|
dhcp-no-override
|
||||||
dhcp-range=${Vars.ETH0.IP},proxy
|
dhcp-range=${Vars.ETH0.IP},proxy
|
||||||
%{ else }
|
%{ else }
|
||||||
dhcp-range=${Vars.PXE.DHCPRangeStart},${Vars.PXE.DHCPRangeEnd},${Vars.PXE.DHCPLeaseDuration}
|
dhcp-range=${Vars.PXE.DHCPRangeStart},${Vars.PXE.DHCPRangeEnd},${Vars.PXE.DHCPLeaseDuration}
|
||||||
dhcp-option=option:router,${Vars.ETH0.GATEWAY}
|
dhcp-option=option:router,${Vars.ETH0.Gateway}
|
||||||
%{ endif }
|
%{ endif }
|
||||||
|
|
||||||
dhcp-option=option:dns-server,${Vars.ETH0.IP}
|
dhcp-option=option:dns-server,${Vars.ETH0.IP}
|
||||||
dhcp-option=option:domain-name,${Vars.PXE.DNSDomain}
|
dhcp-option=option:domain-name,${Vars.PXE.DNSDomain}
|
||||||
|
|
||||||
# TFTP Configuration
|
dhcp-match=set:ipxe,175
|
||||||
enable-tftp
|
dhcp-vendorclass=BIOS,PXEClient:Arch:00000
|
||||||
tftp-root="${Vars.PXE.TFTPRoot}"
|
|
||||||
|
|
||||||
pxe-prompt="${Vars.PXE.GreetingMessage}",${Vars.PXE.DelayTime}
|
|
||||||
pxe-service=tag:#ipxe,x86PC,"Legacy boot PXE chainload to iPXE",undionly.kpxe
|
|
||||||
dhcp-userclass=set:ipxe,iPXE
|
|
||||||
pxe-service=tag:ipxe,x86PC,"${Vars.PXE.BootingMessage} (iPXE)", http://${Vars.ETH0.IP}:${Vars.MatchBox.HTTPPort}/boot.ipxe
|
|
Loading…
Reference in New Issue