Commit Graph

136 Commits

Author SHA1 Message Date
Jonathon Anderson
7c8a1a4e1b Specify init=/init when booting with Grub+dracut
- Fixes: #1573

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-03 13:56:18 +01:00
Timothy Middelkoop
b66a8679c5 Fix default nodes.conf to use the new kernel command line list format
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-30 01:44:53 -07:00
Shane Nehring
6bad4ed8d1 have dracut explicitly configure defined interfaces
Signed-off-by: Shane Nehring <snehring@iastate.edu>
2025-01-24 10:04:37 -06:00
Jonathon Anderson
45a690ca4e Rename "container" to "image"
- Updated `wwctl upgrade` to handle updates
- Maintained `.Container` and `.ContainerName` in tstruct
- Added `ContainerName()` methods to node and profile objects
- Added `--container`, `-C` aliases to wwctl commands (`<node|profile> <add|set>`)
- Added `wwctl container` alias
- Added support for `container_exit.sh` if `image_exit.sh` is not found

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-19 05:54:19 -07:00
Jonathon Anderson
bc52f3b7d7 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>
2025-01-17 10:33:37 -07:00
Jonathon Anderson
a844379bc5 Merge --kerneloverride into --kernelversion
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 10:02:28 +01:00
Jonathon Anderson
8f21d54243 Refactor kernel support
- Remove kernel imports and kmods images
- Repurpose KernelOverride as container path
- Support Kernel.Version as version prefix for kernel selection
- Compare initramfs by version

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 10:02:22 +01:00
Jonathon Anderson
cab56fbea5 Omit initrd=runtime if not loaded
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-13 22:20:26 -07:00
Xu Yang
c6ebac89da add failure downloading runtime message to imgextract part
Signed-off-by: Xu Yang <xyang@ciq.com>
2024-11-13 21:50:03 -07:00
Jonathon Anderson
7b1adf4c12 Simplified CHANGELOG and iPXE error messages
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-13 21:50:03 -07:00
xu yang
7a63e517f7 fix issue that initrd fails at downloading runtime overlay with permission denied error, when warewulf secure option in warewulf.conf is enabled
Signed-off-by: xu yang <xyang@ciq.com>
2024-11-13 21:50:03 -07:00
Jonathon Anderson
a7325b6ffa Remove WW_INTERNAL
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:08:54 -07:00
Jonathon Anderson
c25eaa8855 Move default ipmi template to default profile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-07 23:01:32 -07:00
Jonathon Anderson
a9b908e339 Remove "network" parameter from initial warewulf.conf
"network" is redundant with ipaddr and netmask.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-06 19:07:06 -07:00
Jonathon Anderson
cec95b14f0 Update default warewulfd port to match initial configuration
We've been shipping a warewulf.conf that defines the warewulfd port as
9873, and a firewalld service that uses this port as well; but the
default value in the YAML data-structure has been 9983.

This changes the default port to 9873 to match the configuration we've
been shipping, and removes the port from the initial configuration file
(to use the default value).

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-06 19:07:05 -07:00
Jonathon Anderson
94ee0a5bd9 Remove an unnecessary 3s boot from iPXE
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-01 19:07:19 -06:00
Jonathon Anderson
02b4cc1572 Remove profiles from the default profile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 15:39:59 -04:00
Jonathon Anderson
b6fa127f31 Update default profile with split overlays
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 15:39:59 -04:00
Christian Goll
9fdb9ca792 updated overlays
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30:54 -04:00
Elmar Pruesse
097fbbc82a Fix grub asset key handling
Signed-off-by: Elmar Pruesse <pruessee@njhealth.org>
2024-09-16 13:04:09 +02:00
Jonathon Anderson
e2da5b6d09 Restore use of dmidecode in dracut for assettag and uuid
This prevents exposing these values in /proc/cmdline.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-05 18:41:19 -04:00
Jonathon Anderson
e4385713e8 Port dracut boot refinement to grub
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-05 18:41:18 -04:00
Jonathon Anderson
624631a4d5 Use the wwinit uri built by iPXE during dracut
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-05 18:41:18 -04:00
Jonathon Anderson
becd0a5e32 Pass wwinit.KernelOverride explicitly
Rather than create a new wwinit.kmods boolean, pass
wwinit.KernelOverride explicitly to dracut and allow it to perform the
same logic that previously had been in iPXE.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-05 18:41:18 -04:00
Josh Burks
d62743ee11 clean up /proc/cmdline with dracut and allow dracut to boot with secure mode to fix #1261 2024-09-05 18:41:18 -04:00
Christian Goll
fbf3e3c0a8 Add a logrotate config for warewulfd.log
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-08-02 17:06:21 -06:00
Christian Goll
640a046dd9 report error if no container was defined
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-08-02 14:48:02 -06:00
Jonathon Anderson
05b951d78d Support dracut booting with GRUB
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 16:34:53 -04:00
Jonathon Anderson
53dae60e20 New, optional dracut.ipxe configuration
dracut.ipxe boots an initramfs detected in the container image. This
required a few small changes to warewulfd and the wwinit overlay to
accommodate the dracut initramfs configuring the network interface
before wwinit:

- Include .NetDevs in the ipxe configuration template, so that dracut
  can configure interfaces with the correct names.

