Merge branch 'main' into tm-wwid-raspberry-pi
This commit is contained in:
4
.github/actions/prepare/action.yml
vendored
4
.github/actions/prepare/action.yml
vendored
@@ -8,6 +8,10 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Update apt
|
||||
run: sudo apt update
|
||||
shell: bash
|
||||
|
||||
- name: Install gpgme (dependency)
|
||||
run: sudo apt-get install libgpgme-dev
|
||||
shell: bash
|
||||
|
||||
5
.github/workflows/documentation.yml
vendored
5
.github/workflows/documentation.yml
vendored
@@ -2,16 +2,17 @@
|
||||
name: publish_docs
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- v4.*.x
|
||||
- 'v4.*.x'
|
||||
paths:
|
||||
- 'userdocs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- v4.*.x
|
||||
- 'v4.*.x'
|
||||
paths:
|
||||
- 'userdocs/**'
|
||||
|
||||
|
||||
273
CHANGELOG.md
273
CHANGELOG.md
@@ -16,165 +16,124 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Added
|
||||
|
||||
- ability to create bonded network interfaces
|
||||
- ipxe script to boot node from local disk.
|
||||
- Option to change the `ipmitool` escape character
|
||||
- New documentation for the hostlist syntax. #611
|
||||
- New documentation for development environment (Vagrant)
|
||||
- Ability to duplicate an image with `wwctl container copy` or the API
|
||||
- New documentation for container duplication procedure
|
||||
- Configure network device MTU in nework configuration scripts. #807
|
||||
- OpenSUSE Leap build rebased to 15.5 (15.3 is EOL)
|
||||
- New build for Rocky Linux 9
|
||||
- Add nightly release support. #969
|
||||
- Add container rename command. #583
|
||||
- Add container build flags and warn message after container sync. #509
|
||||
- Add DNS fields to network configuration overlays. #922
|
||||
- Added support for booting nodes with grub. Enable this behavior using
|
||||
warewulf.grubboot: true in warewulf.conf. For unknown nodes, grub.efi
|
||||
and shim.efi are extracted from the Warewulf host. If the booted node
|
||||
has a container these binaries are extracted from the container image.
|
||||
- Added https://github.com/Masterminds/sprig functions to templates #1030
|
||||
|
||||
### Changed
|
||||
|
||||
- Locally defined `tr` has been dropped, templates updated to use Sprig replace.
|
||||
- Updated the glossary #819
|
||||
|
||||
### Fixed
|
||||
- Make mounting of local patitions into sub-directories work
|
||||
- Make Variables.mk consistent with spec file w.r.t. WWPROVISIONDIR, e.g.
|
||||
instead of basing in `/srv`, handle it the same as chroots and overlays.
|
||||
- Enable spec file to work with Fedora
|
||||
- Fix hard CPU architecture on proto's installation in the Makefile
|
||||
- More aggressive `make clean`.
|
||||
- Replace deprecated `io.utils` functions with new `os` functions.
|
||||
- The correct header is now displayed when `-al` flags are specified to overlay
|
||||
list.
|
||||
- Added a missing `.ww` extension to the `70-ww4-netname.rules` template in the
|
||||
wwinit overlay.
|
||||
- Restrict access to `/warewulf/config` to root only. (#728, #742)
|
||||
- KERNEL VERSION column is too short. #690
|
||||
- Add support for resolving absolute path automatically. #493
|
||||
- The network device "OnBoot" parameter correctly configures the ONBOOT ifcfg
|
||||
parameter. (#644)
|
||||
- Add support for listing profile/node via comma-separated values. #739
|
||||
- Sort the node list returned entries by name.
|
||||
- 'wwctl node edit' inconsistent state with warewulfd. #691
|
||||
- Add `--parents` option to `overlay import` subcommand to create necessary
|
||||
parent folder. #608
|
||||
- Fix kernelargs are not printing properly in node list output. #828
|
||||
- Fix build configuration on Quickstart guide #847
|
||||
- Add Quickstart guide for EL9
|
||||
- Add EL9 Quickstart guide to index.rst
|
||||
- Container file gids are now updated properly during syncuser. #840
|
||||
- Fix build for API.
|
||||
- Bindd mounts for `wwctl exec` are now on the same fs
|
||||
- Fixed the ability to set MTU with wwctl #947
|
||||
- Fixed a bug where profile tags were erroneously overridden by empty node
|
||||
values. #884
|
||||
- Fixed bug where tags from profiles weren't rendered #967
|
||||
- Fixed a bug when using `wwctl container import --force` to replace an existing container
|
||||
will generate an error #474
|
||||
- Create `/etc/systemd/network/10-persistent-net-<netdev>.link` file per network device
|
||||
- Fix the issue that the same tag added in `node set` is ignored. #967
|
||||
- Change too-verbose warning message level from `Warn` to `Debug`. #1025
|
||||
- Fixed a bug where error occurs when editing node. #1024
|
||||
- Optionally detect network and netmask from CIDR IP address. #1016
|
||||
- Fix startup of wwclient on systemd hosts #1066
|
||||
- Change ownership of overlays to root:root #1086
|
||||
- Fix panic when node has no profile but network does #1094
|
||||
|
||||
- Prevent Networkmanager from trying to optain IP address via DHCP
|
||||
on unused/unmanaged network interfaces.
|
||||
- Systems with no SMBIOS (Raspberry Pi) will create a UUID from
|
||||
`/sys/firmware/devicetree/base/serial-number`
|
||||
- Fix `wwctl profile list -a` format when kernerargs are set
|
||||
|
||||
## [4.5.0] 2024-02-08
|
||||
|
||||
- Official v4.5.0 release.
|
||||
- Publish v4.5.x documentation separately from `main`. #919
|
||||
- Fix `Requires: ipxe-botimgs` for building an Enterprise Linux 7 RPM. #1126
|
||||
- Update quickstart for Enterprise Linux. #394, #401, #977
|
||||
|
||||
## [4.5.0rc2] 2024-02-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix mounting local partitions into sub-directories with Ignition. #1073
|
||||
- Fix a panic in `wwctl node set` when modifying a network device that is only defined in a profile. #1094
|
||||
|
||||
## [4.5.0rc1] 2024-02-08
|
||||
|
||||
### Added
|
||||
|
||||
- Start building packages for Rocky Linux 9. #951
|
||||
- Start building nightly GitHub releases. #969
|
||||
- Support building on Fedora. #988
|
||||
- New command `wwctl container copy` to duplicate a container image. #130
|
||||
- New command `wwctl container rename` to rename a container image. #583
|
||||
- New command `wwctl genconf` generates shell completions, initial configuration files, and documentation. #721
|
||||
- New flag `wwctl container syncuser --build` automatically (re)builds a container image after syncuser. #509
|
||||
- New flag `wwctl overlay import --parents` automatically creates intermediate parent directories. #481, #608
|
||||
- New flag `wwctl <node|profile> list --fullall` shows all attributes, including those which do not have a set value. #786
|
||||
- New option `wwctl <node|profile> set --ipmiescapechar` changes the `ipmitool` escape character. #999
|
||||
- New option `wwclient --warewulfconf` specifies the location of `warewulf.conf`.
|
||||
- New configuration option `warewulf.conf:paths` to override compiled-in paths. #721, #960, #1037
|
||||
- Support configuring full paths to iPXE binaries in `warewulf.conf:tftp:ipxe`. #784
|
||||
- Use `DNS` network tags to configure DNS resolution in network configuration overlays. #922
|
||||
- Support a command-separated list of nodes or profiles in `wwctl <node|profile> list`. #739
|
||||
- Support specifying `warewulf.conf:ipaddr` in CIDR format, optionally inferring netmask and network. #1016
|
||||
- Support bonded network interfaces with NetworkManager using new network device types `bond` and `bond-slave`. #1071
|
||||
- Support tab completion for overlay files in `wwctl overlay`. #813
|
||||
- New `localdisk.ipxe` script to boot from local disk. #1058
|
||||
- New example template to create genders database for use with clush, pdsh, and others. #825
|
||||
- Document the "hostlist" syntax used by `wwctl`. #611
|
||||
- Document using Vagrant as a development environment. #855
|
||||
- Document quickstart for Enterprise Linux 9. #849
|
||||
- Document configuring nodes with multiple networks. #1043
|
||||
- (preview) Added support for initializing file systems, partitions and disks with Ignition. #786
|
||||
- (preview) Added support for dnsmasq as a tftp and dhcp provider. #727, #1041
|
||||
- (preview) Support booting nodes with GNU GRUB as an alternative to iPXE. #859
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix configuration of network device MTU in network configuration overlays. #807
|
||||
- Separate provisioned overlays from overlay sources. #972
|
||||
- Display the correct header for `wwctl overlay list --all --long`. #485
|
||||
- Add a missing `.ww` extension to the `70-ww4-netname.rules` template in the wwinit overlay. #724
|
||||
- Restrict access to `/warewulf/config` to root only. #728
|
||||
- Prevent column overflow in `wwctl <subcommand> list` with dynamic tabular output. #690
|
||||
- Support relative path to a container image archive in `wwctl container import`. #493
|
||||
- Correctly configure `ONBOOT` in `wwinit:etc/sysconfig/network-scripts/ifcfg.ww`. #644
|
||||
- Fix multiple bugs in `wwctl node edit`. #691, #902, #1024
|
||||
- Fix formatting of kernel arguments in `wwctl <node|profile> list`. #828
|
||||
- Properly update container file GIDs during syncuser. #840
|
||||
- Fix the ability to build the Warewulf API with `make`. #854
|
||||
- Fix the ability to set MTU with `wwctl`. #947
|
||||
- Fix multiple bugs in the handling of node and profile tags. #884, #967
|
||||
- Fix an error when using `wwctl container import --force` to replace an existing container. #474
|
||||
- Fix configuration of network device names. #926
|
||||
- Fix a bug that prevented `wwclient` from starting on systemd hosts. #1066
|
||||
- Set default ownership of built-in overlay files to `root:root`. #1078
|
||||
- Fix a SIGSEGV error when building Warewulf on a host without network access. #907
|
||||
- Use `sysrq-trigger` to reboot during wwinit, as `reboot` may require systemd, which is not yet running. #871
|
||||
- Only write IPMI configuration if `ipmiwrite` is explicitly set to true. #823
|
||||
- Don't show an error during `wwctl container list` if images are missing. #933
|
||||
- Fix a bug preventing containers with symlinked `/bin/sh` from being imported. #797
|
||||
- Fix a bug that caused syncuser to panic if `/etc/passwd` was malformed. #527
|
||||
- Fix inclusion of kernel modules for imported kernels. #836
|
||||
- Fix a bug that caused `wwctl overlay show` to write to stderr. #1000
|
||||
- Correct "shebang" lines in `wwinit:warewulf/init.d` scripts. #821
|
||||
|
||||
### Changed
|
||||
|
||||
- The primary hostname and warewulf server fqdn are now the canonical name in
|
||||
`/etc/hosts`
|
||||
- Refactored `profile add` command to make it alike `node add`. #658 #659
|
||||
- The ifcfg ONBOOT parameter is no longer statically `true`, so unconfigured
|
||||
interfaces may not be enabled by default. (#644)
|
||||
- Write log messages to stderr rather than stdout. #768
|
||||
- new subcommand `wwctl genconf` is available with following subcommands:
|
||||
* `completions` which will create the files used for bash-completion. Also
|
||||
fish an zsh completions can be generated
|
||||
* `defaults` which will generate a valid `defaults.conf`
|
||||
* `man` which will generate the man pages in the specified directory
|
||||
* `reference` which will generate a reference documentation for the wwctl commands
|
||||
* `warwulfconf print` which will print the used `warewulf.conf`. If there is no valid
|
||||
`warewulf.conf` a valid configuration is provided, prefilled with default values
|
||||
and an IP configuration derived from the network configuration of the host
|
||||
- Added support for file systems, partitions and disks. Values for these objects can
|
||||
be set with `wwctl profile/node set/add`. The format of this objects is inspired by
|
||||
butane/ignition, but where butane/ignition uses lists for holding disks, partitions
|
||||
and file systems, warewulf uses maps instead. For disks the map key is the underlying
|
||||
block device, for partitions its the partition label and for file systems its the path
|
||||
to the partitions (e.g. `/dev/disk/by-partlabel/scratch`).
|
||||
Not all available options of butane/ignition are exposed to the commandline, but are
|
||||
available via `wwctl node/profile edit`.
|
||||
- Rebase OpenSUSE Leap build to 15.5. #951
|
||||
- Update default `Makefile` provision directory to match RPM specfile. #972
|
||||
- Replace deprecated `io.utils` functions with new `os` functions. #883
|
||||
- Sort node and profiles by name in `wwctl <node|profile> list`. #816
|
||||
- Use the mountpoint file system for `wwctl exec` bind mounts. #897
|
||||
- Reduce a warning message during `overlay build` from `Warn` to `Debug`. #1025
|
||||
- Use the primary interface hostname and the Warewulf server FQDN as the canonical name in `/etc/hosts`. #693
|
||||
- Refactor `wwctl profile add` to behave more like `wwctl node add`. #658 #659
|
||||
- Write `wwctl` error messages to stderr rather than stdout. #758
|
||||
- `wwctl` now validates IP and MAC address format.
|
||||
- Refactor `Makefile` for clarity and reliability. #890
|
||||
- Move primary network interface definition to `PrimaryNetDev` on the node. #682
|
||||
- `wwctl <node|profile> list --all` now only shows attributes that have a set value. #786
|
||||
- Name system and runtime overlay images as `__SYSTEM__` and `__RUNTIME__` by default. #852, #876, #896
|
||||
- Always prefer a node's primary network interface during node discovery. #775
|
||||
- Stop bundling iPXE with Warewulf and use iPXE from the host distribution. #784
|
||||
- Update and simplify the iPXE build script, now at `scripts/build-ipxe.sh`. #1026
|
||||
- Merge overlays from multiple profiles on a single node, and exclude overlays with a `~` prefix. #885
|
||||
- Move `hostlist` package into `internal` directory alongside other Warewulf packages. #804
|
||||
- Move built-in overlay files to a transparent `rootfs` directory. #1086
|
||||
- Update quickstart guides. #847, #848
|
||||
|
||||
### Changed
|
||||
## [4.4.1]
|
||||
|
||||
- The primary hostname and warewulf server fqdn are now the canonical name in
|
||||
`/etc/hosts`
|
||||
- Refactored `profile add` command to make it alike `node add`. #658 #659
|
||||
- The ifcfg ONBOOT parameter is no longer statically `true`, so unconfigured
|
||||
interfaces may not be enabled by default. (#644)
|
||||
- Write log messages to stderr rather than stdout. #768
|
||||
- All paths can now be configured in `warewulf.conf`, check the paths section of of
|
||||
`wwctl --emptyconf genconfig warewulfconf print` for the available paths.
|
||||
- Added experimental dnsmasq support.
|
||||
- fix SIGSEV when build host has no network #907
|
||||
- Check for formal correct IP and MAC addresses for command line options and
|
||||
when reading in the configurations
|
||||
- Added template to create genders database
|
||||
- Write log messages to stderr rather than stdout. #768
|
||||
- Updates to Makefile for clarity, notably removing genconfig and replacing
|
||||
test-it with test. #890
|
||||
- realy reboot also without systemd
|
||||
- Specify primary network device per-node rather than per-netdev
|
||||
- refactored output `wwctl node/profile list` so that `-a` will only show all the
|
||||
set values and `-A` will show all fields included the ones without a set value
|
||||
- Added the template function `{{ createIgnitionJson }}` which will create a json object
|
||||
compatible with ignition.
|
||||
- Container images need ignition and sgdisk installed in order to the disk management.
|
||||
- Added boootup services based on ignition which will manage the disks, partitions and file
|
||||
systems. The services are systemd services as sgdisk needs systemd in order to work
|
||||
correctly. All service use the existence of `/warewulf/ignition.json` as perquisite so
|
||||
that they can be place in the `wwinit` overlay and will only become active if disk management
|
||||
is configured for this node. The service `ignition-disks-ww4.service` will partition and
|
||||
format and create the file systems on the disks. For every a file system a systemd mount unit
|
||||
file is create and will executed after the `ignition-disks-ww4.service` has finished.
|
||||
Entries in `/etc/fstab` for every file system are created with the `noauto` option.
|
||||
- wwclient has now a commandline switch for the location of warewulf.conf
|
||||
- `wwctl overlay edit` uses a temporary file and checks mtime.
|
||||
- Changed the bash completions for the `wwctl overlay` commands so that the files of the
|
||||
overlays are expanded
|
||||
- Node overlays are now named based on their overlay "context" (i.e., "system"
|
||||
or "runtime") rather than a concatenated list of individual overlays. This
|
||||
removes a limit on the number of overlays that could be included in a node or
|
||||
profile. #852, #876, #883, #896, #903
|
||||
- During node discovery, prefer the primary network interface, if defined. #775
|
||||
- added general test framework which creates temporary directories on the fly
|
||||
- only write IPMI if write is true
|
||||
- Don't show an error if image files for containers can't be found. #933
|
||||
- Make configured paths available in overlays as `.Path` #960
|
||||
- Introduced IPXESOURCE environment variable which allows to specify the path to iPXE
|
||||
binaries not provided by warewulf
|
||||
- use distrubtion ipxe binaries in the rpm
|
||||
- Allow absolute iPXE paths in warewulf.conf
|
||||
- Support importing containers with symlinked `/bin/sh` #797
|
||||
- Don't panic on malformed passwd #527
|
||||
- Update iPXE building script
|
||||
- Send Info, Recv, Send, and Out messages to stdout; and others to stderr
|
||||
- grub in combination can now be set as boot method with `warewulf.grubboot: true` in
|
||||
`warewulf.conf`. For unknown nodes `grub.efi` and `shim.efi` will be extracted from
|
||||
the host running warewulf. If node has container it will get these binaries from the
|
||||
container image.
|
||||
- overlays from different profiles for one node are now merged, overlays can be
|
||||
excluded with ~ prefix and in listings are listed as !{excluded_profile} #885
|
||||
- modules are now correctly included
|
||||
- move hostlist into internal alongside other warewulf code #804
|
||||
- uniform shebang usage in scripts of init.d folder #821
|
||||
- Check if commas are allowes in node/profile set
|
||||
- Removed paths.tftpdir and paths.datadir
|
||||
- Updated WW_INTERNAL to 45 for upcoming 4.5.x release
|
||||
- Added documentation about of how to configure warewulf with
|
||||
multiple networks
|
||||
- Added installation instructions for using dnsmasq
|
||||
- Move built-in overlays to a rootfs directory #1086
|
||||
### Fixed
|
||||
|
||||
## [4.4.0] 2023-01-18
|
||||
|
||||
@@ -312,7 +271,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Minor typographical fixes. #528, #519
|
||||
|
||||
## [4.3.0] 2022-06-25
|
||||
|
||||
### Added
|
||||
|
||||
- All configurations files for the host (/etc/exports, /etc/dhcpd.conf, /etc/hosts) are now
|
||||
populated from the (OVERLAYDIR/host/etc/{exports|dhcpd|hosts}.ww . Also other configuration
|
||||
files like prometheus.yml.ww or slurm.conf.ww which depend on the cluster nodes can be
|
||||
@@ -335,7 +296,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- uids and gids of a container can now get synced at import time, so that at least users with the
|
||||
same name have the same uid. This is not necessarily needed for warewulf, but services like
|
||||
munge.
|
||||
|
||||
### Changed
|
||||
|
||||
- Provision interface is not tied to 'eth0' any more. The provision interface must be have the
|
||||
'primary' flag now. The file `nodes.conf' must be changed accordingly.
|
||||
- the provisioning network is now called primary and not default
|
||||
@@ -346,9 +309,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- host overlays can globaly disbaled, but are enabled per default
|
||||
- `wwctl overlay build -H` will only build the overlays which are assigned to the nodes
|
||||
|
||||
|
||||
## [4.1.0] - 2021-07-29
|
||||
|
||||
### Added
|
||||
|
||||
- Support for ARM nodes
|
||||
- firewalld service file for warewulfd
|
||||
- `-y` option to skip "Are you sure" queries
|
||||
@@ -361,6 +325,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Systemd service file
|
||||
|
||||
### Changed
|
||||
|
||||
- `wwctl node list` output beautification
|
||||
- Log timestamps are more precise
|
||||
- PID file and log files are now in `/var/run` and `/var/log`, respectively
|
||||
@@ -373,10 +338,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Only open `/etc/hosts` when writing
|
||||
|
||||
### Removed
|
||||
|
||||
- `wwctl configure` `--persist` flags have been removed. `configure` commands persist changes by default unless `--show` is used
|
||||
- In-repository documentation: has been moved to it's own repository
|
||||
|
||||
### Fixed
|
||||
|
||||
- Importing containers from directory
|
||||
- Debug log verbosity option takes precedence over verbose option
|
||||
- `wwctl node list -n` output is formatted corectly
|
||||
|
||||
@@ -32,3 +32,4 @@
|
||||
* Andreas Skau <andreas@scheen.no> @buzh
|
||||
* Dietmar Rieder <dietmar.rieder@i-med.ac.at>
|
||||
* Andreas Henkel <henkel@uni-mainz.de>
|
||||
* Timothy Middelkoop <tmiddelkoop@internet2.edu>
|
||||
|
||||
19
RELEASE.md
Normal file
19
RELEASE.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Release procedure
|
||||
|
||||
1. Create a tag for the release of the format v4.MINOR.PATCH,
|
||||
following the format specified in <MAINTAINING.md>.
|
||||
2. Verify that the associated release action has concluded.
|
||||
3. Verify that the expected artifacts were built and successfully
|
||||
attached to the matching release. This includes the source tarball
|
||||
and RPMs for Suse and Rocky Linux.
|
||||
4. Update the release notes for the release, expanding on the relevant
|
||||
contents from <CHANGELOG.md>.
|
||||
5. Confirm the correct values for the pre-release and latest release
|
||||
flags.
|
||||
6. Publish the release.
|
||||
7. Announce the release as a [post][1] to warewulf.org/news, linking
|
||||
to the GitHub release.
|
||||
8. Announce the release on the Warewulf Slack, linking to the
|
||||
warewulf.org/news post.
|
||||
|
||||
[1]: https://github.com/warewulf/warewulf.org/tree/main/src/posts
|
||||
11
go.mod
11
go.mod
@@ -3,6 +3,7 @@ module github.com/warewulf/warewulf
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/Masterminds/sprig/v3 v3.2.3
|
||||
github.com/containers/image/v5 v5.7.0
|
||||
github.com/containers/storage v1.30.0
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e
|
||||
@@ -32,6 +33,8 @@ require (
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v0.3.1 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.2.0 // indirect
|
||||
github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3 // indirect
|
||||
github.com/VividCortex/ewma v1.1.1 // indirect
|
||||
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
|
||||
@@ -59,6 +62,8 @@ require (
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/snappy v0.0.3 // indirect
|
||||
github.com/gorilla/mux v1.7.4 // indirect
|
||||
github.com/huandu/xstrings v1.3.3 // indirect
|
||||
github.com/imdario/mergo v0.3.11 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.1 // indirect
|
||||
github.com/klauspost/compress v1.12.1 // indirect
|
||||
github.com/klauspost/pgzip v1.2.5 // indirect
|
||||
@@ -67,6 +72,8 @@ require (
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/miekg/pkcs11 v1.0.3 // indirect
|
||||
github.com/mitchellh/copystructure v1.0.0 // indirect
|
||||
github.com/mitchellh/reflectwalk v1.0.0 // indirect
|
||||
github.com/moby/sys/mountinfo v0.4.1 // indirect
|
||||
github.com/mtrmac/gpgme v0.1.2 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
@@ -80,7 +87,9 @@ require (
|
||||
github.com/prometheus/procfs v0.6.0 // indirect
|
||||
github.com/rootless-containers/proto v0.1.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/shopspring/decimal v1.2.0 // indirect
|
||||
github.com/sirupsen/logrus v1.8.1 // indirect
|
||||
github.com/spf13/cast v1.3.1 // indirect
|
||||
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace // indirect
|
||||
github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 // indirect
|
||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
|
||||
@@ -91,7 +100,7 @@ require (
|
||||
github.com/vincent-petithory/dataurl v1.0.0 // indirect
|
||||
go.etcd.io/bbolt v1.3.5 // indirect
|
||||
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 // indirect
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa // indirect
|
||||
golang.org/x/crypto v0.3.0 // indirect
|
||||
golang.org/x/net v0.7.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
|
||||
19
go.sum
19
go.sum
@@ -410,6 +410,12 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
|
||||
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
|
||||
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
|
||||
github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g=
|
||||
github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
|
||||
github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA=
|
||||
github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM=
|
||||
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
|
||||
@@ -831,6 +837,8 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4=
|
||||
github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
|
||||
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
@@ -919,8 +927,12 @@ github.com/miekg/pkcs11 v1.0.3 h1:iMwmD7I5225wv84WxIG/bmxz9AXjWvTWIbM/TYHvWtw=
|
||||
github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
|
||||
github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
|
||||
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
|
||||
github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
|
||||
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
|
||||
github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
|
||||
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o=
|
||||
github.com/moby/sys/mountinfo v0.3.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
|
||||
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
|
||||
@@ -1050,6 +1062,8 @@ github.com/sassoftware/go-rpmutils v0.2.0/go.mod h1:TJJQYtLe/BeEmEjelI3b7xNZjzAu
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
|
||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
@@ -1072,6 +1086,8 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd
|
||||
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
|
||||
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
|
||||
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
|
||||
github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
|
||||
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
|
||||
@@ -1202,8 +1218,9 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh
|
||||
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa h1:idItI2DDfCokpg0N51B2VtiLdJ4vAuXC9fnCb2gACo4=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A=
|
||||
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
|
||||
@@ -118,15 +118,26 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
||||
ExpectContinueTimeout: 1 * time.Second,
|
||||
},
|
||||
}
|
||||
smbiosDump, err := smbios.New()
|
||||
if err != nil {
|
||||
wwlog.Error("Could not get SMBIOS info: %s", err)
|
||||
os.Exit(1)
|
||||
var localUUID uuid.UUID
|
||||
var tag string
|
||||
smbiosDump, smbiosErr := smbios.New()
|
||||
if smbiosErr == nil {
|
||||
sysinfoDump := smbiosDump.SystemInformation()
|
||||
localUUID, _ = sysinfoDump.UUID()
|
||||
x := smbiosDump.SystemEnclosure()
|
||||
tag = strings.ReplaceAll(x.AssetTagNumber(), " ", "_")
|
||||
} else {
|
||||
// Raspberry Pi serial and DUID locations
|
||||
// /sys/firmware/devicetree/base/serial-number
|
||||
// /sys/firmware/devicetree/base/chosen/rpi-duid
|
||||
piSerial, err := os.ReadFile("/sys/firmware/devicetree/base/serial-number")
|
||||
if err != nil {
|
||||
wwlog.Error("Could not get SMBIOS info: %s", smbiosErr)
|
||||
os.Exit(1)
|
||||
}
|
||||
localUUID = uuid.NewSHA1(uuid.NameSpaceURL, []byte("http://raspberrypi.com/serial-number/"+string(piSerial)))
|
||||
tag = "Unknown"
|
||||
}
|
||||
sysinfoDump := smbiosDump.SystemInformation()
|
||||
localUUID, _ := sysinfoDump.UUID()
|
||||
x := smbiosDump.SystemEnclosure()
|
||||
tag := strings.ReplaceAll(x.AssetTagNumber(), " ", "_")
|
||||
|
||||
cmdline, err := os.ReadFile("/proc/cmdline")
|
||||
if err != nil {
|
||||
|
||||
@@ -26,9 +26,9 @@ func CobraRunE(vars *variables) func(cmd *cobra.Command, args []string) (err err
|
||||
}
|
||||
|
||||
if len(profileInfo.Output) > 0 {
|
||||
ph := helper.NewPrintHelper(strings.Split(profileInfo.Output[0], "="))
|
||||
ph := helper.NewPrintHelper(strings.Split(profileInfo.Output[0], ":=:"))
|
||||
for _, val := range profileInfo.Output[1:] {
|
||||
ph.Append(strings.Split(val, "="))
|
||||
ph.Append(strings.Split(val, ":=:"))
|
||||
}
|
||||
ph.Render()
|
||||
}
|
||||
|
||||
@@ -32,20 +32,20 @@ func ProfileList(ShowOpt *wwapiv1.GetProfileList) (profileList wwapiv1.ProfileLi
|
||||
if ShowOpt.ShowAll || ShowOpt.ShowFullAll {
|
||||
for _, p := range profiles {
|
||||
profileList.Output = append(profileList.Output,
|
||||
fmt.Sprintf("%s=%s=%s=%s", "PROFILE", "FIELD", "PROFILE", "VALUE"))
|
||||
fmt.Sprintf("%s:=:%s:=:%s", "PROFILE", "FIELD", "VALUE"))
|
||||
fields := p.GetFields(ShowOpt.ShowFullAll)
|
||||
for _, f := range fields {
|
||||
profileList.Output = append(profileList.Output,
|
||||
fmt.Sprintf("%s=%s=%s=%s", p.Id.Print(), f.Field, f.Source, f.Value))
|
||||
fmt.Sprintf("%s:=:%s:=:%s", p.Id.Print(), f.Field, f.Value))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
profileList.Output = append(profileList.Output,
|
||||
fmt.Sprintf("%s=%s", "PROFILE NAME", "COMMENT/DESCRIPTION"))
|
||||
fmt.Sprintf("%s:=:%s", "PROFILE NAME", "COMMENT/DESCRIPTION"))
|
||||
|
||||
for _, profile := range profiles {
|
||||
profileList.Output = append(profileList.Output,
|
||||
fmt.Sprintf("%s=%s", profile.Id.Print(), profile.Comment.Print()))
|
||||
fmt.Sprintf("%s:=:%s", profile.Id.Print(), profile.Comment.Print()))
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -13,6 +13,8 @@ import (
|
||||
"syscall"
|
||||
"text/template"
|
||||
|
||||
"github.com/Masterminds/sprig/v3"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/warewulf/warewulf/internal/pkg/node"
|
||||
"github.com/warewulf/warewulf/internal/pkg/util"
|
||||
@@ -350,8 +352,9 @@ func RenderTemplateFile(fileName string, data TemplateStruct) (
|
||||
err error) {
|
||||
backupFile = true
|
||||
writeFile = true
|
||||
tmpl, err := template.New(path.Base(fileName)).Option("missingkey=default").Funcs(template.FuncMap{
|
||||
// TODO: Fix for missingkey=zero
|
||||
|
||||
// Build our FuncMap
|
||||
funcMap := template.FuncMap{
|
||||
"Include": templateFileInclude,
|
||||
"IncludeFrom": templateContainerFileInclude,
|
||||
"IncludeBlock": templateFileBlock,
|
||||
@@ -377,21 +380,20 @@ func RenderTemplateFile(fileName string, data TemplateStruct) (
|
||||
backupFile = false
|
||||
return ""
|
||||
},
|
||||
"split": func(s string, d string) []string {
|
||||
return strings.Split(s, d)
|
||||
},
|
||||
"tr": func(source, old, new string) string {
|
||||
return strings.Replace(source, old, new, -1)
|
||||
},
|
||||
"replace": func(source, old, new string) string {
|
||||
return strings.Replace(source, old, new, -1)
|
||||
},
|
||||
// }).ParseGlob(path.Join(OverlayDir, destFile+".ww*"))
|
||||
}).ParseGlob(fileName)
|
||||
}
|
||||
|
||||
// Merge sprig.FuncMap with our FuncMap
|
||||
for key, value := range sprig.TxtFuncMap() {
|
||||
funcMap[key] = value
|
||||
}
|
||||
|
||||
// Create the template with the merged FuncMap
|
||||
tmpl, err := template.New(path.Base(fileName)).Option("missingkey=default").Funcs(funcMap).ParseGlob(fileName)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "could not parse template "+fileName)
|
||||
return
|
||||
}
|
||||
|
||||
err = tmpl.Execute(&buffer, data)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "could not execute template")
|
||||
|
||||
@@ -6,10 +6,12 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/Masterminds/sprig/v3"
|
||||
warewulfconf "github.com/warewulf/warewulf/internal/pkg/config"
|
||||
"github.com/warewulf/warewulf/internal/pkg/container"
|
||||
"github.com/warewulf/warewulf/internal/pkg/kernel"
|
||||
@@ -226,7 +228,11 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
tmpl, err := template.ParseFiles(stage_file)
|
||||
// Create a template with the Sprig functions.
|
||||
tmpl := template.New(filepath.Base(stage_file)).Funcs(sprig.TxtFuncMap())
|
||||
|
||||
// Parse the template.
|
||||
parsedTmpl, err := tmpl.ParseFiles(stage_file)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
wwlog.ErrorExc(err, "")
|
||||
@@ -236,7 +242,7 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) {
|
||||
// template engine writes file to buffer in case rendering fails
|
||||
var buf bytes.Buffer
|
||||
|
||||
err = tmpl.Execute(&buf, tmpl_data)
|
||||
err = parsedTmpl.Execute(&buf, tmpl_data)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
wwlog.ErrorExc(err, "")
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{{- $host := .BuildHost }}
|
||||
{{- $time := .BuildTime }}
|
||||
{{- $source := .BuildSource }}
|
||||
{{- $filename := print "warewulf-unmanaged.conf" }}
|
||||
{{- file $filename }}
|
||||
# This file is autogenerated by warewulf
|
||||
# Host: {{ $host }}
|
||||
# Time: {{ $time }}
|
||||
# Source: {{ $source }}
|
||||
[main]
|
||||
plugins=keyfile
|
||||
|
||||
[keyfile]
|
||||
unmanaged-devices={{ range $connection_id, $netdev := .NetDevs }}except:interface-name:{{- $netdev.Device -}},{{ end }}
|
||||
@@ -14,8 +14,8 @@ interface-name={{ $netdev.Device }}
|
||||
{{ if $netdev.Type -}}
|
||||
{{ if eq $netdev.Type "bond-slave" -}}
|
||||
slave-type=bond
|
||||
{{- $conn := split $connection_id "_" }}
|
||||
{{- $master := index $conn 0 }}
|
||||
{{- $conn := split "_" $connection_id }}
|
||||
{{- $master := $conn._0 }}
|
||||
master={{ $master }}
|
||||
type=ethernet
|
||||
{{ else }}
|
||||
|
||||
@@ -11,15 +11,15 @@ Requisite=ignition-ww4-disks.service
|
||||
# Get the mounts
|
||||
{{- range $fsdevice,$fs := .FileSystems }}
|
||||
{{- $prefix := $fsdevice }}
|
||||
{{- $prefix = tr $fsdevice "-" "\\x2d" }}
|
||||
{{- $prefix = tr $prefix "/" "-" }}
|
||||
{{- $prefix = replace "-" "\\x2d" $fsdevice }}
|
||||
{{- $prefix = replace "/" "-" $prefix }}
|
||||
{{- $prefix = slice $prefix 1 }}{{ $suffix := "mount" }}
|
||||
{{- if eq $fs.Format "swap"}}
|
||||
{{- $prefix = tr $fsdevice "/dev/disk/by-partlabel/" "dev-disk-by\\x2dpartlabel-"}}{{ $suffix = "swap"}}
|
||||
{{- $prefix = replace "/dev/disk/by-partlabel/" "dev-disk-by\\x2dpartlabel-" $fsdevice }}{{ $suffix = "swap"}}
|
||||
{{- else }}
|
||||
{{- if ne $fs.Path "" }}
|
||||
{{- $prefix = tr $fs.Path "-" "\\x2d" }}
|
||||
{{- $prefix = tr $prefix "/" "-" }}
|
||||
{{- $prefix = replace "-" "\\x2d" $fs.Path }}
|
||||
{{- $prefix = replace "/" "-" $prefix }}
|
||||
{{- $prefix = slice $prefix 1 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
{{- $time := .BuildTime }}
|
||||
{{- $source := .BuildSource }}
|
||||
{{- range $fsdevice,$fs := .FileSystems }}
|
||||
{{- $prefix := tr $fs.Path "-" "\\x2d" }}
|
||||
{{- $prefix = tr $prefix "/" "-" }}
|
||||
{{- $prefix := replace "-" "\\x2d" $fs.Path }}
|
||||
{{- $prefix = replace "/" "-" $prefix }}
|
||||
{{- $prefix = slice $prefix 1 }}
|
||||
{{ $suffix := "mount"}}
|
||||
{{- if $fs.Label }}{{ $prefix = $fs.Label }}{{ end }}
|
||||
{{- if eq $fs.Format "swap"}}{{ $prefix = tr $fsdevice "/dev/disk/by-partlabel/" "dev-disk-by\\x2dpartlabel-"}}{{ $suffix = "swap"}}{{ end }}
|
||||
{{- if eq $fs.Format "swap" }}{{ $prefix = replace "/dev/disk/by-partlabel/" "dev-disk-by\\x2dpartlabel-" $fsdevice }}{{ $suffix = "swap" }}{{ end }}
|
||||
{{- $filename := print $prefix "." $suffix }}
|
||||
{{- file $filename }}
|
||||
# This file is autogenerated by warewulf
|
||||
|
||||
@@ -3,30 +3,58 @@ Glossary
|
||||
========
|
||||
|
||||
Container
|
||||
Containers are used by Warewulf as the template for the VNFS
|
||||
image. Warewulf containers can be any type of OCI or Singularity
|
||||
standard image formats but maintained on disk as an "OCI
|
||||
bundle". Warewulf integrates with Docker, Docker Hub, any OCI
|
||||
registery, Singularity, standard chroots, etc.
|
||||
Warewulf containers are the node images that it manages and provisions.
|
||||
The use of the term "container" alludes to Warewulf's support for importing OCI containers, OCI container archives, and Apptainer sandboxes to initialize its node images.
|
||||
|
||||
Warewulf containers are maintained as an uncompressed "virtual node file system" or VNFS, (sometimes also referred to as a "chroot").
|
||||
These containers are then built as images which may then be used to provision a node.
|
||||
|
||||
It is important to note, however, that Warewulf does not provision virtualized or nested "containers" in the common sense;
|
||||
Warewulf nodes run a decompressed image on "bare metal" loaded directly into system memory.
|
||||
|
||||
Controller
|
||||
The controller node(s) are the resources responsible for
|
||||
management, control, and administration of the
|
||||
cluster. Historically these systems have been called "master",
|
||||
"head", or "administrative" nodes, but we feel the term
|
||||
"controller" is more appropriate and descriptive of the role of
|
||||
this system.
|
||||
The Warewulf controller runs the Warewulf daemon (``warewulfd``) and is responsible for the management, control, and administration of the cluster.
|
||||
This system may also sometimes be referred to as the "master," "head," or "admin" node.
|
||||
|
||||
Initramfs
|
||||
A typical Warewulf controller also runs a DHCP service and a TFTP service, and often an NFS service;
|
||||
though these services may be managed separately and on separate servers.
|
||||
|
||||
Kernel
|
||||
In addition to a container, Warewulf also requires a kernel (typically a Linux kernel) in order to provision a node.
|
||||
|
||||
Overlays
|
||||
Kernels may be imported independently into Warewulf, either from the controller or from a container;
|
||||
however, recent versions of Warewulf (after v4.3.0) support automatically provisioning with a kernel detected and extracted from the container itself.
|
||||
In most cases, kernels may be installed in the container using normal system packages, and no special consideration is necessary.
|
||||
|
||||
Virtual Node File System (VNFS)
|
||||
Node
|
||||
Warewulf nodes are the systems that are being provisioned by Warewulf.
|
||||
The roles of these systems could be "compute", "storage", "GPU", "IO", etc.
|
||||
|
||||
Workers
|
||||
Worker nodes are the systems that are being provisioned by
|
||||
Warewulf. The roles of these systems could be "compute",
|
||||
"storage", "GPU", "IO", etc. which would typically be used as a
|
||||
prefix, for example: "**compute worker node**"
|
||||
nodes.conf
|
||||
One of two primary Warewulf configuration files, ``nodes.conf`` is a YAML document which records all configuration parameters for Warewulf's nodes and profiles.
|
||||
It does not contain the containers or overlays, but refers to them by name.
|
||||
|
||||
Overlay
|
||||
Warewulf overlays provide customization for the provisioned container image.
|
||||
Overlays may be configured on nodes or profiles, as either **system** or **runtime** overlays.
|
||||
|
||||
**System overlays** are applied only once, when a node is first provisioned.
|
||||
|
||||
**Runtime overlays** are applied when a node is first provisioned and periodically during the runtime of the node. (The default period is 1 minute.)
|
||||
|
||||
Profile
|
||||
Warewulf profiles are abstract nodes that carry the same configuration attributes but do not provision any specific node.
|
||||
Warewulf nodes may then refer to one or more such profiles for their configuration.
|
||||
In this way, profiles provide a simple mechanism for applying configuration to a group of nodes,
|
||||
and this configuration may be mixed with configuration from other profiles.
|
||||
|
||||
wwctl
|
||||
The main administrative interface for Warewulf is the ``wwctl`` command, which provides commands to manage nodes, profiles, containers, overlays, kernels, and more.
|
||||
|
||||
wwinit
|
||||
Warewulf performs some setup during the provisioning process before control is passed to the provisioned operating system.
|
||||
This process is referred to as "wwinit," and is implemented and configured by a script and overlay of the same name.
|
||||
|
||||
wwclient
|
||||
Warewulf adds a ``wwclient`` daemon to provisioned nodes.
|
||||
This daemon is responsible for periodically fetching and applying runtime overlays.
|
||||
|
||||
@@ -75,7 +75,7 @@ Here is an example of how the cluster's address can be divided for a
|
||||
Multiple networks
|
||||
=================
|
||||
|
||||
It is possible to configure several networks not just for the nodes but also for the management of ``dhcpd`` and ``tftp``.
|
||||
It is possible to configure several networks not just for the nodes but also for the management of ``dhcpd`` and ``tftp``.
|
||||
There are two ways to achive this:
|
||||
|
||||
1. Add the networks to the templates of ``dhcpd`` and/or the ``dnsmasq`` template directly.
|
||||
@@ -113,33 +113,33 @@ You can check the result with ``wwctl node list``.
|
||||
.. code-block:: console
|
||||
|
||||
# wwctl node list -a deliverynet
|
||||
NODE FIELD PROFILE VALUE
|
||||
deliverynet Id -- deliverynet
|
||||
deliverynet Comment default This profile is automatically included for each node
|
||||
deliverynet ContainerName default leap15.5
|
||||
deliverynet Ipxe -- (default)
|
||||
deliverynet RuntimeOverlay -- (generic)
|
||||
deliverynet SystemOverlay -- (wwinit)
|
||||
deliverynet Root -- (initramfs)
|
||||
deliverynet Init -- (/sbin/init)
|
||||
deliverynet Kernel.Args -- (quiet crashkernel=no vga=791 net.naming-scheme=v238)
|
||||
deliverynet Profiles -- default
|
||||
deliverynet PrimaryNetDev -- (deliver1)
|
||||
deliverynet NetDevs[deliver2].Type -- (ethernet)
|
||||
deliverynet NetDevs[deliver2].OnBoot -- (true)
|
||||
deliverynet NetDevs[deliver2].Ipaddr -- 10.0.30.250
|
||||
deliverynet NetDevs[deliver2].Netmask -- 255.255.255.0
|
||||
deliverynet NetDevs[deliver2].Tags[dynend] -- 10.10.30.50
|
||||
deliverynet NetDevs[deliver2].Tags[dynstart] -- 10.10.30.10
|
||||
deliverynet NetDevs[deliver2].Tags[network] -- 10.0.30.0
|
||||
deliverynet NetDevs[deliver1].Type -- (ethernet)
|
||||
deliverynet NetDevs[deliver1].OnBoot -- (true)
|
||||
deliverynet NetDevs[deliver1].Ipaddr -- 10.0.20.250
|
||||
deliverynet NetDevs[deliver1].Netmask -- 255.255.255.0
|
||||
deliverynet NetDevs[deliver1].Primary -- (true)
|
||||
deliverynet NetDevs[deliver1].Tags[network] -- 10.0.20.0
|
||||
deliverynet NetDevs[deliver1].Tags[dynend] -- 10.10.20.50
|
||||
deliverynet NetDevs[deliver1].Tags[dynstart] -- 10.10.20.10
|
||||
NODE FIELD PROFILE VALUE
|
||||
deliverynet Id -- deliverynet
|
||||
deliverynet Comment default This profile is automatically included for each node
|
||||
deliverynet ContainerName default leap15.5
|
||||
deliverynet Ipxe -- (default)
|
||||
deliverynet RuntimeOverlay -- (generic)
|
||||
deliverynet SystemOverlay -- (wwinit)
|
||||
deliverynet Root -- (initramfs)
|
||||
deliverynet Init -- (/sbin/init)
|
||||
deliverynet Kernel.Args -- (quiet crashkernel=no vga=791 net.naming-scheme=v238)
|
||||
deliverynet Profiles -- default
|
||||
deliverynet PrimaryNetDev -- (deliver1)
|
||||
deliverynet NetDevs[deliver2].Type -- (ethernet)
|
||||
deliverynet NetDevs[deliver2].OnBoot -- (true)
|
||||
deliverynet NetDevs[deliver2].Ipaddr -- 10.0.30.250
|
||||
deliverynet NetDevs[deliver2].Netmask -- 255.255.255.0
|
||||
deliverynet NetDevs[deliver2].Tags[dynend] -- 10.10.30.50
|
||||
deliverynet NetDevs[deliver2].Tags[dynstart] -- 10.10.30.10
|
||||
deliverynet NetDevs[deliver2].Tags[network] -- 10.0.30.0
|
||||
deliverynet NetDevs[deliver1].Type -- (ethernet)
|
||||
deliverynet NetDevs[deliver1].OnBoot -- (true)
|
||||
deliverynet NetDevs[deliver1].Ipaddr -- 10.0.20.250
|
||||
deliverynet NetDevs[deliver1].Netmask -- 255.255.255.0
|
||||
deliverynet NetDevs[deliver1].Primary -- (true)
|
||||
deliverynet NetDevs[deliver1].Tags[network] -- 10.0.20.0
|
||||
deliverynet NetDevs[deliver1].Tags[dynend] -- 10.10.20.50
|
||||
deliverynet NetDevs[deliver1].Tags[dynstart] -- 10.10.20.10
|
||||
|
||||
Now the templates of ``dhcpd`` and/or ``dnsmasq`` must be modified.
|
||||
You can edit the configuration files.
|
||||
|
||||
@@ -33,8 +33,7 @@ Welcome to the Warewulf User Guide!
|
||||
:maxdepth: 2
|
||||
:caption: Quickstart
|
||||
|
||||
EL8 (Rocky Linux and RHEL) <quickstart/el8>
|
||||
EL9 (Rocky Linux and RHEL) <quickstart/el9>
|
||||
Enterprise Linux (Rocky Linux, CentOS, and RHEL) <quickstart/el>
|
||||
openSUSE Leap and SLES 15 <quickstart/suse15>
|
||||
Debian 12 <quickstart/debian12>
|
||||
|
||||
|
||||
197
userdocs/quickstart/el.rst
Normal file
197
userdocs/quickstart/el.rst
Normal file
@@ -0,0 +1,197 @@
|
||||
===========================================================
|
||||
Enterprise Linux Quickstart (Rocky Linux, CentOS, and RHEL)
|
||||
===========================================================
|
||||
|
||||
Install Warewulf
|
||||
================
|
||||
|
||||
The preferred way to install Warewulf on Enterprise Linux is using the
|
||||
the RPMs published in `GitHub releases`_. For example, to install the
|
||||
v4.5.0 release on Enterprise Linux 9:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
dnf install https://github.com/warewulf/warewulf/releases/download/v4.5.0/warewulf-4.5.0-1.el9.x86_64.rpm
|
||||
|
||||
Packages are available for el7, el8, and el9.
|
||||
|
||||
.. note::
|
||||
CentOS 7 (and el7 in general) uses ``yum``, and does not provide ``dnf``.
|
||||
|
||||
.. _GitHub releases: https://github.com/warewulf/warewulf/releases
|
||||
|
||||
Install Warewulf from source
|
||||
----------------------------
|
||||
|
||||
If you prefer, you can also install Warewulf from source.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
dnf install git
|
||||
dnf install epel-release
|
||||
dnf install golang {libassuan,gpgme}-devel unzip tftp-server dhcp nfs-utils ipxe-bootimgs-{x86,aarch64}
|
||||
|
||||
git clone https://github.com/warewulf/warewulf.git
|
||||
cd warewulf
|
||||
make
|
||||
make install
|
||||
|
||||
.. note::
|
||||
CentOS 7 (and el7 in general) only provides a single ``ipxe-bootimgs`` package.
|
||||
|
||||
Configure firewalld
|
||||
===================
|
||||
|
||||
Restart firewalld to register the added service file, add the service
|
||||
to the default zone, and reload.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
systemctl restart firewalld
|
||||
firewall-cmd --permanent --add-service=warewulf
|
||||
firewall-cmd --permanent --add-service=nfs
|
||||
firewall-cmd --permanent --add-service=tftp
|
||||
firewall-cmd --reload
|
||||
|
||||
Configure Warewulf
|
||||
==================
|
||||
|
||||
Edit the file ``/etc/warewulf/warewulf.conf`` and ensure that you've
|
||||
set the appropriate configuration parameters. Here are some of the
|
||||
defaults for reference assuming that ``10.0.0.1/22`` is the IP
|
||||
address of your cluster's private network interface.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
WW_INTERNAL: 45
|
||||
ipaddr: 10.0.0.1
|
||||
netmask: 255.255.252.0
|
||||
network: 10.0.0.0
|
||||
warewulf:
|
||||
port: 9873
|
||||
secure: false
|
||||
update interval: 60
|
||||
autobuild overlays: true
|
||||
host overlay: true
|
||||
syslog: false
|
||||
datastore: /usr/share
|
||||
grubboot: false
|
||||
dhcp:
|
||||
enabled: true
|
||||
template: default
|
||||
range start: 10.0.1.1
|
||||
range end: 10.0.1.255
|
||||
systemd name: dhcpd
|
||||
tftp:
|
||||
enabled: true
|
||||
tftproot: /var/lib/tftpboot
|
||||
systemd name: tftp
|
||||
ipxe:
|
||||
"00:00": undionly.kpxe
|
||||
"00:07": ipxe-snponly-x86_64.efi
|
||||
"00:09": ipxe-snponly-x86_64.efi
|
||||
00:0B: arm64-efi/snponly.efi
|
||||
nfs:
|
||||
enabled: true
|
||||
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
|
||||
dest: /etc/resolv.conf
|
||||
readonly: true
|
||||
paths:
|
||||
bindir: /usr/bin
|
||||
sysconfdir: /etc
|
||||
localstatedir: /var/lib
|
||||
ipxesource: /usr/share/ipxe
|
||||
srvdir: /var/lib
|
||||
firewallddir: /usr/lib/firewalld/services
|
||||
systemddir: /usr/lib/systemd/system
|
||||
wwoverlaydir: /var/lib/warewulf/overlays
|
||||
wwchrootdir: /var/lib/warewulf/chroots
|
||||
wwprovisiondir: /var/lib/warewulf/provision
|
||||
wwclientdir: /warewulf
|
||||
|
||||
.. note::
|
||||
|
||||
The DHCP range from ``10.0.1.1`` to ``10.0.1.255`` is dedicated for
|
||||
DHCP during node boot and should not overlap with any static IP
|
||||
address assignments.
|
||||
|
||||
Enable and start the Warewulf service
|
||||
=====================================
|
||||
|
||||
Warewulf provides a service, ``warewulfd``, which responds to node
|
||||
boot requests.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
systemctl enable --now warewulfd
|
||||
|
||||
Configure system services automatically
|
||||
=======================================
|
||||
|
||||
There are a number of services and configurations that Warewulf relies
|
||||
on to operate. You can configure all such services with ``wwctl
|
||||
configure --all``.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wwctl configure --all
|
||||
|
||||
.. note::
|
||||
|
||||
If you just installed the system fresh and have SELinux enforcing,
|
||||
you may need to run ``restorecon -Rv /var/lib/tftpboot/`` to label
|
||||
files written to q`tftpboot``.
|
||||
|
||||
Add a base node image container
|
||||
===============================
|
||||
|
||||
This will pull a basic node image container from Docker Hub and import the
|
||||
default running kernel from the controller node and set both in the
|
||||
"default" node profile.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wwctl container import docker://ghcr.io/warewulf/warewulf-rockylinux:9 rockylinux-9 --setdefault
|
||||
|
||||
Configure a default node profile
|
||||
================================
|
||||
|
||||
In this example, all nodes share the netmask and gateway
|
||||
configuration, so we can set them in the default profile.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wwctl profile set -y default --netmask=255.255.252.0 --gateway=10.0.0.1
|
||||
wwctl profile list
|
||||
|
||||
Add a node
|
||||
==========
|
||||
|
||||
Adding nodes can be done while setting configurations in one
|
||||
command. Here we set the IP address of the default interface; and
|
||||
setting the node to be discoverable causes the HW address to be added
|
||||
to the configuration as the node boots.
|
||||
|
||||
Node names must be unique. If you are managing multiple clusters with
|
||||
overlapping names, distinguish them using dot notation.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
wwctl node add n1 --ipaddr=10.0.2.1 --discoverable=true
|
||||
wwctl node list -a n1
|
||||
|
||||
The full node configuration comes from both cascading profiles and
|
||||
node configurations which always supersede profile configurations.
|
||||
|
||||
Turn on your compute node and watch it boot!
|
||||
@@ -1,199 +0,0 @@
|
||||
=====================================
|
||||
EL8 Quickstart (Rocky Linux and RHEL)
|
||||
=====================================
|
||||
|
||||
Install Warewulf and dependencies
|
||||
=================================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo dnf groupinstall "Development Tools"
|
||||
sudo dnf install epel-release
|
||||
sudo dnf config-manager --set-enabled powertools
|
||||
sudo dnf install golang tftp-server dhcp-server nfs-utils gpgme-devel libassuan-devel
|
||||
|
||||
git clone https://github.com/warewulf/warewulf.git
|
||||
cd warewulf
|
||||
make clean defaults \
|
||||
PREFIX=/usr \
|
||||
BINDIR=/usr/bin \
|
||||
SYSCONFDIR=/etc \
|
||||
DATADIR=/usr/share \
|
||||
LOCALSTATEDIR=/var/lib \
|
||||
SHAREDSTATEDIR=/var/lib \
|
||||
MANDIR=/usr/share/man \
|
||||
INFODIR=/usr/share/info \
|
||||
DOCDIR=/usr/share/doc \
|
||||
SRVDIR=/var/lib \
|
||||
TFTPDIR=/var/lib/tftpboot \
|
||||
SYSTEMDDIR=/usr/lib/systemd/system \
|
||||
BASHCOMPDIR=/etc/bash_completion.d/ \
|
||||
FIREWALLDDIR=/usr/lib/firewalld/services \
|
||||
WWCLIENTDIR=/warewulf
|
||||
make all
|
||||
sudo make install
|
||||
|
||||
Configure firewalld
|
||||
===================
|
||||
|
||||
Restart firewalld to register the added service file, add the service
|
||||
to the default zone, and reload.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo systemctl restart firewalld
|
||||
sudo firewall-cmd --permanent --add-service warewulf
|
||||
sudo firewall-cmd --permanent --add-service nfs
|
||||
sudo firewall-cmd --permanent --add-service tftp
|
||||
sudo firewall-cmd --reload
|
||||
|
||||
Configure the controller
|
||||
========================
|
||||
|
||||
Edit the file ``/etc/warewulf/warewulf.conf`` and ensure that you've
|
||||
set the appropriate configuration parameters. Here are some of the
|
||||
defaults for reference assuming that ``192.168.200.1`` is the IP
|
||||
address of your cluster's private network interface:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
WW_INTERNAL: 45
|
||||
ipaddr: 192.168.200.1
|
||||
netmask: 255.255.255.0
|
||||
network: 192.168.200.0
|
||||
warewulf:
|
||||
port: 9873
|
||||
secure: false
|
||||
update interval: 60
|
||||
autobuild overlays: true
|
||||
host overlay: true
|
||||
syslog: false
|
||||
dhcp:
|
||||
enabled: true
|
||||
range start: 192.168.200.50
|
||||
range end: 192.168.200.99
|
||||
systemd name: dhcpd
|
||||
tftp:
|
||||
enabled: true
|
||||
systemd name: tftp
|
||||
nfs:
|
||||
enabled: true
|
||||
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
|
||||
dest: /etc/resolv.conf
|
||||
readonly: true
|
||||
|
||||
.. note::
|
||||
|
||||
The DHCP range ends at ``192.168.200.99`` and as you will see
|
||||
below, the first node static IP address (post boot) is configured
|
||||
to ``192.168.200.100``.
|
||||
|
||||
Start and enable the Warewulf service
|
||||
=====================================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Start and enable the warewulfd service
|
||||
sudo systemctl enable --now warewulfd
|
||||
|
||||
Configure system services automatically
|
||||
=======================================
|
||||
|
||||
There are a number of services and configurations that Warewulf relies
|
||||
on to operate. If you wish to configure all services, you can do so
|
||||
individually (omitting the ``--all``) will print a help and usage
|
||||
instructions.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
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 (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.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo wwctl container import docker://ghcr.io/warewulf/warewulf-rockylinux:8 rocky-8
|
||||
|
||||
|
||||
Set up the default node profile
|
||||
===============================
|
||||
|
||||
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:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo wwctl profile set --yes --container rocky-8 "default"
|
||||
|
||||
Next we set some default networking configurations for the first
|
||||
ethernet device. On modern Linux distributions, the name of the device
|
||||
is not critical, as it will be setup according to the HW
|
||||
address. Because all nodes will share the netmask and gateway
|
||||
configuration, we can set them in the default profile as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
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:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo wwctl profile list -a
|
||||
|
||||
Add a node
|
||||
==========
|
||||
|
||||
Adding nodes can be done while setting configurations in one
|
||||
command. Here we are setting the IP address of ``eth0`` and setting
|
||||
this node to be discoverable, which will then automatically have the
|
||||
HW address added to the configuration as the node boots.
|
||||
|
||||
Node names must be unique. If you have node groups and/or multiple
|
||||
clusters, designate them using dot notation.
|
||||
|
||||
Note that the full node configuration comes from both cascading
|
||||
profiles and node configurations which always supersede profile
|
||||
configurations.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo wwctl node add n0000.cluster --ipaddr 192.168.200.100 --discoverable true
|
||||
|
||||
At this point you can view the basic configuration of this node by
|
||||
typing the following:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo wwctl node list -a n0000.cluster
|
||||
|
||||
Turn on your compute node and watch it boot!
|
||||
@@ -1,199 +0,0 @@
|
||||
=====================================
|
||||
EL9 Quickstart (Rocky Linux and RHEL)
|
||||
=====================================
|
||||
|
||||
Install Warewulf and dependencies
|
||||
=================================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo dnf groupinstall "Development Tools"
|
||||
sudo dnf install epel-release
|
||||
sudo dnf config-manager --set-enabled crb
|
||||
sudo dnf install golang tftp-server dhcp-server nfs-utils gpgme-devel libassuan-devel
|
||||
|
||||
git clone https://github.com/warewulf/warewulf.git
|
||||
cd warewulf
|
||||
make clean defaults \
|
||||
PREFIX=/usr \
|
||||
BINDIR=/usr/bin \
|
||||
SYSCONFDIR=/etc \
|
||||
DATADIR=/usr/share \
|
||||
LOCALSTATEDIR=/var/lib \
|
||||
SHAREDSTATEDIR=/var/lib \
|
||||
MANDIR=/usr/share/man \
|
||||
INFODIR=/usr/share/info \
|
||||
DOCDIR=/usr/share/doc \
|
||||
SRVDIR=/var/lib \
|
||||
TFTPDIR=/var/lib/tftpboot \
|
||||
SYSTEMDDIR=/usr/lib/systemd/system \
|
||||
BASHCOMPDIR=/etc/bash_completion.d/ \
|
||||
FIREWALLDDIR=/usr/lib/firewalld/services \
|
||||
WWCLIENTDIR=/warewulf
|
||||
make all
|
||||
sudo make install
|
||||
|
||||
Configure firewalld
|
||||
===================
|
||||
|
||||
Restart firewalld to register the added service file, add the service
|
||||
to the default zone, and reload.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo systemctl restart firewalld
|
||||
sudo firewall-cmd --permanent --add-service warewulf
|
||||
sudo firewall-cmd --permanent --add-service nfs
|
||||
sudo firewall-cmd --permanent --add-service tftp
|
||||
sudo firewall-cmd --reload
|
||||
|
||||
Configure the controller
|
||||
========================
|
||||
|
||||
Edit the file ``/etc/warewulf/warewulf.conf`` and ensure that you've
|
||||
set the appropriate configuration parameters. Here are some of the
|
||||
defaults for reference assuming that ``192.168.200.1`` is the IP
|
||||
address of your cluster's private network interface:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
WW_INTERNAL: 45
|
||||
ipaddr: 192.168.200.1
|
||||
netmask: 255.255.255.0
|
||||
network: 192.168.200.0
|
||||
warewulf:
|
||||
port: 9873
|
||||
secure: false
|
||||
update interval: 60
|
||||
autobuild overlays: true
|
||||
host overlay: true
|
||||
syslog: false
|
||||
dhcp:
|
||||
enabled: true
|
||||
range start: 192.168.200.50
|
||||
range end: 192.168.200.99
|
||||
systemd name: dhcpd
|
||||
tftp:
|
||||
enabled: true
|
||||
systemd name: tftp
|
||||
nfs:
|
||||
enabled: true
|
||||
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
|
||||
dest: /etc/resolv.conf
|
||||
readonly: true
|
||||
|
||||
.. note::
|
||||
|
||||
The DHCP range ends at ``192.168.200.99`` and as you will see
|
||||
below, the first node static IP address (post boot) is configured
|
||||
to ``192.168.200.100``.
|
||||
|
||||
Start and enable the Warewulf service
|
||||
=====================================
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Start and enable the warewulfd service
|
||||
sudo systemctl enable --now warewulfd
|
||||
|
||||
Configure system services automatically
|
||||
=======================================
|
||||
|
||||
There are a number of services and configurations that Warewulf relies
|
||||
on to operate. If you wish to configure all services, you can do so
|
||||
individually (omitting the ``--all``) will print a help and usage
|
||||
instructions.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
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 (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.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo wwctl container import docker://ghcr.io/warewulf/warewulf-rockylinux:9 rocky-9
|
||||
|
||||
|
||||
Set up the default node profile
|
||||
===============================
|
||||
|
||||
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:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo wwctl profile set --yes --container rocky-9 "default"
|
||||
|
||||
Next we set some default networking configurations for the first
|
||||
ethernet device. On modern Linux distributions, the name of the device
|
||||
is not critical, as it will be setup according to the HW
|
||||
address. Because all nodes will share the netmask and gateway
|
||||
configuration, we can set them in the default profile as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
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:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo wwctl profile list -a
|
||||
|
||||
Add a node
|
||||
==========
|
||||
|
||||
Adding nodes can be done while setting configurations in one
|
||||
command. Here we are setting the IP address of ``eth0`` and setting
|
||||
this node to be discoverable, which will then automatically have the
|
||||
HW address added to the configuration as the node boots.
|
||||
|
||||
Node names must be unique. If you have node groups and/or multiple
|
||||
clusters, designate them using dot notation.
|
||||
|
||||
Note that the full node configuration comes from both cascading
|
||||
profiles and node configurations which always supersede profile
|
||||
configurations.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo wwctl node add n0000.cluster --ipaddr 192.168.200.100 --discoverable true
|
||||
|
||||
At this point you can view the basic configuration of this node by
|
||||
typing the following:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo wwctl node list -a n0000.cluster
|
||||
|
||||
Turn on your compute node and watch it boot!
|
||||
@@ -52,9 +52,13 @@ BuildRequires: golang >= 1.16
|
||||
BuildRequires: firewalld-filesystem
|
||||
Requires: tftp-server
|
||||
Requires: nfs-utils
|
||||
%if 0%{?rhel} < 8
|
||||
Requires: ipxe-bootimgs
|
||||
%else
|
||||
Requires: ipxe-bootimgs-x86
|
||||
Requires: ipxe-bootimgs-aarch64
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?suse_version} || 0%{?fedora}
|
||||
Requires: dhcp-server
|
||||
@@ -165,6 +169,16 @@ yq e '
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Mar 9 2024 Jonathon Anderson <janderson@ciq.com> - 4.5.0-1
|
||||
- Update source to github.com/warewulf
|
||||
- Fix ownership of overlay files
|
||||
- Add packaging for new grub support
|
||||
- Add dependencies on distribution ipxe packages
|
||||
- Fix offline builds
|
||||
- Accommodate new Makefile behavior
|
||||
- Designate config files in /etc/warewulf/ as "noreplace"
|
||||
- Updated path to shell completions
|
||||
|
||||
* Mon Oct 17 2022 Jeremy Siadal <jeremy.c.siadal@intel.com> - 4.4.0-1
|
||||
- Add offline build support -- prepping for bcond
|
||||
- Add more BuildRequires for new golang vendor modules
|
||||
|
||||
Reference in New Issue
Block a user