From 9061c1b56906b89f94296b5b9828748698329cda233d36be45a7ba7f53dffea0 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Thu, 14 Apr 2022 13:46:48 +0000 Subject: [PATCH 1/3] Accepting request 970166 from home:mslacken:pr - update to v4.3.0rc2 with following major changes: * Provision interface is not tied to 'eth0' any more. The provision interface must be named 'default' now. The file `nodes.yaml' must be changed accordingly. * Creating of '/etc/exports' can now be disabled, so that wwctl configure -a wont overwrite a existing '/etc/exports'. * All configurations files for the host (/etc/exports, /etc/dhcpd.conf, /etc/hosts) are now populated from the (OVERLAYDIR/host/etc/{exports|dhcpd|hosts}.ww . Also other configuration files like prometheus.yml.ww or slurm.conf.ww which depend on the cluster nodes can be placed. Also the new templated functions {{ abort }}, {{ IncludeBlock }} abd {{ no_backup }} are allowed now. * nodes and profiles can now have multiple system and runtime overlays, as a comma separated list. * The overlays of the profile and the nodes are combined. * Simple ipv6 support is now enabled. In warewulf.conf the option ipaddr6/Ipv6net must be set to enable ipv6. If enabled on of these options is set a node will get a derived ipv6 in the scheme ipv6net:ipaddr4. This address can also be overwritten for every node * Multiple files can now created from a single template.ww file with the {{ file FILENAME }} command in the template. The command is expanded to the magic template command {{ /* file FILENAME */}} which is picked up by wwctl and everything which comes after this magic comment will be written to the file FILENAME. This mechanism is leveraged in the configuration files for the network, see ifcfg.xml.ww and ifcgf.ww. * Networks can now have arbitrary keys value pairs in the profiles and on the node, so that things like bridges and mtu sizes can be set * The yaml format for nodes has now sub-keys for ipmi and kernel, old nodes.conf files have to to be changed accordingly * uids and gids of a container now get synced at import time, so that at least users with the same name have the same uid. This is not necessarily needed for warewulf, but services like munge. OBS-URL: https://build.opensuse.org/request/show/970166 OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf4?expand=0&rev=6 --- ...tateDir-is-configureable-to-meet-FHS.patch | 128 ----------------- _service | 5 + vendor.tar.gz | 4 +- warewulf-4.2.0.tar.gz | 3 - warewulf.conf | 2 + warewulf4-v4.3.0rc2.tar.gz | 3 + warewulf4.changes | 37 +++++ warewulf4.spec | 133 ++++++++++++++---- 8 files changed, 155 insertions(+), 160 deletions(-) delete mode 100644 LocalStateDir-is-configureable-to-meet-FHS.patch create mode 100644 _service delete mode 100644 warewulf-4.2.0.tar.gz create mode 100644 warewulf4-v4.3.0rc2.tar.gz diff --git a/LocalStateDir-is-configureable-to-meet-FHS.patch b/LocalStateDir-is-configureable-to-meet-FHS.patch deleted file mode 100644 index 012670d..0000000 --- a/LocalStateDir-is-configureable-to-meet-FHS.patch +++ /dev/null @@ -1,128 +0,0 @@ -From b670e183470c97e7fc0a266866ec3e9964084d12 Mon Sep 17 00:00:00 2001 -From: Christian Goll -Date: Wed, 21 Jul 2021 12:45:16 +0200 -Subject: [PATCH] LocalStateDir is configureable to meet FHS - ---- - Makefile | 27 +++++++++++----------- - internal/app/wwctl/configure/nfs/main.go | 2 +- - internal/pkg/config/config.go | 16 ++++++++++--- - internal/pkg/warewulfconf/datastructure.go | 1 + - 4 files changed, 29 insertions(+), 17 deletions(-) - -diff --git a/Makefile b/Makefile -index 0babd54..7169b6c 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,6 +1,7 @@ - .PHONY: all - - VERSION := 4.2.0 -+LOCALSTATE ?= /var/warewulf/ - - # auto installed tooling - TOOLS_DIR := .tools -@@ -52,8 +53,8 @@ debian: all - - files: all - install -d -m 0755 $(DESTDIR)/usr/bin/ -- install -d -m 0755 $(DESTDIR)/var/warewulf/ -- install -d -m 0755 $(DESTDIR)/var/warewulf/chroots -+ install -d -m 0755 $(DESTDIR)$(LOCALSTATE)/ -+ install -d -m 0755 $(DESTDIR)$(LOCALSTATE)/chroots - install -d -m 0755 $(DESTDIR)/etc/warewulf/ - install -d -m 0755 $(DESTDIR)/etc/warewulf/ipxe - install -d -m 0755 $(DESTDIR)/var/lib/tftpboot/warewulf/ipxe/ -@@ -63,12 +64,12 @@ files: all - test -f $(DESTDIR)/etc/warewulf/hosts.tmpl || install -m 644 etc/hosts.tmpl $(DESTDIR)/etc/warewulf/ - cp -r etc/dhcp $(DESTDIR)/etc/warewulf/ - cp -r etc/ipxe $(DESTDIR)/etc/warewulf/ -- cp -r overlays $(DESTDIR)/var/warewulf/ -- chmod +x $(DESTDIR)/var/warewulf/overlays/system/default/init -- chmod 600 $(DESTDIR)/var/warewulf/overlays/system/default/etc/ssh/ssh* -- chmod 644 $(DESTDIR)/var/warewulf/overlays/system/default/etc/ssh/ssh*.pub.ww -- mkdir -p $(DESTDIR)/var/warewulf/overlays/system/default/warewulf/bin/ -- cp wwclient $(DESTDIR)/var/warewulf/overlays/system/default/warewulf/bin/ -+ cp -r overlays $(DESTDIR)$(LOCALSTATE)/ -+ chmod +x $(DESTDIR)$(LOCALSTATE)/overlays/system/default/init -+ chmod 600 $(DESTDIR)$(LOCALSTATE)/overlays/system/default/etc/ssh/ssh* -+ chmod 644 $(DESTDIR)$(LOCALSTATE)/overlays/system/default/etc/ssh/ssh*.pub.ww -+ mkdir -p $(DESTDIR)$(LOCALSTATE)/overlays/system/default/warewulf/bin/ -+ cp wwclient $(DESTDIR)$(LOCALSTATE)/overlays/system/default/warewulf/bin/ - cp wwctl $(DESTDIR)/usr/bin/ - mkdir -p $(DESTDIR)/usr/lib/firewalld/services - install -c -m 0644 include/firewalld/warewulf.xml $(DESTDIR)/usr/lib/firewalld/services -@@ -82,11 +83,11 @@ files: all - # restorecon -r /var/lib/tftpboot/warewulf - - debfiles: debian -- chmod +x $(DESTDIR)/var/warewulf/overlays/system/debian/init -- chmod 600 $(DESTDIR)/var/warewulf/overlays/system/debian/etc/ssh/ssh* -- chmod 644 $(DESTDIR)/var/warewulf/overlays/system/debian/etc/ssh/ssh*.pub.ww -- mkdir -p $(DESTDIR)/var/warewulf/overlays/system/debian/warewulf/bin/ -- cp wwclient $(DESTDIR)/var/warewulf/overlays/system/debian/warewulf/bin/ -+ chmod +x $(DESTDIR)$(LOCALSTATE)/overlays/system/debian/init -+ chmod 600 $(DESTDIR)$(LOCALSTATE)/overlays/system/debian/etc/ssh/ssh* -+ chmod 644 $(DESTDIR)$(LOCALSTATE)/overlays/system/debian/etc/ssh/ssh*.pub.ww -+ mkdir -p $(DESTDIR)$(LOCALSTATE)/overlays/system/debian/warewulf/bin/ -+ cp wwclient $(DESTDIR)$(LOCALSTATE)/overlays/system/debian/warewulf/bin/ - - wwctl: - cd cmd/wwctl; GOOS=linux go build -mod vendor -tags "$(WW_BUILD_GO_BUILD_TAGS)" -o ../../wwctl -diff --git a/internal/app/wwctl/configure/nfs/main.go b/internal/app/wwctl/configure/nfs/main.go -index 7827b24..4657f66 100644 ---- a/internal/app/wwctl/configure/nfs/main.go -+++ b/internal/app/wwctl/configure/nfs/main.go -@@ -40,7 +40,7 @@ func Configure(show bool) error { - } - defer exports.Close() - -- fstab, err := os.OpenFile("/var/warewulf/overlays/system/default/etc/fstab", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) -+ fstab, err := os.OpenFile(fmt.Sprintf("%s/overlays/system/default/etc/fstab",controller.LocalStateDir), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) - if err != nil { - wwlog.Printf(wwlog.ERROR, "%s\n", err) - os.Exit(1) -diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go -index 34a9f00..c08221d 100644 ---- a/internal/pkg/config/config.go -+++ b/internal/pkg/config/config.go -@@ -6,11 +6,21 @@ import ( - - "github.com/hpcng/warewulf/internal/pkg/util" - "github.com/hpcng/warewulf/internal/pkg/wwlog" -+ "github.com/hpcng/warewulf/internal/pkg/warewulfconf" - ) - --const ( -- LocalStateDir = "/var/warewulf" --) -+var LocalStateDir = "/var/warewulf" -+ -+func init() { -+ conf, err := warewulfconf.New() -+ if err != nil { -+ wwlog.Printf(wwlog.ERROR, "%s\n", err) -+ return -+ } -+ if conf.LocalStateDir != "" { -+ LocalStateDir = conf.LocalStateDir -+ } -+} - - func OverlayDir() string { - return fmt.Sprintf("%s/overlays/", LocalStateDir) -diff --git a/internal/pkg/warewulfconf/datastructure.go b/internal/pkg/warewulfconf/datastructure.go -index 8315ddd..a688617 100644 ---- a/internal/pkg/warewulfconf/datastructure.go -+++ b/internal/pkg/warewulfconf/datastructure.go -@@ -13,6 +13,7 @@ type ControllerConf struct { - Netmask string `yaml:"netmask"` - Network string `yaml:"network,omitempty"` - Fqdn string `yaml:"fqdn,omitempty"` -+ LocalStateDir string `yaml:"localstatedir"` - Warewulf *WarewulfConf `yaml:"warewulf"` - Dhcp *DhcpConf `yaml:"dhcp"` - Tftp *TftpConf `yaml:"tftp"` --- -2.33.0 - diff --git a/_service b/_service new file mode 100644 index 0000000..c599762 --- /dev/null +++ b/_service @@ -0,0 +1,5 @@ + + + + + diff --git a/vendor.tar.gz b/vendor.tar.gz index 4ded365..66d7bf0 100644 --- a/vendor.tar.gz +++ b/vendor.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:65783e69b83be9ce0a2bede542ae5983b23c15994c8e4487ed83adb1c1745808 -size 3526332 +oid sha256:d7f581d6646f04eaca87287ff924a728e345cbcf331e4f9972990276cb7a5840 +size 4839581 diff --git a/warewulf-4.2.0.tar.gz b/warewulf-4.2.0.tar.gz deleted file mode 100644 index 5618934..0000000 --- a/warewulf-4.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c1ea8284584374011c6125cf0100f2ab1dbe7d7b9eeb4bc979b9a9766db6bd6 -size 1298057 diff --git a/warewulf.conf b/warewulf.conf index 1c1dbb7..f7fe962 100644 --- a/warewulf.conf +++ b/warewulf.conf @@ -5,6 +5,8 @@ warewulf: port: 9873 secure: true update interval: 60 + datastore: /var/lib/warewulf + dhcp: enabled: true range start: 10.10.93.10 diff --git a/warewulf4-v4.3.0rc2.tar.gz b/warewulf4-v4.3.0rc2.tar.gz new file mode 100644 index 0000000..c3c4f0e --- /dev/null +++ b/warewulf4-v4.3.0rc2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:defeaa11a95214d1da4886b4418d75c3596f51a512b63cd04a2fd0a4f01f0340 +size 945584 diff --git a/warewulf4.changes b/warewulf4.changes index c38d039..cf80711 100644 --- a/warewulf4.changes +++ b/warewulf4.changes @@ -1,3 +1,40 @@ +------------------------------------------------------------------- +Thu Apr 14 13:18:23 UTC 2022 - Christian Goll + +- update to v4.3.0rc2 with following major changes: + * Provision interface is not tied to 'eth0' any more. The provision interface + must be named 'default' now. The file `nodes.yaml' must be changed accordingly. + * Creating of '/etc/exports' can now be disabled, so that wwctl configure -a + wont overwrite a existing '/etc/exports'. + * All configurations files for the host (/etc/exports, /etc/dhcpd.conf, + /etc/hosts) are now populated from the + (OVERLAYDIR/host/etc/{exports|dhcpd|hosts}.ww . Also other configuration + files like prometheus.yml.ww or slurm.conf.ww which depend on the cluster + nodes can be placed. Also the new templated functions {{ abort }}, + {{ IncludeBlock }} abd {{ no_backup }} are allowed now. + * nodes and profiles can now have multiple system and runtime overlays, as a + comma separated list. + * The overlays of the profile and the nodes are combined. + * Simple ipv6 support is now enabled. In warewulf.conf the option + ipaddr6/Ipv6net must be set to enable ipv6. If enabled on of these options + is set a node will get a derived ipv6 in the scheme ipv6net:ipaddr4. This + address can also be overwritten for every node + * Multiple files can now created from a single template.ww file with the {{ file FILENAME }} + command in the template. The command is expanded to the magic template command + {{ /* file FILENAME */}} which is picked up by wwctl and everything which comes after this + magic comment will be written to the file FILENAME. This mechanism is leveraged in the + configuration files for the network, see ifcfg.xml.ww and ifcgf.ww. + * Networks can now have arbitrary keys value pairs in the profiles and on the node, so that + things like bridges and mtu sizes can be set + * The yaml format for nodes has now sub-keys for ipmi and kernel, old nodes.conf files have to + to be changed accordingly + * uids and gids of a container now get synced at import time, so that at least users with the + same name have the same uid. This is not necessarily needed for warewulf, but services like + munge. + * backward compatibility for nodes.conf + * added file:// uri for importing archived containers + + ------------------------------------------------------------------- Thu Oct 28 07:00:53 UTC 2021 - Christian Goll diff --git a/warewulf4.spec b/warewulf4.spec index dcad4c9..d7a610a 100644 --- a/warewulf4.spec +++ b/warewulf4.spec @@ -1,7 +1,7 @@ # # spec file for package warewulf4 # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,45 +16,47 @@ # -%global provider github -%global provider_tld com -%global project hpcng -%global repo warewulf -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} - ExclusiveArch: x86_64 aarch64 Name: warewulf4 -Version: 4.2.0 +Version: 4.3.0rc2 Release: 0 Summary: A suite of tools for clustering License: BSD-3-Clause Group: Productivity/Clustering/Computing -URL: https://warewulf.hpcng.org/docs/ -Source0: https://github.com/hpcng/warewulf/archive/v%{version}.tar.gz#/warewulf-%{version}.tar.gz +URL: https://warewulf.org +Source0: https://github.com/hpcng/warewulf/archive/v%{version}.tar.gz#/warewulf4-v%{version}.tar.gz Source1: vendor.tar.gz -Source2: warewulf.conf Source3: warewulf4-rpmlintrc + +#Patch1: overlay-host.patch + # no firewalld in sle12 %if 0%{?sle_version} >= 150000 || 0%{?suse_version} > 1500 BuildRequires: firewalld %endif +BuildRequires: dracut BuildRequires: go >= 1.15 BuildRequires: golang-packaging +BuildRequires: libgpgme-devel BuildRequires: make +BuildRequires: munge BuildRequires: sysuser-tools +BuildRequires: tftp BuildRoot: %{_tmppath}/%{name}-%{version}-build -Patch0: LocalStateDir-is-configureable-to-meet-FHS.patch +Requires: %{name}-ipxe Requires: %{name}-overlay Requires: dhcp-server Requires: ipmitool -Requires: tftp +Requires: nfs-kernel-server %{go_nostrip} %description -Warewulf v4 combines ultra scalability, flexibility, and simplicity with being light weight, non-intrusive, and a great tool for scientists and seasoned system administrators alike. Warewulf empowers you to scalably and easily manage thousands of compute resources. +Warewulf v4 combines ultra scalability, flexibility, and simplicity with being +light weight, non-intrusive, and a great tool for scientists and seasoned +system administrators alike. Warewulf empowers you to scalably and easily +manage thousands of compute resources. %package overlay # Smells like a circular dependcy, but needed in this case as the @@ -66,30 +68,82 @@ Group: Productivity/Clustering/Computing %description overlay Includes the default overlays so that they can be updated seprately. +%package ipxe +Requires: tftp +Summary: Binaries of iPXE for ww4 installation +BuildArch: noarch + +%description ipxe +For the boot of the nodes iPXE binaries are needed. As these package includes these files for +x86, i386 and ARM. + +%package slurm +Summary: Configuration template for slurm +Requires: %{name} = %{version} +Requires: slurm + +%description slurm +This package install the necessary configuration files in order to run a slurm +cluster on the configured warewulf nodes. + %prep %setup -q -n warewulf-%{version} -%setup -q -D -T -a 1 -n warewulf-%{version} +# extract the vendor stuff +tar xzf %{S:1} %autopatch -p1 %build -%goprep %{import_path} - -make %{?_smp_mflags} +%global tftpdir /srv/tftpboot +make %{?_smp_mflags} genconfig \ + PREFIX=%{_prefix} \ + BINDIR=%{_bindir} \ + SYSCONFDIR=%{_sysconfdir} \ + DATADIR=%{_datadir} \ + LOCALSTATEDIR=%{_sharedstatedir} \ + SHAREDSTATEDIR=%{_sharedstatedir} \ + MANDIR=%{_mandir} \ + INFODIR=%{_infodir} \ + DOCDIR=%{_docdir} \ + SRVDIR=%{_sharedstatedir} \ + TFTPDIR=%{tftpdir} \ + SYSTEMDDIR=%{_unitdir} \ + BASHCOMPDIR=%{_datadir}/bash-completion/completions/ \ + FIREWALLDDIR=/usr/lib/firewalld/services \ + WWCLIENTDIR=/warewulf %install -LOCALSTATE=%{_localstatedir}/lib/warewulf/ %{makeinstall} +# we have a broken symlink for wwclient +export NO_BRP_STALE_LINK_ERROR=yes +%{makeinstall} + +# cleanup mkdir -p %{buildroot}%{_sbindir}/ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcwarewulfd -chmod 755 %{buildroot}%{_localstatedir}/lib/warewulf/overlays/system/default/warewulf/init.d/* -mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/ +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions mv -v %{buildroot}%{_sysconfdir}/bash_completion.d/warewulf %{buildroot}%{_datadir}/bash-completion/completions/wwctl -cp %{S:2} %{buildroot}%{_sysconfdir}/warewulf/warewulf.conf +#cp %{S:2} %{buildroot}%{_sysconfdir}/warewulf/warewulf.conf +#rm -rf %{buildroot}%{_datadir}/warewulf/ipxe +rm -f %{buildroot}/usr/share/doc/packages/warewulf/LICENSE.md + # create systemuser echo "u warewulf -" > system-user-%{name}.conf echo "g warewulf -" >> system-user-%{name}.conf %sysusers_generate_pre system-user-%{name}.conf %{name} system-user-%{name}.conf install -D -m 644 system-user-%{name}.conf %{buildroot}%{_sysusersdir}/system-user-%{name}.conf +# get the slurm package readay +mkdir -p %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/etc/slurm +mv %{buildroot}%{_sysconfdir}/warewulf/examples/slurm.conf.ww %{buildroot}%{_localstatedir}/lib/warewulf/overlays/host/etc/slurm +mkdir -p %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/etc/munge +cat > %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/etc/munge/munge.key.ww < %{buildroot}%{_localstatedir}/lib/warewulf/overlays/generic/etc/slurm/slurm.conf.ww < Date: Thu, 14 Apr 2022 13:53:30 +0000 Subject: [PATCH 2/3] Accepting request 970176 from home:mslacken:pr removed old warewulf.conf OBS-URL: https://build.opensuse.org/request/show/970176 OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf4?expand=0&rev=7 --- warewulf.conf | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 warewulf.conf diff --git a/warewulf.conf b/warewulf.conf deleted file mode 100644 index f7fe962..0000000 --- a/warewulf.conf +++ /dev/null @@ -1,25 +0,0 @@ -ipaddr: 10.10.93.254 -netmask: 255.255.255.0 -localstatedir: /var/lib/warewulf -warewulf: - port: 9873 - secure: true - update interval: 60 - datastore: /var/lib/warewulf - -dhcp: - enabled: true - range start: 10.10.93.10 - range end: 10.10.93.250 - template: default - systemd name: dhcpd - config file: /etc/dhcpd.conf -tftp: - enabled: true - tftproot: /srv/tftpboot - systemd name: tftp -nfs: - systemd name: nfs-server - exports: - - /home - - /var/lib/warewulf From 0550fee4ffaf5e764fe180a1265a5730ea4f963c8669cdfbe42ceb5eb3ec2db4 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Thu, 14 Apr 2022 14:54:12 +0000 Subject: [PATCH 3/3] Accepting request 970197 from home:mslacken:pr - removed LocalStateDir-is-configureable-to-meet-FHS.patch as implemented upstream OBS-URL: https://build.opensuse.org/request/show/970197 OBS-URL: https://build.opensuse.org/package/show/network:cluster/warewulf4?expand=0&rev=8 --- warewulf4.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warewulf4.changes b/warewulf4.changes index cf80711..682a0bb 100644 --- a/warewulf4.changes +++ b/warewulf4.changes @@ -33,7 +33,7 @@ Thu Apr 14 13:18:23 UTC 2022 - Christian Goll munge. * backward compatibility for nodes.conf * added file:// uri for importing archived containers - +- removed LocalStateDir-is-configureable-to-meet-FHS.patch as implemented upstream ------------------------------------------------------------------- Thu Oct 28 07:00:53 UTC 2021 - Christian Goll