- Configure NetworkManager to not keep the initramfs configuration, in
  stead applying the configuration found by wwinit.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 03:20:09 -04:00
Christian Goll
21150d2975 make created ssh keys configureable
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-05-01 14:27:39 -06:00
Jonathon Anderson
a5dc1de3b4 Match warewulf.conf to documentation
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2024-02-17 02:29:08 -07:00
Christian Goll
1fca0057d3 updated WW_INTERNAL to 45 for 4.5.x release
Internal version update is necessary as new structures were added,
most obviously the disk, partitions and file system structures.
Old configurations will work as expected.

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-02-16 20:12:51 -07:00
Jonathon Anderson
a1832ad8c1 Complete transfer of Warewulf from HPCng
Warewulf is now being maintained in its own GitHub organization at
github.com/warewulf

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-01-26 21:35:04 -07:00
griznog
e13cdb35ff An ipxe script to boot from local disk. 2024-01-26 09:08:16 -06:00
Jonathon Anderson
5d6ef1882d Remove whitespace damage
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-01-21 00:18:38 -07:00
Christian Goll
4379c4c18d use grub/shim from host system
Also the boot method is now configured globaly as this is
the only way to make sure that unkonwn nodes get the right
stuff

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
0c9bf78cd0 using ProvisionSend instean of GrubSend
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
a36cb23319 added shim/grub find to provision process
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
4cacd0ef75 added grub.cfg.ww
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Jonathon Anderson
038329ebce Remove ipxe binaries and configure for Rocky Linux
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-12-09 01:29:48 -07:00
Christian Goll
27563db856 added genders examples 2023-05-23 16:48:13 +02:00
Christian Goll
063c05602d Merge pull request #665 from mslacken/ContainerMnt
Container mnt
2023-02-24 15:13:12 +01:00
Jonathon Anderson
18c89d7a6e Remove static-dhcp example
The original intent of this example appears to now be included in the real /
default dhcp template included in the host overlay. If I'm understanding
correctly, the presence of this example is just a source of confusion now. (I
previously directed someone to use this example config, overwriting what's in
the default overlay, because I didn't realize that static-dhcp functionality
was just a configuration parameter away.)

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-02-07 16:11:56 -07:00
Christian Goll
f5b35f7ef8 do not copy resolv.conf, but mount it 2023-01-31 16:04:08 +01:00
Jonathon Anderson
3ad4b42896 Treat wwapi config files as built versions
The wwapi*.conf files are build from .in variants, so they should not be
tracked in the tree. Adding them to gitignore prevents them from being
added back in, and adding them to Makefile:clean cleans them up.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-12-14 00:23:50 -07:00
Jonathon Anderson
78b857a3e4 Whitespace cleanup
Removes trailing whitespace from all source files.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-12-08 18:59:56 -07:00
Jonathon Anderson
77baa76dc0 Remove unnecessary config parameter examples
warewulf.datastore is being set to a null string, which is simply
prompting it to use the default.

dhcp.template doesn't appear to be used any more, now that dhcp
configuration has moved into the host overlay.

tftp.tftproot doesn't appear to be doing anything, is simply setting to
the empty string anyway, and is otherwise compiled-in.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-08-24 04:47:56 -06:00
Ingo Meyer
ceccca1413 Fix the boot process for Legacy BIOS machines
GitHub PR #235 adds an advanced boot mechanism for UEFI machines which
causes old Legacy BIOS nodes to hit the 3 GB RAM barrier in 32 Bit iPXE
very quickly. Therefore, detect if an EFI or Legacy BIOS is loaded and
fall back to the old boot path in the second case.

This commit fixes GitHub issue #497.
2022-07-21 17:39:20 +02:00
MatthewHink
d8cd6049ac Initial cut of wwapi.
We need an API for Warewulf in order to automate around it. The initial version of the API will look a lot like wwctl. wwctl will call the API so that we do not need to maintain separate code paths. In this preview wwctl calls the API via direct function call, but we can change that to a gprc or REST call to a Warewulf server in the future.

This commit contains:
wwapid WareWulf API Daemon. A grpc server with mTLS auth.
wwapic WareWulf API Client. A grpc client with mTLS auth. It's just a sample that reads the version from the server.
wwapird WareWulf API Rest Daemon. A http REST reverse proxy to wwapid.
There are also sample insecure and secure curls to test with.

Implemented Functionality:
wwctl node add
wwctl node delete
wwctl node list
wwctl node set
wwctl node status
wwctl container build
wwctl container delete
wwctl container import
wwctl container list
wwctl container show

Some notes on the files:

    Logic that was in wwctl has moved to warewulf/internal/pkg/api. wwctl just calls the API. wwctl functionality is unchanged.
    Everything under the /google directory is copied google proto code to stand up wwapird. It's a bit strange to copy in the code, but that is currently how it's done.
    Everything in warewulf/internal/pkg/api/routes/wwapiv1 is generated code.

There are some loose ends here, such as no service installers. I just ran off the command line for development.
The Makefile could use improvement. I'm building by make clean setup proto all build wwapid wwapic wwapird ; echo $?
I copied the configs from warewulf/etc to /usr/local/etc/warewulf manually.
2022-06-24 08:39:30 -07:00
Christian Goll
664fdd3f35 finally add the contents to prometheus 2022-06-08 17:04:30 +02:00