Rename "container" to "image"
- Updated `wwctl upgrade` to handle updates - Maintained `.Container` and `.ContainerName` in tstruct - Added `ContainerName()` methods to node and profile objects - Added `--container`, `-C` aliases to wwctl commands (`<node|profile> <add|set>`) - Added `wwctl container` alias - Added support for `container_exit.sh` if `image_exit.sh` is not found Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -12,7 +12,7 @@ menuentry "Load specific configfile" {
|
||||
conf="(http,{{.Ipaddr}}:{{.Warewulf.Port}})/efiboot/grub.cfg?assetkey=${assetkey}"
|
||||
configfile $conf
|
||||
}
|
||||
menuentry "Chainload shim of container" {
|
||||
menuentry "Chainload shim from image" {
|
||||
shim="(http,{{.Ipaddr}}:{{.Warewulf.Port}})/efiboot/shim.efi?assetkey=${assetkey}"
|
||||
chainloader ${shim}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ if .ContainerName }}
|
||||
{{ if .ImageName }}
|
||||
echo "================================================================================"
|
||||
echo "Warewulf v4 now http booting grub: {{.Fqdn}} ({{.Hwaddr}})"
|
||||
echo "================================================================================"
|
||||
@@ -10,7 +10,7 @@ smbios --type 3 --get-string 8 --set assetkey
|
||||
|
||||
uri="(http,{{.Ipaddr}}:{{.Port}})/provision/${net_default_mac}?assetkey=${assetkey}"
|
||||
kernel="${uri}&stage=kernel"
|
||||
container="${uri}&stage=container&compress=gz"
|
||||
image="${uri}&stage=image&compress=gz"
|
||||
system="${uri}&stage=system&compress=gz"
|
||||
runtime="${uri}&stage=runtime&compress=gz"
|
||||
|
||||
@@ -21,13 +21,13 @@ menuentry "Network boot node: {{.Id}}" --id ww4 {
|
||||
{{if .KernelVersion }}
|
||||
echo "Kernel: {{.KernelVersion}}"
|
||||
{{else}}
|
||||
echo "Kernel: {{.ContainerName}} (container default)"
|
||||
echo "Kernel: {{.ImageName}} (image default)"
|
||||
{{end}}
|
||||
echo "KernelArgs: {{.KernelArgs}}"
|
||||
linux $kernel wwid=${net_default_mac} {{.KernelArgs}}
|
||||
if [ x$? = x0 ] ; then
|
||||
echo "Loading Container: {{.ContainerName}}"
|
||||
initrd $container $system $runtime
|
||||
echo "Loading Image: {{.ImageName}}"
|
||||
initrd $image $system $runtime
|
||||
boot
|
||||
else
|
||||
echo "MESSAGE: This node seems to be unconfigured. Please have your system administrator add a"
|
||||
@@ -47,7 +47,7 @@ menuentry "Network boot node with dracut: {{.Id}}" --id dracut {
|
||||
{{if .KernelVersion }}
|
||||
echo "Kernel: {{.KernelVersion}}"
|
||||
{{else}}
|
||||
echo "Kernel: {{.ContainerName}} (container default)"
|
||||
echo "Kernel: {{.ImageName}} (image default)"
|
||||
{{end}}
|
||||
echo "KernelArgs: {{.KernelArgs}}"
|
||||
|
||||
@@ -56,7 +56,7 @@ menuentry "Network boot node with dracut: {{.Id}}" --id dracut {
|
||||
linux $kernel wwid=${net_default_mac} {{.KernelArgs}} $net_args $wwinit_args
|
||||
|
||||
if [ x$? = x0 ] ; then
|
||||
echo "Loading Container: {{.ContainerName}}"
|
||||
echo "Loading Image: {{.ImageName}}"
|
||||
initrd $initramfs
|
||||
boot
|
||||
else
|
||||
@@ -90,7 +90,7 @@ menuentry "System shutdown" {
|
||||
{{ else }}
|
||||
echo "================================================================================"
|
||||
echo " Warewulf v4:"
|
||||
echo " No node image/container defined for this node ({{.Fqdn}})."
|
||||
echo " No node image defined for this node ({{.Fqdn}})."
|
||||
echo " Rebooting in 30s."
|
||||
echo "================================================================================"
|
||||
sleep 30
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!ipxe
|
||||
{{ if .ContainerName }}
|
||||
{{ if .ImageName }}
|
||||
echo
|
||||
echo ================================================================================
|
||||
echo Warewulf v4 now booting: {{.Fqdn}} ({{.Hwaddr}})
|
||||
echo
|
||||
echo Container: {{.ContainerName}}
|
||||
echo Image: {{.ImageName}}
|
||||
{{if .KernelVersion }}
|
||||
echo Kernel: {{.KernelVersion}}
|
||||
{{else}}
|
||||
echo Kernel: {{.ContainerName}} (container default)
|
||||
echo Kernel: {{.ImageName}} (image default)
|
||||
{{end}}
|
||||
echo KernelArgs: {{.KernelArgs}}
|
||||
echo
|
||||
@@ -30,8 +30,8 @@ iseq ${platform} efi && goto efi || goto noefi
|
||||
|
||||
# try extracting compressed images first
|
||||
# NOTE: system overlay tends to be the smallest, so failure here is the cheapest
|
||||
echo Downloading Container Image:
|
||||
imgextract --name container ${uri_base}&stage=container&compress=gz || goto nocompress
|
||||
echo Downloading Image:
|
||||
imgextract --name image ${uri_base}&stage=image&compress=gz || goto nocompress
|
||||
|
||||
echo Downloading System Overlay:
|
||||
imgextract --name system ${uri_base}&stage=system&compress=gz || goto reboot
|
||||
@@ -46,8 +46,8 @@ goto imoktogo
|
||||
echo
|
||||
echo Image extract not supported in this iPXE, using standard initrd mode
|
||||
|
||||
echo Downloading Container Image:
|
||||
initrd --name container ${uri_base}&stage=container || goto reboot
|
||||
echo Downloading Image:
|
||||
initrd --name image ${uri_base}&stage=image || goto reboot
|
||||
|
||||
echo Downloading System Overlay:
|
||||
initrd --name system ${uri_base}&stage=system || goto reboot
|
||||
@@ -62,8 +62,8 @@ goto imoktogo
|
||||
echo
|
||||
echo Use legacy initrd mode with compressed images
|
||||
|
||||
echo Downloading Container Image:
|
||||
initrd --name container ${uri_base}&stage=container&compress=gz || goto reboot
|
||||
echo Downloading Image:
|
||||
initrd --name image ${uri_base}&stage=image&compress=gz || goto reboot
|
||||
|
||||
echo Downloading System Overlay:
|
||||
initrd --name system ${uri_base}&stage=system&compress=gz || goto reboot
|
||||
@@ -74,8 +74,8 @@ initrd --name runtime ${uri_base}&stage=runtime&compress=gz && set runtime_i
|
||||
|
||||
:imoktogo
|
||||
|
||||
echo boot kernel initrd=container initrd=system ${runtime_initrd} wwid={{.Hwaddr}} {{.KernelArgs}}
|
||||
boot kernel initrd=container initrd=system ${runtime_initrd} wwid={{.Hwaddr}} {{.KernelArgs}} || goto reboot
|
||||
echo boot kernel initrd=image initrd=system ${runtime_initrd} wwid={{.Hwaddr}} {{.KernelArgs}}
|
||||
boot kernel initrd=image initrd=system ${runtime_initrd} wwid={{.Hwaddr}} {{.KernelArgs}} || goto reboot
|
||||
|
||||
:reboot
|
||||
echo
|
||||
@@ -86,7 +86,7 @@ reboot
|
||||
{{ else }}
|
||||
echo ================================================================================
|
||||
echo Warewulf v4:
|
||||
echo No node image/container defined for this node ({{.Fqdn}}).
|
||||
echo No image defined for this node ({{.Fqdn}}).
|
||||
echo Rebooting in 30s.
|
||||
echo ================================================================================
|
||||
sleep 30
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!ipxe
|
||||
{{ if .ContainerName }}
|
||||
{{ if .ImageName }}
|
||||
echo
|
||||
echo ================================================================================
|
||||
echo Warewulf v4 now booting via dracut: {{.Fqdn}} ({{.Hwaddr}})
|
||||
echo
|
||||
echo Container: {{.ContainerName}}
|
||||
echo Image: {{.ImageName}}
|
||||
{{if .KernelVersion }}
|
||||
echo Kernel: {{.KernelVersion}}
|
||||
{{else}}
|
||||
echo Kernel: {{.ContainerName}} (container default)
|
||||
echo Kernel: {{.ImageName}} (image default)
|
||||
{{end}}
|
||||
echo KernelArgs: {{.KernelArgs}}
|
||||
echo
|
||||
@@ -39,7 +39,7 @@ reboot
|
||||
{{ else }}
|
||||
echo ================================================================================
|
||||
echo Warewulf v4:
|
||||
echo No node image/container defined for this node ({{.Fqdn}}).
|
||||
echo No image defined for this node ({{.Fqdn}}).
|
||||
echo Rebooting in 30s.
|
||||
echo ================================================================================
|
||||
sleep 30
|
||||
|
||||
@@ -27,7 +27,7 @@ nfs:
|
||||
- path: /opt
|
||||
export options: ro,sync,no_root_squash
|
||||
systemd name: nfs-server
|
||||
container mounts:
|
||||
image mounts:
|
||||
- source: /etc/resolv.conf
|
||||
dest: /etc/resolv.conf
|
||||
readonly: true
|
||||
|
||||
Reference in New Issue
Block a user