Recommended changes from review of #1568

- Make Resources an `interface{}` to support arbitrary yaml
- Remove `wwctl resource` as incompatible with arbitrary yaml
- Revert changes to host overlay templates
- Remove NFS mount options from warewulf.conf
- Replace NFS support / resource prefix with "fstab" resource
- Move resources to profiles
- Migrate warewulf.conf mounts to nodes.conf with `wwctl upgrade`
- Add documentation

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-01-17 01:28:14 -07:00
parent eff1edd038
commit bc52f3b7d7
61 changed files with 344 additions and 843 deletions

View File

@@ -37,12 +37,8 @@ Warewulf (4.5.8):
export paths:
- path: /home
export options: rw,sync
mount options: defaults
mount: true
- path: /opt
export options: ro,sync,no_root_squash
mount options: defaults
mount: false
systemd name: nfs-server
container mounts:
- source: /etc/resolv.conf
@@ -267,4 +263,4 @@ Restart the ``nftables`` service:
.. code-block:: console
systemctl restart nftables
systemctl restart nftables

View File

@@ -302,3 +302,31 @@ And to unset this configuration attribute:
# wwctl node list -a n001 | grep Cluster
n001 Cluster -- --
Resources
=========
Warewulf nodes (and profiles) support generic "resources" that may hold arbitrarily complex YAML
data. This data, along with tags, may be used by both distribution and site overlays.
.. code-block:: yaml
nodeprofiles:
default:
resources:
fstab:
- spec: warewulf:/home
file: /home
vfstype: nfs
mntops: defaults
freq: 0
passno: 0
- spec: warewulf:/opt
file: /opt
vfstype: nfs
mntops: defaults,ro
freq: 0
passno: 0
Due to the arbitrary nature of generic resource data, it can only be managed with `wwctl
<node|profile> edit`.

View File

@@ -102,8 +102,21 @@ interface configuration should handle this dynamically.)
fstab
-----
The **fstab** overlay configures ``/etc/fstab`` to mount NFS shares defined in
``/etc/warewulf.conf`` and file systems created by Ignition.
The **fstab** overlay configures ``/etc/fstab`` based on the data provided in the "fstab"
resource. It also creates entries for file systems defined by Ignition.
.. code-block:: yaml
nodeprofiles:
default:
resources:
fstab:
- spec: warewulf:/home
file: /home
vfstype: nfs
- spec: warewulf:/opt
file: /opt
vfstype: nfs
ssh
---

View File

@@ -213,12 +213,8 @@ Vagrantfile
export paths:
- path: /home
export options: rw,sync
mount options: defaults
mount: true
- path: /opt
export options: ro,sync,no_root_squash
mount options: defaults
mount: false
systemd name: nfs-server
CONF

View File

@@ -88,12 +88,8 @@ address of your cluster's private network interface:
export paths:
- path: /home
export options: rw,sync
mount options: defaults
mount: true
- path: /opt
export options: ro,sync,no_root_squash
mount options: defaults
mount: false
systemd name: nfs-server
.. note::

View File

@@ -90,12 +90,8 @@ address of your cluster's private network interface.
export paths:
- path: /home
export options: rw,sync
mount options: defaults
mount: true
- path: /opt
export options: ro,sync,no_root_squash
mount options: defaults
mount: false
systemd name: nfs-server
container mounts:
- source: /etc/resolv.conf

View File

@@ -69,12 +69,8 @@ address of your cluster's private network interface:
export paths:
- path: /home
export options: rw,sync
mount options: defaults
mount: true
- path: /opt
export options: ro,sync,no_root_squash
mount options: defaults
mount: false
systemd name: nfs-server
container mounts:
- source: /etc/resolv.conf