warewulf 4

baremetal provision tool. common in hpc environment pxe boot machine, most often run stateless nodes.
warewulf 4 is very different than warewulf 3, thus a new page for this.



Ref

Good intro/overview
OHPC new stack doc

  • HPC Admin magazine article on ww4
  • warewulf doc user guide
  • google group eg:
    https://groups.google.com/a/lbl.gov/g/warewulf/c/Yx9OMqkyJKU



    basic image from container

    warewulf doc add base node
    wwctl image import docker://ghcr.io/warewulf/warewulf-rockylinux:9 rockylinux-9 --build     
    wwctl profile set default --image rockylinux-9                 
    
    wwctl node edit
    # change   image name to: rockylinux-9          
    
    # all the node config is saved to /etc/warewulf/nodes.conf
    # howerver, manual edit that, changes may not always get to the build image
    # so manual edit may need to use `wwctl node edit` on affected node for changes to be fully effective
    
    
    
    wwctl overlay build    # should auto trigger even if not invoked manually
    
    # 
    
    

    Config

    # add node
    
    wwctl node add --netdev ens19 --hwaddr  BC:24:11:61:87:6F --netmask 255.255.255.0 --ipaddr 192.168.0.40  n0000
    
    wwctl node list -a 
    
    # node build on set of profiles; 
    wwctl profile list -a
    # profiles are composed of overlays
    wwctl overlay list -a
    
    
    wwctl overlay build   # create per node imge in /var/lib/warewulf/provision/overlays/n00..
    
    
    wwctl container list -l
    
    
    # the overlay is where bunch of files need to be edited/added (contrast to  ww3 file object kind of edit)
    
    

    Overlay

    https://warewulf.org/docs/main/overlays/overlays.html#creating-and-modifying-overlays
    
    wwctl overlay list -l | grep auth
    PERM MODE   UID    GID    OVERLAY              FILE PATH                     SITE
    ---------   ---    ---    -------              ---------                     ----
    -rwx------  0      0      ssh.authorized_keys  root/                         false
    -rwx------  0      0      ssh.authorized_keys  root/.ssh/                    false
    -rwx------  0      0      ssh.authorized_keys  root/.ssh/authorized_keys.ww  false
    -rw-r--r--  43143  43143  ceph                 etc/ceph/ceph.conf            true
    -rw-r--r--  43143  43143  kubernetes           etc/postfix/main.cf.ww        true
    
    for SITE=false, overlay is from 
    /usr/share/warewulf/overlays
    eg 
    ssh.authorized_keys  root/.ssh/authorized_keys.ww   is in /usr/share/warewulf/overlays/ssh.authorized_keys/rootfs/root/.ssh/authorized_keys.ww
    	(which has content:
    	{{Include "/root/.ssh/authorized_keys"}}
    	)
    
    backup /usr/share/warewulf ?  well not if they are just template that isn't changed...
    
    for SITE=true, overlya is from /var/lib/warewulf/overlays
    
    
    
    custom ssh banner, crate an overlay called base_customize
    wwctl overlay create  base_customize
    # above create dir /var/lib/warewulf/overlays/base_customize/rootfs/
    # create file      /var/lib/warewulf/overlays/base_customize/rootfs/etc/banner
    
    # does it automatically seen by 
    wwctl overlay list -l | grep base_customize
    
    wwctl node edit n00
    # add the base_customize to "runtime overlya" a/o "system overlay"
    # runtime synced if wwclient systemd service is running.  
    
    
    
    wwctl overlay create  banner
    wwctl overlay import --parents banner /etc/ssh-banner.txt     # or maybe still put files in /etc/warewulf/files ... 
    
    
    wwctl overlay build # rebuild files/templates into the overlay # contrast to wwsh file sync
    
    
    wwctl overlay show banner /etc/ssh-banner.txt 		# show make system render the file, especially useful if it is .ww template
    wwctl overlay show wwinit /etc/issue.ww -r n0000
    
    
    # tbd...
    wwctl overlay delete issue /etc/issue
    wwctl overlay import issue /etc/issue /etc/issue.ww
    wwctl overlay show issue /etc/issue.ww --render=n1
    
    
    wwctl container build rocky8-lrc
    
    

    generate config files

    these commands create new files (mostly for systemctl to restart the service with new config that ww4 needs.
    
    wwctl configure dhcp 		# Manage and initialize DHCP
    wwctl configure hostfile 	# update hostfile on master  - ie, create/update ww4 server's /etc/hosts file.
    wwctl configure nfs # Manage and initialize NFS
    wwctl configure ssh # Manage and initialize SSH
    wwctl configure tftp # Manage and initialize TFTP
    wwctl configure warewulfd # Enable and start warewulfd  -- systemctl stop warewulfd to stop, disable ?
    
    Notes/Ref
  • Files on boot server

    ensure these files are present. UEFI may need additional config.
    
    /var/lib/tftpboot/warewulf/
    
    
    

    /var/lib/warewulf/chroot

    
    

    config troubleshooting

    
    

    tftp troubleshooting

    tftp (and dhcpd) needs to be running on the warewulf server. see general_unix.html#tftp for troubleshooting info.



    Typewriter monospaced fonts in here. This is another line.




    [Doc URL: http://tin6150.github.io/psg/warewulf.html ]
    Last Updated: 2021-07-20
    (cc) Tin Ho. See main page for copyright info.


    hoti1
    sn5050
    psg101 sn50 tin6150