From 377702a1799122521538afba92e4c52841457054 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Fri, 3 Mar 2023 16:02:41 +0100 Subject: [PATCH] make the configuration to be based in warewulf.conf defaults will be se by the Makefile Signed-off-by: Christian Goll --- .gitignore | 1 + Makefile | 8 -- internal/app/wwclient/root.go | 6 +- internal/pkg/buildconfig/defaults.go | 98 --------------------- internal/pkg/buildconfig/setconfigs.go.in | 19 ---- internal/pkg/configure/ssh.go | 8 +- internal/pkg/configure/tftp.go | 5 +- internal/pkg/container/config.go | 8 +- internal/pkg/kernel/kernel.go | 5 +- internal/pkg/node/constructors.go | 7 +- internal/pkg/overlay/config.go | 8 +- internal/pkg/overlay/funcmap.go | 8 +- internal/pkg/version/version.go | 5 +- internal/pkg/warewulfconf/buildconfig.go.in | 18 ++++ internal/pkg/warewulfconf/constructors.go | 21 +---- internal/pkg/warewulfconf/datastructure.go | 1 + internal/pkg/warewulfconf/getter.go | 73 +++++++++++++++ internal/pkg/warewulfd/provision.go | 5 +- 18 files changed, 130 insertions(+), 174 deletions(-) delete mode 100644 internal/pkg/buildconfig/defaults.go delete mode 100644 internal/pkg/buildconfig/setconfigs.go.in create mode 100644 internal/pkg/warewulfconf/buildconfig.go.in create mode 100644 internal/pkg/warewulfconf/getter.go diff --git a/.gitignore b/.gitignore index 10a7f077..18b9454f 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ /etc/bash_completion.d/ warewulf.spec internal/pkg/buildconfig/setconfigs.go +internal/pkg/warewulfconf/buildconfig.go include/systemd/warewulfd.service _dist/ config diff --git a/Makefile b/Makefile index 9fdbc02b..f1d08c92 100644 --- a/Makefile +++ b/Makefile @@ -231,19 +231,11 @@ man_pages: wwctl cp docs/man/man5/*.5 ./man_pages/ cd man_pages; for i in wwctl*1 *.5; do echo "Compressing manpage: $$i"; gzip --force $$i; done -config_defaults: vendor cmd/config_defaults/config_defaults.go - cd cmd/config_defaults && go build -ldflags="-X 'github.com/hpcng/warewulf/internal/pkg/warewulfconf.ConfigFile=./etc/warewulf.conf'\ - -X 'github.com/hpcng/warewulf/internal/pkg/node.ConfigFile=./etc/nodes.conf'"\ - -mod vendor -tags "$(WW_GO_BUILD_TAGS)" -o ../../config_defaults - update_configuration: vendor cmd/update_configuration/update_configuration.go cd cmd/update_configuration && go build -ldflags="-X 'github.com/hpcng/warewulf/internal/pkg/warewulfconf.ConfigFile=./etc/warewulf.conf'\ -X 'github.com/hpcng/warewulf/internal/pkg/node.ConfigFile=./etc/nodes.conf'"\ -mod vendor -tags "$(WW_GO_BUILD_TAGS)" -o ../../update_configuration -warewulfconf: config_defaults - ./config_defaults - dist: vendor config rm -rf .dist/$(WAREWULF)-$(VERSION) $(WAREWULF)-$(VERSION).tar.gz mkdir -p .dist/$(WAREWULF)-$(VERSION) diff --git a/internal/app/wwclient/root.go b/internal/app/wwclient/root.go index dc06e684..e657c21b 100644 --- a/internal/app/wwclient/root.go +++ b/internal/app/wwclient/root.go @@ -16,7 +16,6 @@ import ( "github.com/coreos/go-systemd/daemon" "github.com/google/uuid" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" "github.com/hpcng/warewulf/internal/pkg/pidfile" "github.com/hpcng/warewulf/internal/pkg/warewulfconf" "github.com/hpcng/warewulf/internal/pkg/wwlog" @@ -50,10 +49,7 @@ func GetRootCommand() *cobra.Command { } func CobraRunE(cmd *cobra.Command, args []string) error { - conf, err := warewulfconf.New() - if err != nil { - return err - } + conf := warewulfconf.New() pid, err := pidfile.Write(PIDFile) if err != nil && pid == -1 { diff --git a/internal/pkg/buildconfig/defaults.go b/internal/pkg/buildconfig/defaults.go deleted file mode 100644 index f739cff1..00000000 --- a/internal/pkg/buildconfig/defaults.go +++ /dev/null @@ -1,98 +0,0 @@ -package buildconfig - -import "github.com/hpcng/warewulf/internal/pkg/wwlog" - -const WWVer = 43 - -var ( - bindir string = "UNDEF" - sysconfdir string = "UNDEF" - localstatedir string = "UNDEF" - srvdir string = "UNDEF" - tftpdir string = "UNDEF" - firewallddir string = "UNDEF" - systemddir string = "UNDEF" - wwoverlaydir string = "UNDEF" - wwchrootdir string = "UNDEF" - wwprovisiondir string = "UNDEF" - version string = "UNDEF" - release string = "UNDEF" - wwclientdir string = "UNDEF" - datadir string = "UNDEF" - tmpdir string = "UNDEF" -) - -func BINDIR() string { - wwlog.Debug("BINDIR = '%s'", bindir) - return bindir -} - -func DATADIR() string { - wwlog.Debug("DATADIR = '%s'", datadir) - return datadir -} - -func SYSCONFDIR() string { - wwlog.Debug("SYSCONFDIR = '%s'", sysconfdir) - return sysconfdir -} - -func LOCALSTATEDIR() string { - wwlog.Debug("LOCALSTATEDIR = '%s'", localstatedir) - return localstatedir -} - -func SRVDIR() string { - wwlog.Debug("SRVDIR = '%s'", srvdir) - return srvdir -} - -func TFTPDIR() string { - wwlog.Debug("TFTPDIR = '%s'", tftpdir) - return tftpdir -} - -func FIREWALLDDIR() string { - wwlog.Debug("FIREWALLDDIR = '%s'", firewallddir) - return firewallddir -} - -func SYSTEMDDIR() string { - wwlog.Debug("SYSTEMDDIR = '%s'", systemddir) - return systemddir -} - -func WWOVERLAYDIR() string { - wwlog.Debug("WWOVERLAYDIR = '%s'", wwoverlaydir) - return wwoverlaydir -} - -func WWCHROOTDIR() string { - wwlog.Debug("WWCHROOTDIR = '%s'", wwchrootdir) - return wwchrootdir -} - -func WWPROVISIONDIR() string { - wwlog.Debug("WWPROVISIONDIR = '%s'", wwprovisiondir) - return wwprovisiondir -} - -func VERSION() string { - wwlog.Debug("VERSION = '%s'", version) - return version -} - -func RELEASE() string { - wwlog.Debug("RELEASE = '%s'", release) - return release -} - -func WWCLIENTDIR() string { - wwlog.Debug("WWCLIENTDIR = '%s'", wwclientdir) - return wwclientdir -} - -func TMPDIR() string { - wwlog.Debug("TMPDIR = '%s'", tmpdir) - return tmpdir -} diff --git a/internal/pkg/buildconfig/setconfigs.go.in b/internal/pkg/buildconfig/setconfigs.go.in deleted file mode 100644 index f049ffeb..00000000 --- a/internal/pkg/buildconfig/setconfigs.go.in +++ /dev/null @@ -1,19 +0,0 @@ -package buildconfig - -func init() { - bindir = "@BINDIR@" - sysconfdir = "@SYSCONFDIR@" - datadir = "@DATADIR@" - localstatedir = "@LOCALSTATEDIR@" - srvdir = "@SRVDIR@" - tftpdir = "@TFTPDIR@" - firewallddir = "@FIREWALLDDIR@" - systemddir = "@SYSTEMDDIR@" - wwoverlaydir = "@WWOVERLAYDIR@" - wwchrootdir = "@WWCHROOTDIR@" - wwprovisiondir = "@WWPROVISIONDIR@" - version = "@VERSION@" - release = "@RELEASE@" - wwclientdir = "@WWCLIENTDIR@" - tmpdir = "@TMPDIR@" -} diff --git a/internal/pkg/configure/ssh.go b/internal/pkg/configure/ssh.go index c4b5e04f..0c60e053 100644 --- a/internal/pkg/configure/ssh.go +++ b/internal/pkg/configure/ssh.go @@ -5,8 +5,8 @@ import ( "os" "path" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" "github.com/hpcng/warewulf/internal/pkg/util" + "github.com/hpcng/warewulf/internal/pkg/warewulfconf" "github.com/hpcng/warewulf/internal/pkg/wwlog" "github.com/pkg/errors" ) @@ -14,10 +14,10 @@ import ( func SSH() error { if os.Getuid() == 0 { fmt.Printf("Updating system keys\n") + conf := warewulfconf.New() + wwkeydir := path.Join(conf.SYSCONFDIR(), "warewulf/keys") + "/" - wwkeydir := path.Join(buildconfig.SYSCONFDIR(), "warewulf/keys") + "/" - - err := os.MkdirAll(path.Join(buildconfig.SYSCONFDIR(), "warewulf/keys"), 0755) + err := os.MkdirAll(path.Join(conf.SYSCONFDIR(), "warewulf/keys"), 0755) if err != nil { wwlog.Error("Could not create base directory: %s", err) os.Exit(1) diff --git a/internal/pkg/configure/tftp.go b/internal/pkg/configure/tftp.go index 808852f2..718a4030 100644 --- a/internal/pkg/configure/tftp.go +++ b/internal/pkg/configure/tftp.go @@ -5,15 +5,14 @@ import ( "os" "path" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" "github.com/hpcng/warewulf/internal/pkg/util" "github.com/hpcng/warewulf/internal/pkg/warewulfconf" "github.com/hpcng/warewulf/internal/pkg/wwlog" ) func TFTP() error { - var tftpdir string = path.Join(buildconfig.TFTPDIR(), "warewulf") controller := warewulfconf.New() + var tftpdir string = path.Join(controller.TFTPDIR(), "warewulf") err := os.MkdirAll(tftpdir, 0755) if err != nil { @@ -28,7 +27,7 @@ func TFTP() error { continue } copyCheck[f] = true - err = util.SafeCopyFile(path.Join(buildconfig.DATADIR(), f), path.Join(tftpdir, f)) + err = util.SafeCopyFile(path.Join(controller.DATADIR(), f), path.Join(tftpdir, f)) if err != nil { wwlog.Warn("ipxe binary could not be copied, booting may not work: %s", err) } diff --git a/internal/pkg/container/config.go b/internal/pkg/container/config.go index 1faf7423..ebbc8569 100644 --- a/internal/pkg/container/config.go +++ b/internal/pkg/container/config.go @@ -3,11 +3,12 @@ package container import ( "path" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" + "github.com/hpcng/warewulf/internal/pkg/warewulfconf" ) func SourceParentDir() string { - return buildconfig.WWCHROOTDIR() + conf := warewulfconf.New() + return conf.WWCHROOTDIR() } func SourceDir(name string) string { @@ -19,7 +20,8 @@ func RootFsDir(name string) string { } func ImageParentDir() string { - return path.Join(buildconfig.WWPROVISIONDIR(), "container/") + conf := warewulfconf.New() + return path.Join(conf.WWPROVISIONDIR(), "container/") } func ImageFile(name string) string { diff --git a/internal/pkg/kernel/kernel.go b/internal/pkg/kernel/kernel.go index 9983572e..14ce78a2 100644 --- a/internal/pkg/kernel/kernel.go +++ b/internal/pkg/kernel/kernel.go @@ -11,8 +11,8 @@ import ( "github.com/pkg/errors" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" "github.com/hpcng/warewulf/internal/pkg/util" + "github.com/hpcng/warewulf/internal/pkg/warewulfconf" "github.com/hpcng/warewulf/internal/pkg/wwlog" ) @@ -28,7 +28,8 @@ var ( ) func KernelImageTopDir() string { - return path.Join(buildconfig.WWPROVISIONDIR(), "kernel") + conf := warewulfconf.New() + return path.Join(conf.WWPROVISIONDIR(), "kernel") } func KernelImage(kernelName string) string { diff --git a/internal/pkg/node/constructors.go b/internal/pkg/node/constructors.go index d69bdf74..3d83f8df 100644 --- a/internal/pkg/node/constructors.go +++ b/internal/pkg/node/constructors.go @@ -7,7 +7,7 @@ import ( "sort" "strings" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" + "github.com/hpcng/warewulf/internal/pkg/warewulfconf" "github.com/hpcng/warewulf/internal/pkg/wwlog" "gopkg.in/yaml.v2" @@ -37,11 +37,12 @@ defaultnode: netmask: 255.255.255.0` func init() { + conf := warewulfconf.New() if ConfigFile == "" { - ConfigFile = path.Join(buildconfig.SYSCONFDIR(), "warewulf/nodes.conf") + ConfigFile = path.Join(conf.SYSCONFDIR(), "warewulf/nodes.conf") } if DefaultConfig == "" { - DefaultConfig = path.Join(buildconfig.SYSCONFDIR(), "warewulf/defaults.conf") + DefaultConfig = path.Join(conf.SYSCONFDIR(), "warewulf/defaults.conf") } } diff --git a/internal/pkg/overlay/config.go b/internal/pkg/overlay/config.go index c9b80306..3f5b1bd4 100644 --- a/internal/pkg/overlay/config.go +++ b/internal/pkg/overlay/config.go @@ -5,11 +5,12 @@ import ( "path" "strings" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" + "github.com/hpcng/warewulf/internal/pkg/warewulfconf" ) func OverlaySourceTopDir() string { - return buildconfig.WWOVERLAYDIR() + conf := warewulfconf.New() + return conf.WWOVERLAYDIR() } /* @@ -30,5 +31,6 @@ func OverlaySourceDir(overlayName string) string { Returns the overlay name of the image for a given node */ func OverlayImage(nodeName string, overlayName []string) string { - return path.Join(buildconfig.WWPROVISIONDIR(), "overlays/", nodeName, strings.Join(overlayName, "-")+".img") + conf := warewulfconf.New() + return path.Join(conf.WWPROVISIONDIR(), "overlays/", nodeName, strings.Join(overlayName, "-")+".img") } diff --git a/internal/pkg/overlay/funcmap.go b/internal/pkg/overlay/funcmap.go index 49b50d3d..d3fe05e5 100644 --- a/internal/pkg/overlay/funcmap.go +++ b/internal/pkg/overlay/funcmap.go @@ -6,9 +6,9 @@ import ( "path" "strings" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" "github.com/hpcng/warewulf/internal/pkg/container" "github.com/hpcng/warewulf/internal/pkg/util" + "github.com/hpcng/warewulf/internal/pkg/warewulfconf" "github.com/hpcng/warewulf/internal/pkg/wwlog" ) @@ -18,8 +18,9 @@ the path is relative to SYSCONFDIR. Templates in the file are no evaluated. */ func templateFileInclude(inc string) string { + conf := warewulfconf.New() if !strings.HasPrefix(inc, "/") { - inc = path.Join(buildconfig.SYSCONFDIR(), "warewulf", inc) + inc = path.Join(conf.SYSCONFDIR(), "warewulf", inc) } wwlog.Debug("Including file into template: %s", inc) content, err := os.ReadFile(inc) @@ -35,8 +36,9 @@ is the file to read, the second the abort string Templates in the file are no evaluated. */ func templateFileBlock(inc string, abortStr string) (string, error) { + conf := warewulfconf.New() if !strings.HasPrefix(inc, "/") { - inc = path.Join(buildconfig.SYSCONFDIR(), "warewulf", inc) + inc = path.Join(conf.SYSCONFDIR(), "warewulf", inc) } wwlog.Debug("Including file block into template: %s", inc) readFile, err := os.Open(inc) diff --git a/internal/pkg/version/version.go b/internal/pkg/version/version.go index f77050f4..5ce00f23 100644 --- a/internal/pkg/version/version.go +++ b/internal/pkg/version/version.go @@ -4,14 +4,15 @@ import ( "fmt" "github.com/hpcng/warewulf/internal/pkg/api/routes/wwapiv1" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" + "github.com/hpcng/warewulf/internal/pkg/warewulfconf" ) /* Return the version of wwctl */ func GetVersion() string { - return fmt.Sprintf("%s-%s", buildconfig.VERSION(), buildconfig.RELEASE()) + conf := warewulfconf.New() + return fmt.Sprintf("%s-%s", conf.VERSION(), conf.RELEASE()) } /* diff --git a/internal/pkg/warewulfconf/buildconfig.go.in b/internal/pkg/warewulfconf/buildconfig.go.in new file mode 100644 index 00000000..7bdf96e1 --- /dev/null +++ b/internal/pkg/warewulfconf/buildconfig.go.in @@ -0,0 +1,18 @@ +package warewulfconf + +type BuildConfig struct { + bindir string `default:"@BINDIR@"` + sysconfdir string `default:"@SYSCONFDIR@"` + datadir string `default:"@DATADIR@"` + localstatedir string `default:"@LOCALSTATEDIR@"` + srvdir string `default:"@SRVDIR@"` + tftpdir string `default:"@TFTPDIR@"` + firewallddir string `default:"@FIREWALLDDIR@"` + systemddir string `default:"@SYSTEMDDIR@"` + wwoverlaydir string `default:"@WWOVERLAYDIR@"` + wwchrootdir string `default:"@WWCHROOTDIR@"` + wwprovisiondir string `default:"@WWPROVISIONDIR@"` + version string `default:"@VERSION@"` + release string `default:"@RELEASE@"` + wwclientdir string `default:"@WWCLIENTDIR@"` +} diff --git a/internal/pkg/warewulfconf/constructors.go b/internal/pkg/warewulfconf/constructors.go index 231749c2..0b01e760 100644 --- a/internal/pkg/warewulfconf/constructors.go +++ b/internal/pkg/warewulfconf/constructors.go @@ -5,11 +5,9 @@ import ( "fmt" "net" "os" - "path" "github.com/brotherpowers/ipsubnet" "github.com/creasty/defaults" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" "github.com/hpcng/warewulf/internal/pkg/wwlog" "gopkg.in/yaml.v2" ) @@ -18,18 +16,6 @@ var cachedConf ControllerConf var ConfigFile string -/* -Get the configFile location from the os.ev if set -*/ -func init() { - if ConfigFile == "" { - ConfigFile = os.Getenv("WARWULFCONF") - } - if ConfigFile == "" { - ConfigFile = path.Join(buildconfig.SYSCONFDIR(), "warewulf/warewulf.conf") - } -} - /* Creates a new empty ControllerConf object, returns a cached one if called in a nother context. @@ -42,10 +28,9 @@ func New() (ret ControllerConf) { ret.Dhcp = new(DhcpConf) ret.Tftp = new(TftpConf) ret.Nfs = new(NfsConf) - err := defaults.Set(&ret) - if err != nil { - ret.setDynamicDefaults() - } + ret.Paths = new(BuildConfig) + _ = defaults.Set(&ret) + ret.setDynamicDefaults() cachedConf = ret cachedConf.current = true diff --git a/internal/pkg/warewulfconf/datastructure.go b/internal/pkg/warewulfconf/datastructure.go index ff12e4cb..33d77fe2 100644 --- a/internal/pkg/warewulfconf/datastructure.go +++ b/internal/pkg/warewulfconf/datastructure.go @@ -18,6 +18,7 @@ type ControllerConf struct { Tftp *TftpConf `yaml:"tftp"` Nfs *NfsConf `yaml:"nfs"` MountsContainer []*MountEntry `yaml:"container mounts" default:"[{\"source\": \"/etc/resolv.conf\", \"dest\": \"/etc/resolv.conf\"}]"` + Paths *BuildConfig `yaml:"mypaths"` current bool } diff --git a/internal/pkg/warewulfconf/getter.go b/internal/pkg/warewulfconf/getter.go new file mode 100644 index 00000000..6a3f5a01 --- /dev/null +++ b/internal/pkg/warewulfconf/getter.go @@ -0,0 +1,73 @@ +package warewulfconf + +import "github.com/hpcng/warewulf/internal/pkg/wwlog" + +func (conf *ControllerConf) BINDIR() string { + wwlog.Debug("BINDIR = '%s'", conf.Paths.bindir) + return conf.Paths.bindir +} + +func (conf *ControllerConf) DATADIR() string { + wwlog.Debug("DATADIR = '%s'", conf.Paths.datadir) + return conf.Paths.datadir +} + +func (conf *ControllerConf) SYSCONFDIR() string { + wwlog.Debug("SYSCONFDIR = '%s'", conf.Paths.sysconfdir) + return conf.Paths.sysconfdir +} + +func (conf *ControllerConf) LOCALSTATEDIR() string { + wwlog.Debug("LOCALSTATEDIR = '%s'", conf.Paths.localstatedir) + return conf.Paths.localstatedir +} + +func (conf *ControllerConf) SRVDIR() string { + wwlog.Debug("SRVDIR = '%s'", conf.Paths.srvdir) + return conf.Paths.srvdir +} + +func (conf *ControllerConf) TFTPDIR() string { + wwlog.Debug("TFTPDIR = '%s'", conf.Paths.tftpdir) + return conf.Paths.tftpdir +} + +func (conf *ControllerConf) FIREWALLDDIR() string { + wwlog.Debug("FIREWALLDDIR = '%s'", conf.Paths.firewallddir) + return conf.Paths.firewallddir +} + +func (conf *ControllerConf) SYSTEMDDIR() string { + wwlog.Debug("SYSTEMDDIR = '%s'", conf.Paths.systemddir) + return conf.Paths.systemddir +} + +func (conf *ControllerConf) WWOVERLAYDIR() string { + wwlog.Debug("WWOVERLAYDIR = '%s'", conf.Paths.wwoverlaydir) + return conf.Paths.wwoverlaydir +} + +func (conf *ControllerConf) WWCHROOTDIR() string { + wwlog.Debug("WWCHROOTDIR = '%s'", conf.Paths.wwchrootdir) + return conf.Paths.wwchrootdir +} + +func (conf *ControllerConf) WWPROVISIONDIR() string { + wwlog.Debug("WWPROVISIONDIR = '%s'", conf.Paths.wwprovisiondir) + return conf.Paths.wwprovisiondir +} + +func (conf *ControllerConf) VERSION() string { + wwlog.Debug("VERSION = '%s'", conf.Paths.version) + return conf.Paths.version +} + +func (conf *ControllerConf) RELEASE() string { + wwlog.Debug("RELEASE = '%s'", conf.Paths.release) + return conf.Paths.release +} + +func (conf *ControllerConf) WWCLIENTDIR() string { + wwlog.Debug("WWCLIENTDIR = '%s'", conf.Paths.wwclientdir) + return conf.Paths.wwclientdir +} diff --git a/internal/pkg/warewulfd/provision.go b/internal/pkg/warewulfd/provision.go index 67d23ac1..7b96ee6d 100644 --- a/internal/pkg/warewulfd/provision.go +++ b/internal/pkg/warewulfd/provision.go @@ -7,7 +7,6 @@ import ( "strconv" "text/template" - "github.com/hpcng/warewulf/internal/pkg/buildconfig" "github.com/hpcng/warewulf/internal/pkg/container" "github.com/hpcng/warewulf/internal/pkg/kernel" "github.com/hpcng/warewulf/internal/pkg/util" @@ -80,13 +79,13 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) { if !node.Id.Defined() { wwlog.Error("%s (unknown/unconfigured node)", rinfo.hwaddr) if rinfo.stage == "ipxe" { - stage_file = path.Join(buildconfig.SYSCONFDIR(), "/warewulf/ipxe/unconfigured.ipxe") + stage_file = path.Join(conf.SYSCONFDIR(), "/warewulf/ipxe/unconfigured.ipxe") tmpl_data = iPxeTemplate{ Hwaddr: rinfo.hwaddr} } } else if rinfo.stage == "ipxe" { - stage_file = path.Join(buildconfig.SYSCONFDIR(), "warewulf/ipxe/"+node.Ipxe.Get()+".ipxe") + stage_file = path.Join(conf.SYSCONFDIR(), "warewulf/ipxe/"+node.Ipxe.Get()+".ipxe") tmpl_data = iPxeTemplate{ Id: node.Id.Get(), Cluster: node.ClusterName.Get(),