New architecture-specific wwclient overlays
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
|
|
||||||
## v4.6.5, unreleased
|
## v4.6.5, unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- `wwclient.aarch64` overlay always provides an aarch64 wwclient executable.
|
||||||
|
- `wwclient.x86_64` overlay always provides an x86_64 wwclient executable.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Renamed debian.interfaces overlay to ifupdown
|
- Renamed debian.interfaces overlay to ifupdown
|
||||||
|
|||||||
31
Makefile
31
Makefile
@@ -21,8 +21,10 @@ include Tools.mk
|
|||||||
version: ## Build version
|
version: ## Build version
|
||||||
@echo $(VERSION)
|
@echo $(VERSION)
|
||||||
|
|
||||||
|
WWCLIENTS = wwclient wwclient.x86_64 wwclient.aarch64
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: wwctl wwclient etc/bash_completion.d/wwctl ## Build the Warewulf binaries
|
build: wwctl $(WWCLIENTS) etc/bash_completion.d/wwctl ## Build the Warewulf binaries
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs
|
||||||
docs: man_pages reference ## Build the documentation
|
docs: man_pages reference ## Build the documentation
|
||||||
@@ -63,7 +65,13 @@ wwctl: $(config) $(call godeps,cmd/wwctl/main.go)
|
|||||||
GOOS=linux go build -mod vendor -tags "$(WW_GO_BUILD_TAGS)" -o wwctl cmd/wwctl/main.go
|
GOOS=linux go build -mod vendor -tags "$(WW_GO_BUILD_TAGS)" -o wwctl cmd/wwctl/main.go
|
||||||
|
|
||||||
wwclient: $(config) $(call godeps,cmd/wwclient/main.go)
|
wwclient: $(config) $(call godeps,cmd/wwclient/main.go)
|
||||||
CGO_ENABLED=0 GOOS=linux go build -mod vendor -a -ldflags "-extldflags -static" -o wwclient cmd/wwclient/main.go
|
CGO_ENABLED=0 GOOS=linux go build -mod vendor -a -ldflags "-extldflags -static -s -w" -o wwclient cmd/wwclient/main.go
|
||||||
|
|
||||||
|
wwclient.x86_64: $(config) $(call godeps,cmd/wwclient/main.go)
|
||||||
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -a -ldflags "-extldflags -static -s -w" -o wwclient.x86_64 cmd/wwclient/main.go
|
||||||
|
|
||||||
|
wwclient.aarch64: $(config) $(call godeps,cmd/wwclient/main.go)
|
||||||
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -mod vendor -a -ldflags "-extldflags -static -s -w" -o wwclient.aarch64 cmd/wwclient/main.go
|
||||||
|
|
||||||
.PHONY: man_pages
|
.PHONY: man_pages
|
||||||
man_pages: wwctl $(wildcard docs/man/man5/*.5)
|
man_pages: wwctl $(wildcard docs/man/man5/*.5)
|
||||||
@@ -155,7 +163,7 @@ cleanmake:
|
|||||||
|
|
||||||
.PHONY: cleanbin
|
.PHONY: cleanbin
|
||||||
cleanbin:
|
cleanbin:
|
||||||
rm -f wwclient
|
rm -f $(WWCLIENTS)
|
||||||
rm -f wwctl
|
rm -f wwctl
|
||||||
rm -f update_configuration
|
rm -f update_configuration
|
||||||
|
|
||||||
@@ -181,7 +189,6 @@ install: build docs ## Install Warewulf from source
|
|||||||
install -d -m 0755 $(DESTDIR)$(WWCHROOTDIR)
|
install -d -m 0755 $(DESTDIR)$(WWCHROOTDIR)
|
||||||
install -d -m 0755 $(DESTDIR)$(WWOVERLAYDIR)
|
install -d -m 0755 $(DESTDIR)$(WWOVERLAYDIR)
|
||||||
install -d -m 0755 $(DESTDIR)$(WWPROVISIONDIR)
|
install -d -m 0755 $(DESTDIR)$(WWPROVISIONDIR)
|
||||||
install -d -m 0755 $(DESTDIR)$(DATADIR)/warewulf/overlays/wwclient/rootfs/$(WWCLIENTDIR)
|
|
||||||
install -d -m 0755 $(DESTDIR)$(DATADIR)/warewulf/overlays/host/rootfs/$(TFTPDIR)/warewulf/
|
install -d -m 0755 $(DESTDIR)$(DATADIR)/warewulf/overlays/host/rootfs/$(TFTPDIR)/warewulf/
|
||||||
install -d -m 0755 $(DESTDIR)$(WWCONFIGDIR)/examples
|
install -d -m 0755 $(DESTDIR)$(WWCONFIGDIR)/examples
|
||||||
install -d -m 0755 $(DESTDIR)$(WWCONFIGDIR)/ipxe
|
install -d -m 0755 $(DESTDIR)$(WWCONFIGDIR)/ipxe
|
||||||
@@ -216,11 +223,7 @@ install: build docs ## Install Warewulf from source
|
|||||||
chmod 0644 $(DESTDIR)$(DATADIR)/warewulf/overlays/ssh.host_keys/rootfs/etc/ssh/ssh*.pub.ww
|
chmod 0644 $(DESTDIR)$(DATADIR)/warewulf/overlays/ssh.host_keys/rootfs/etc/ssh/ssh*.pub.ww
|
||||||
chmod 0600 $(DESTDIR)$(DATADIR)/warewulf/overlays/NetworkManager/rootfs/etc/NetworkManager/system-connections/ww4-managed.ww
|
chmod 0600 $(DESTDIR)$(DATADIR)/warewulf/overlays/NetworkManager/rootfs/etc/NetworkManager/system-connections/ww4-managed.ww
|
||||||
chmod 0750 $(DESTDIR)$(DATADIR)/warewulf/overlays/host/rootfs
|
chmod 0750 $(DESTDIR)$(DATADIR)/warewulf/overlays/host/rootfs
|
||||||
rm -rf $(DESTDIR)$(DATADIR)/warewulf/overlays/debian.interfaces # replacing symlink with a copy
|
|
||||||
install -d -m 755 $(DESTDIR)$(DATADIR)/warewulf/overlays/debian.interfaces
|
|
||||||
cp -a $(DESTDIR)$(DATADIR)/warewulf/overlays/ifupdown/* $(DESTDIR)$(DATADIR)/warewulf/overlays/debian.interfaces/
|
|
||||||
install -m 0755 wwctl $(DESTDIR)$(BINDIR)
|
install -m 0755 wwctl $(DESTDIR)$(BINDIR)
|
||||||
install -m 0755 wwclient $(DESTDIR)$(DATADIR)/warewulf/overlays/wwclient/rootfs/$(WWCLIENTDIR)/wwclient
|
|
||||||
install -m 0644 include/firewalld/warewulf.xml $(DESTDIR)$(FIREWALLDDIR)
|
install -m 0644 include/firewalld/warewulf.xml $(DESTDIR)$(FIREWALLDDIR)
|
||||||
install -m 0644 include/systemd/warewulfd.service $(DESTDIR)$(SYSTEMDDIR)
|
install -m 0644 include/systemd/warewulfd.service $(DESTDIR)$(SYSTEMDDIR)
|
||||||
install -m 0644 LICENSE.md $(DESTDIR)$(WWDOCDIR)
|
install -m 0644 LICENSE.md $(DESTDIR)$(WWDOCDIR)
|
||||||
@@ -230,6 +233,16 @@ install: build docs ## Install Warewulf from source
|
|||||||
install -pd -m 0755 $(DESTDIR)$(DRACUTMODDIR)/90wwinit
|
install -pd -m 0755 $(DESTDIR)$(DRACUTMODDIR)/90wwinit
|
||||||
install -m 0644 dracut/modules.d/90wwinit/*.sh dracut/modules.d/90wwinit/*.override $(DESTDIR)$(DRACUTMODDIR)/90wwinit
|
install -m 0644 dracut/modules.d/90wwinit/*.sh dracut/modules.d/90wwinit/*.override $(DESTDIR)$(DRACUTMODDIR)/90wwinit
|
||||||
|
|
||||||
|
# copy ifupdown to debian.interfaces for backwards compatibility with previous name
|
||||||
|
cp -a $(DESTDIR)$(DATADIR)/warewulf/overlays/ifupdown $(DESTDIR)$(DATADIR)/warewulf/overlays/debian.interfaces
|
||||||
|
|
||||||
|
install -d -m 0755 $(DESTDIR)$(DATADIR)/warewulf/overlays/wwclient/rootfs/$(WWCLIENTDIR)
|
||||||
|
cp -a $(DESTDIR)$(DATADIR)/warewulf/overlays/wwclient $(DESTDIR)$(DATADIR)/warewulf/overlays/wwclient.aarch64
|
||||||
|
cp -a $(DESTDIR)$(DATADIR)/warewulf/overlays/wwclient $(DESTDIR)$(DATADIR)/warewulf/overlays/wwclient.x86_64
|
||||||
|
install -m 0755 wwclient $(DESTDIR)$(DATADIR)/warewulf/overlays/wwclient/rootfs/$(WWCLIENTDIR)/wwclient
|
||||||
|
install -m 0755 wwclient.x86_64 $(DESTDIR)$(DATADIR)/warewulf/overlays/wwclient.x86_64/rootfs/$(WWCLIENTDIR)/wwclient
|
||||||
|
install -m 0755 wwclient.aarch64 $(DESTDIR)$(DATADIR)/warewulf/overlays/wwclient.aarch64/rootfs/$(WWCLIENTDIR)/wwclient
|
||||||
|
|
||||||
.PHONY: install-sos
|
.PHONY: install-sos
|
||||||
install-sos:
|
install-sos:
|
||||||
install -D -m 0644 include/sos/warewulf.py $(DESTDIR)$(SOSPLUGINS)/warewulf.py
|
install -D -m 0644 include/sos/warewulf.py $(DESTDIR)$(SOSPLUGINS)/warewulf.py
|
||||||
@@ -243,6 +256,8 @@ init:
|
|||||||
ifndef OFFLINE_BUILD
|
ifndef OFFLINE_BUILD
|
||||||
wwctl: vendor
|
wwctl: vendor
|
||||||
wwclient: vendor
|
wwclient: vendor
|
||||||
|
wwclient.x86_64: vendor
|
||||||
|
wwclient.aarch64: vendor
|
||||||
update_configuration: vendor
|
update_configuration: vendor
|
||||||
dist: vendor
|
dist: vendor
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
ifupdown
|
|
||||||
@@ -443,19 +443,11 @@ Then, ``wwctl image exec`` will work regardless of the architecture of the
|
|||||||
image. For more information about QEMU, see their `GitHub
|
image. For more information about QEMU, see their `GitHub
|
||||||
<https://github.com/multiarch/qemu-user-static>`_
|
<https://github.com/multiarch/qemu-user-static>`_
|
||||||
|
|
||||||
To use wwclient on a booted image using a different architecture, wwclient must
|
.. note::
|
||||||
be compiled for the specific architecture. This requires GOLang build tools 1.21
|
|
||||||
or newer. Below is an example for building wwclient for arm64:
|
|
||||||
|
|
||||||
.. code-block:: console
|
When provisioning cluster nodes with a different architecture than the
|
||||||
|
Warewulf server, also use the matching architecture-specific :ref:`wwclient`
|
||||||
# git clone https://github.com/warewulf/warewulf
|
overlay: e.g., wwclient.x86_64 or wwclient.aarch64.
|
||||||
# cd warewulf
|
|
||||||
# GOARCH=arm64 PREFIX=/ make wwclient
|
|
||||||
# mkdir -p /var/lib/warewulf/overlays/wwclient_arm64/rootfs/warewulf
|
|
||||||
# cp wwclient /var/lib/warewulf/overlays/wwclient_arm64/rootfs/warewulf
|
|
||||||
|
|
||||||
Then, apply the new "wwclient_arm64" system overlay to your arm64 node/profile
|
|
||||||
|
|
||||||
Read-only images
|
Read-only images
|
||||||
================
|
================
|
||||||
|
|||||||
@@ -202,6 +202,8 @@ provisioning actions:
|
|||||||
- **/warewulf/init.d/:** executed in the final root file system but before
|
- **/warewulf/init.d/:** executed in the final root file system but before
|
||||||
calling ``init``.
|
calling ``init``.
|
||||||
|
|
||||||
|
.. _wwclient:
|
||||||
|
|
||||||
wwclient
|
wwclient
|
||||||
--------
|
--------
|
||||||
|
|
||||||
@@ -209,9 +211,14 @@ All configured overlays are provisioned initially along with the node image
|
|||||||
itself; but **wwclient** periodically fetches and applies the runtime overlay to
|
itself; but **wwclient** periodically fetches and applies the runtime overlay to
|
||||||
allow configuration of some settings without a reboot.
|
allow configuration of some settings without a reboot.
|
||||||
|
|
||||||
wwclient will contat the ``ipaddr`` value from ``warewulf.conf`` by default.
|
wwclient contacts the ``ipaddr`` value from ``warewulf.conf`` by default. This
|
||||||
This can be overridden by specifying a ``WW_IPADDR`` environment variable, which
|
can be overridden by specifying a ``WW_IPADDR`` environment variable, which can
|
||||||
can be set via an overlay in ``/etc/default/wwclient``.
|
be set via an overlay in ``/etc/default/wwclient``.
|
||||||
|
|
||||||
|
The default wwclient overlay contains a ``wwclient`` executable compiled for the
|
||||||
|
same architecture as the Warewulf server. Architecture-specific wwclient.aarch64
|
||||||
|
and wwclient.x86_64 overlays are available as well. This supports using wwclient
|
||||||
|
on cluster nodes with a different architecture than the Warewulf server.
|
||||||
|
|
||||||
Network interfaces
|
Network interfaces
|
||||||
------------------
|
------------------
|
||||||
|
|||||||
@@ -210,6 +210,8 @@ getent group %{wwgroup} >/dev/null || groupadd -r %{wwgroup}
|
|||||||
%{_overlaydir}/udev.netname/rootfs/*
|
%{_overlaydir}/udev.netname/rootfs/*
|
||||||
%{_overlaydir}/wicked/rootfs/*
|
%{_overlaydir}/wicked/rootfs/*
|
||||||
%{_overlaydir}/wwclient/rootfs/*
|
%{_overlaydir}/wwclient/rootfs/*
|
||||||
|
%{_overlaydir}/wwclient.x86_64/rootfs/*
|
||||||
|
%{_overlaydir}/wwclient.aarch64/rootfs/*
|
||||||
%{_overlaydir}/wwinit/rootfs/*
|
%{_overlaydir}/wwinit/rootfs/*
|
||||||
%{_overlaydir}/localtime/rootfs/*
|
%{_overlaydir}/localtime/rootfs/*
|
||||||
%{_overlaydir}/sfdisk/rootfs/*
|
%{_overlaydir}/sfdisk/rootfs/*
|
||||||
|
|||||||
Reference in New Issue
Block a user