Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #18 from gmkurtzer/warewulf_updates_4.3
Browse files Browse the repository at this point in the history
Warewulf updates 4.3
  • Loading branch information
gmkurtzer authored Jun 15, 2022
2 parents c287167 + ebddf42 commit 70fb4f8
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 34 deletions.
27 changes: 24 additions & 3 deletions docs/enchiridion/kernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,33 @@ id: kernel
title: Kernel Management
---

## Importing a Kernel
Warewulf nodes require a Linux kernel to boot. There are a number of ways to import a kernel into Warewulf, but this document is going to focus on the easiest and most widely used manner, which is to import it from the host.
# Node Kernels
Warewulf nodes require a Linux kernel to boot. There are multiple ways to do this, but the default, and easiest way is to install the kernel you wish to use for a particular container, into the container.

If your compute nodes have any special hardware configurations or need any customizations, make and test those customizations on the control node, and when your control node kernel is built and working as you like, you can import it into Warewulf with the following command:
Warewulf will locate the kernel automatically within the container and by default use that kernel for any node configured to use that container image.

You can see what kernel is included in a container by using the `wwctl container list` command:

```bash
# wwctl container list
CONTAINER NAME NODES KERNEL VERSION
alpine 0
rocky 0 4.18.0-348.12.2.el8_5.x86_64
rocky_updated 1 4.18.0-348.23.1.el8_5.x86_64
```

Here you will notice the alpine contianer that was imported has no kernel within it, and each of the rocky containers include a kernel.

This model was introduced in Warewulf 4.3.0. Previously, Warewulf managed the kernel and the container separately, which made it hard to build and distribute containers that have custom drivers and/or configurations included (e.g. OFED, GPUs, etc.).

# Kernel Overrides
It is still possible to specify a kernel to a container if it doesn't include it's own kernel, or if you wish to override the default kernel by using the `kernel override` capability.

You can specify this option either within the `nodes.conf` directly or via the command line with the `--kerneloverride` option to `wwctl node set` or `wwctl profile set` commands.

In this case you will also need to import a kernel specifically into Warewulf for this purpose using the `wwctl kernel import` command as follows:

```bash
$ sudo wwctl kernel import $(uname -r)
4.18.0-305.3.1.el8_4.x86_64: Done
```
Expand Down
6 changes: 0 additions & 6 deletions docs/quickstart/el7.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ address (post boot) is configured to `192.168.200.100`.
## Start and enable the Warewulf service

```bash
# Create the group the warewulfd service will run as
sudo groupadd -r warewulf
# Reload system services
sudo systemctl daemon-reload
# Start and enable the warewulfd service
sudo systemctl enable --now warewulfd
```
Expand Down
41 changes: 23 additions & 18 deletions docs/quickstart/el8.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ipaddr: 192.168.200.1
netmask: 255.255.255.0
warewulf:
port: 9873
secure: true
secure: false
update interval: 60
dhcp:
enabled: true
Expand All @@ -66,12 +66,6 @@ address (post boot) is configured to `192.168.200.100`.
## Start and enable the Warewulf service

```bash
# Create the group the warewulfd service will run as
sudo groupadd -r warewulf
# Reload system services
sudo systemctl daemon-reload
# Start and enable the warewulfd service
sudo systemctl enable --now warewulfd
```
Expand All @@ -87,24 +81,25 @@ sudo wwctl configure --all
```
> note: If you just installed the system fresh and have SELinux enforcing, you may need to reboot the system at this stage to properly set the contexts of the TFTP contents. After rebooting, you might also need to run `$ sudo restorecon -Rv /var/lib/tftpboot/` if there are errors with TFTP still.

## Pull and build the VNFS container and kernel
## Pull and build the VNFS container (including the kernel)

This will pull a basic VNFS container from Docker Hub and import the default running
kernel from the controller node and set both in the "default" node profile.

```bash
sudo wwctl container import docker://warewulf/rocky:8 rocky-8 --setdefault
sudo wwctl kernel import $(uname -r) --setdefault
sudo wwctl container import docker://warewulf/rocky:8 rocky-8
```

## Set up the default node profile

The ``--setdefault`` arguments above will automatically set those entries in the default
profile, but if you wanted to set them by hand to something different, you can do the
following:
Node configurations can be set via node profiles. Each node by default is configured to
be part of the `default` node profile, so any changes you make to that profile will
affect all nodes.

The following command will set the container we just imported above to the `default` node profile:

```bash
sudo wwctl profile set -y default -K $(uname -r) -C rocky-8
sudo wwctl profile set --yes --container rocky-8 "default"
```

Next we set some default networking configurations for the first ethernet device. On
Expand All @@ -113,8 +108,13 @@ according to the HW address. Because all nodes will share the netmask and gatewa
configuration, we can set them in the default profile as follows:

```bash
sudo wwctl profile set -y default --netname default --netmask 255.255.255.0 --gateway 192.168.200.1
sudo wwctl profile list
sudo wwctl profile set --yes --netdev eth0 --netmask 255.255.255.0 --gateway 192.168.200.1 "default"
```

Once those configurations have been set, you can view the changes by listing the profiles as follows:

```bash
sudo wwctl profile list -a
```

## Add a node
Expand All @@ -130,8 +130,13 @@ Note that the full node configuration comes from both cascading profiles and nod
configurations which always supersede profile configurations.

```bash
sudo wwctl node add n0000.cluster --netname default -I 192.168.200.100 --discoverable
sudo wwctl node list -a n0000
sudo wwctl node add n0000.cluster --ipaddr 192.168.200.100 --discoverable
```

At this point you can view the basic configuration of this node by typing the following:

```bash
sudo wwctl node list -a n0000.cluster
```

## Turn on your compute node and watch it boot!
8 changes: 1 addition & 7 deletions docs/quickstart/suse15.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ipaddr: 192.168.200.1
netmask: 255.255.255.0
warewulf:
port: 9873
secure: true
secure: false
update interval: 60
dhcp:
enabled: true
Expand Down Expand Up @@ -65,12 +65,6 @@ address (post boot) is configured to `192.168.200.100`.
## Start and enable the Warewulf service

```bash
# Create the group the warewulfd service will run as
sudo groupadd -r warewulf
# Reload system services
sudo systemctl daemon-reload
# Start and enable the warewulfd service
sudo systemctl enable --now warewulfd
```
Expand Down

0 comments on commit 70fb4f8

Please sign in to comment.