Console-style code-block and remove sudo
Closes #703 #695 Signed-off-by: Jonathon Anderson <janderson@ciq.co>
This commit is contained in:
@@ -46,9 +46,9 @@ private registry.
|
||||
|
||||
Here is an example of importing from Docker Hub.
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl container import docker://warewulf/rocky rocky-8
|
||||
# wwctl container import docker://warewulf/rocky rocky-8
|
||||
Getting image source signatures
|
||||
Copying blob d7f16ed6f451 done
|
||||
Copying config da2ca70704 done
|
||||
@@ -85,7 +85,7 @@ podman on your control node just for importing images into Warewulf.
|
||||
|
||||
Here are the environmental variables that can be used.
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
WAREWULF_OCI_USERNAME
|
||||
WAREWULF_OCI_PASSWORD
|
||||
@@ -93,11 +93,11 @@ Here are the environmental variables that can be used.
|
||||
|
||||
Here is an example:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
export WAREWULF_OCI_USERNAME=privateuser
|
||||
export WAREWULF_OCI_PASSWORD=super-secret-password-or-token
|
||||
sudo -E wwctl import docker://ghcr.io/privatereg/rocky:8
|
||||
# export WAREWULF_OCI_USERNAME=privateuser
|
||||
# export WAREWULF_OCI_PASSWORD=super-secret-password-or-token
|
||||
# wwctl import docker://ghcr.io/privatereg/rocky:8
|
||||
|
||||
The above is just an example. Consideration should be done before
|
||||
doing it this way if you are in a security sensitive environment or
|
||||
@@ -118,14 +118,14 @@ belonning to these UIDs and GIDs will also be updated.
|
||||
A check if the users of the host and container matches can be
|
||||
triggered with the ``syncuser`` command.
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl container syncuser container-name
|
||||
# wwctl container syncuser container-name
|
||||
|
||||
With the ``--write`` flag it will update the container to match the
|
||||
user database of the host as described above.
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl container syncuser --write container-name
|
||||
|
||||
@@ -135,9 +135,9 @@ Listing All Imported Containers
|
||||
Once the container has been imported, you can list them all with the
|
||||
following command:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl container list
|
||||
# wwctl container list
|
||||
CONTAINER NAME BUILT NODES
|
||||
rocky-8 true 0
|
||||
|
||||
@@ -151,9 +151,9 @@ Warewulf has a minimal container runtime built into it. This means you
|
||||
can run commands inside of any of the containers and make changes to
|
||||
them as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl container exec rocky-8 /bin/sh
|
||||
# wwctl container exec rocky-8 /bin/sh
|
||||
[rocky-8] Warewulf> cat /etc/rocky-release
|
||||
Rocky Linux release 8.4 (Green Obsidian)
|
||||
[rocky-8] Warewulf> exit
|
||||
@@ -163,9 +163,9 @@ them as follows:
|
||||
You can also ``--bind`` directories from your host into the container
|
||||
when using the exec command. This works as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl container exec --bind /tmp:/mnt rocky-8 /bin/sh
|
||||
# wwctl container exec --bind /tmp:/mnt rocky-8 /bin/sh
|
||||
[rocky-8] Warewulf>
|
||||
|
||||
.. note::
|
||||
@@ -199,9 +199,9 @@ node's container.
|
||||
For example, on an RPM based Linux distribution with YUM or DNF, you
|
||||
can do something like the following:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo yum install --installroot /tmp/newroot basesystem bash \
|
||||
# yum install --installroot /tmp/newroot basesystem bash \
|
||||
chkconfig coreutils e2fsprogs ethtool filesystem findutils \
|
||||
gawk grep initscripts iproute iputils net-tools nfs-utils pam \
|
||||
psmisc rsync sed setup shadow-utils rsyslog tzdata util-linux \
|
||||
@@ -212,20 +212,20 @@ can do something like the following:
|
||||
|
||||
You can do something similar with Debian-based distributions:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
sudo apt-get install debootstrap
|
||||
sudo debootstrap stable /tmp/newroot http://ftp.us.debian.org/debian
|
||||
# apt-get install debootstrap
|
||||
# debootstrap stable /tmp/newroot http://ftp.us.debian.org/debian
|
||||
|
||||
Once you have created and modified your new ``chroot()``, you can
|
||||
import it into Warewulf with the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
sudo wwctl container import /tmp/newroot containername
|
||||
# wwctl container import /tmp/newroot containername
|
||||
|
||||
Building A Container Using Apptainer
|
||||
--------------------------------------
|
||||
------------------------------------
|
||||
|
||||
Apptainer, a container platform for HPC and performance intensive
|
||||
applications, can also be used to create node containers for
|
||||
@@ -239,23 +239,23 @@ you want in the ``%post`` section of the recipe file. Once you've done
|
||||
that, installing Apptainer, building a container sandbox and importing
|
||||
into Warewulf can be done with the following steps:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
sudo yum install epel-release
|
||||
sudo yum install Apptainer
|
||||
sudo Apptainer build --sandbox /tmp/newroot /path/to/Apptainer/recipe.def
|
||||
sudo wwctl container import /tmp/newroot containername
|
||||
# yum install epel-release
|
||||
# yum install Apptainer
|
||||
# Apptainer build --sandbox /tmp/newroot /path/to/Apptainer/recipe.def
|
||||
# wwctl container import /tmp/newroot containername
|
||||
|
||||
Building A Container Using Podman
|
||||
--------------------------------------
|
||||
---------------------------------
|
||||
|
||||
You can also build a container using podman via a `Dockerfile`. For
|
||||
this step the container must be exported to a tar archive, which then
|
||||
can be imported to Warewulf. The following steps will create an
|
||||
openSUSE Leap container and import it to Warewulf:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo podman build -f containers/Docker/openSUSE/Containerfile --tag leap-ww
|
||||
$ sudo podman save localhost/leap-ww:latest -o ~/leap-ww.tar
|
||||
$ sudo wwctl container import file://root/leap-ww.tar leap-ww
|
||||
# podman build -f containers/Docker/openSUSE/Containerfile --tag leap-ww
|
||||
# podman save localhost/leap-ww:latest -o ~/leap-ww.tar
|
||||
# wwctl container import file://root/leap-ww.tar leap-ww
|
||||
|
||||
@@ -10,9 +10,9 @@ initialized and have the associated system services started. To do
|
||||
this, start by configuring the system services that Warewulf depends
|
||||
on for operation. To do that, run the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
sudo wwctl configure --all
|
||||
# wwctl configure --all
|
||||
|
||||
This command will configure the system for Warewulf to run
|
||||
properly. Here are the things it will do:
|
||||
@@ -45,16 +45,16 @@ The Warewulf installation attempts to register the Warewulf service
|
||||
with Systemd, so it should be as easy to start/stop/check as any other
|
||||
Systemd service:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
sudo systemctl enable --now warewulfd
|
||||
# systemctl enable --now warewulfd
|
||||
|
||||
You can also check and control the Warewulf service using the `wwctl`
|
||||
command line program as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
sudo wwctl server status
|
||||
# wwctl server status
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ While the Warewulf project does not build binary RPMs, you can obtain them from
|
||||
|
||||
This is the easiest method to install Warewulf and can be done as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
sudo yum install -y https://repo.ctrliq.com/rhel/8/ciq-release.rpm
|
||||
sudo yum install -y warewulf
|
||||
# yum install -y https://repo.ctrliq.com/rhel/8/ciq-release.rpm
|
||||
# yum install -y warewulf
|
||||
|
||||
> note: as mentioned, these binaries are part of CIQ's commercial support offering but they can be used for non-production and testing uses. If you are interested in using these binaries for production, please contact CIQ at: `info@ctrliq.com <mailto:info@ctrliq.com>`_.
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@ reviewed from a Profile level, all the way down to a specific Node.
|
||||
Profile View
|
||||
------------
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl profile list -a
|
||||
# wwctl profile list -a
|
||||
PROFILE FIELD PROFILE VALUE
|
||||
=====================================================================================
|
||||
default Id -- default
|
||||
@@ -87,9 +87,9 @@ Profile View
|
||||
Node View
|
||||
---------
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node list -a n001
|
||||
# wwctl node list -a n001
|
||||
NODE FIELD PROFILE VALUE
|
||||
=====================================================================================
|
||||
n001 Id -- n001
|
||||
@@ -132,9 +132,9 @@ The above views show you everything that is set on a Profile or Node
|
||||
level. That is a lot of detail. If you want to view key IPMI connecton
|
||||
details for a node or all nodes, you can do the following.
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node list -i
|
||||
# wwctl node list -i
|
||||
NODE NAME IPMI IPADDR IPMI PORT IPMI USERNAME IPMI INTERFACE
|
||||
==================================================================================================
|
||||
n001 192.168.1.11 -- hwadmin --
|
||||
|
||||
@@ -16,9 +16,9 @@ container image.
|
||||
You can see what kernel is included in a container by using the
|
||||
``wwctl container list`` command:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl container list
|
||||
# wwctl container list
|
||||
CONTAINER NAME NODES KERNEL VERSION
|
||||
alpine 0
|
||||
rocky 0 4.18.0-348.12.2.el8_5.x86_64
|
||||
@@ -47,9 +47,9 @@ 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:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl kernel import $(uname -r)
|
||||
# wwctl kernel import $(uname -r)
|
||||
4.18.0-305.3.1.el8_4.x86_64: Done
|
||||
|
||||
This process will import not only the kernel image itself, but also
|
||||
@@ -61,9 +61,9 @@ Listing All Imported Kernels
|
||||
Once the kernel has been imported, you can list them all with the
|
||||
following command:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl kernel list
|
||||
# wwctl kernel list
|
||||
VNFS NAME NODES
|
||||
4.18.0-305.3.1.el8_4.x86_64 0
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ Adding a New Node
|
||||
|
||||
Creating a new node is as simple as running the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node add n001 -I 172.16.1.11
|
||||
# wwctl node add n001 -I 172.16.1.11
|
||||
Added node: n001
|
||||
|
||||
Adding several nodes
|
||||
@@ -31,13 +31,14 @@ Adding several nodes
|
||||
Several nodes can be added with a single command if a node range is
|
||||
given. An additional IP address will incremented. So the command
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node add n00[2-4] -I 172.16.1.12
|
||||
# wwctl node add n00[2-4] -I 172.16.1.12
|
||||
Added node: n002
|
||||
Added node: n003
|
||||
Added node: n004
|
||||
$ wwctl node list -n n00[1-4]
|
||||
|
||||
# wwctl node list -n n00[1-4]
|
||||
NODE NAME NAME HWADDR IPADDR GATEWAY DEVICE
|
||||
==========================================================================================
|
||||
n001 default -- 172.16.1.11 -- (eth0)
|
||||
@@ -69,20 +70,19 @@ Listing Nodes
|
||||
Once you have configured one or more nodes, you can list them and
|
||||
their attributes as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
# wwctl node list
|
||||
NODE NAME PROFILES NETWORK
|
||||
================================================================================
|
||||
n001 default
|
||||
|
||||
$ sudo wwctl node list
|
||||
|
||||
You can also see the node's full attribute list by specifying the
|
||||
``-a`` option (all):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ sudo wwctl node list -a n001
|
||||
# wwctl node list -a n001
|
||||
NODE FIELD PROFILE VALUE
|
||||
=====================================================================================
|
||||
n001 Id -- n001
|
||||
@@ -118,7 +118,6 @@ You can also see the node's full attribute list by specifying the
|
||||
n001 default:mtu -- --
|
||||
n001 default:primary -- true
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
The attribute values in parenthesis are default values and can be
|
||||
@@ -141,16 +140,16 @@ node set --help``.
|
||||
Configuring the Node's Container Image
|
||||
======================================
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node set --container rocky-8 n001
|
||||
# wwctl node set --container rocky-8 n001
|
||||
Are you sure you want to modify 1 nodes(s): y
|
||||
|
||||
And you can check that the container name is set for ``n001``:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node list -a n001 | grep Container
|
||||
# wwctl node list -a n001 | grep Container
|
||||
n0000 Container -- rocky-8
|
||||
|
||||
Configuring the Node's Kernel
|
||||
@@ -159,39 +158,38 @@ Configuring the Node's Kernel
|
||||
While the recommended method for assigning a kernel in 4.3 and beyond
|
||||
is to include it in the container / node image, a kernel can still be
|
||||
specified as an override at the node or profile. To illustrate this,
|
||||
we import the most recent kernel from a openSUSE Tumbleweed release
|
||||
we import the most recent kernel from a openSUSE Tumbleweed release.
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl container import docker://registry.opensuse.org/science/warewulf/tumbleweed/containerfile/kernel:latest tw
|
||||
$ sudo wwctl kernel import -DC tw
|
||||
$ sudo wwctl kernel list
|
||||
# wwctl container import docker://registry.opensuse.org/science/warewulf/tumbleweed/containerfile/kernel:latest tw
|
||||
# wwctl kernel import -DC tw
|
||||
# wwctl kernel list
|
||||
KERNEL NAME KERNEL VERSION NODES
|
||||
tw 6.1.10-1-default 0
|
||||
$ sudo wwctl node set --kerneloverride tw n001
|
||||
# wwctl node set --kerneloverride tw n001
|
||||
Are you sure you want to modify 1 nodes(s): y
|
||||
|
||||
$ sudo wwctl node list -a n001 | grep kerneloverride
|
||||
# wwctl node list -a n001 | grep kerneloverride
|
||||
n001 kerneloverride -- tw
|
||||
|
||||
|
||||
Configuring the Node's Network
|
||||
------------------------------
|
||||
|
||||
To configure the network, we have to pick a network device name and
|
||||
provide the network information as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node set --netdev eth0 --hwaddr 11:22:33:44:55:66 --ipaddr 10.0.2.1 --netmask 255.255.252.0 n001
|
||||
# wwctl node set --netdev eth0 --hwaddr 11:22:33:44:55:66 --ipaddr 10.0.2.1 --netmask 255.255.252.0 n001
|
||||
Are you sure you want to modify 1 nodes(s): y
|
||||
|
||||
You can now see that the node contains configuration attributes for
|
||||
container, kernel, and network:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node list -a n001
|
||||
# wwctl node list -a n001
|
||||
=====================================================================================
|
||||
n001 Id -- n001
|
||||
n001 comment default This profile is automatically included for each node
|
||||
@@ -226,10 +224,10 @@ container, kernel, and network:
|
||||
n001 default:mtu -- --
|
||||
n001 default:primary -- true
|
||||
|
||||
$ sudo wwctl node set --cluster cluster01 n001
|
||||
# wwctl node set --cluster cluster01 n001
|
||||
Are you sure you want to modify 1 nodes(s): y
|
||||
|
||||
$ sudo wwctl node list -a n001 | grep cluster
|
||||
# wwctl node list -a n001 | grep cluster
|
||||
n001 cluster -- cluster01
|
||||
|
||||
Un-setting Node Attributes
|
||||
@@ -240,10 +238,10 @@ If you wish to ``unset`` a particular value, set the value to
|
||||
|
||||
And to unset this configuration attribute:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node set --cluster UNDEF n001
|
||||
# wwctl node set --cluster UNDEF n001
|
||||
Are you sure you want to modify 1 nodes(s): y
|
||||
|
||||
$ sudo wwctl node list -a n001 | grep Cluster
|
||||
# wwctl node list -a n001 | grep Cluster
|
||||
n001 Cluster -- --
|
||||
|
||||
@@ -100,15 +100,15 @@ overlay called welcome and import the file `/etc/issue` from the host
|
||||
to it. This overlay is then combined with the existing **wwinit**
|
||||
overlay.
|
||||
|
||||
..code-block:: bash
|
||||
$ wwctl overlay create welcome
|
||||
$ wwctl overlay mkdir welcome /etc
|
||||
$ wwctl overlay import welcome /etc/issue
|
||||
$ wwctl profile set default --wwinit=wwinit,welcome
|
||||
? Are you sure you want to modify 1 profile(s)? [y/N] y
|
||||
$ wwctl profile list default -a |grep welcome
|
||||
default SystemOverlay wwinit,welcome
|
||||
.. code-block:: console
|
||||
|
||||
# wwctl overlay create welcome
|
||||
# wwctl overlay mkdir welcome /etc
|
||||
# wwctl overlay import welcome /etc/issue
|
||||
# wwctl profile set default --wwinit=wwinit,welcome
|
||||
? Are you sure you want to modify 1 profile(s)? [y/N] y
|
||||
# wwctl profile list default -a |grep welcome
|
||||
default SystemOverlay wwinit,welcome
|
||||
|
||||
Templates
|
||||
=========
|
||||
@@ -147,9 +147,9 @@ permissions, etc.
|
||||
Build
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl overlay build [-H,--hosts|-N,--nodes|-o,--output directory|-O,--overlay-name] nodepattern
|
||||
wwctl overlay build [-H,--hosts|-N,--nodes|-o,--output directory|-O,--overlay-name] nodepattern
|
||||
|
||||
Without any arguments the command will interpret the templates for all
|
||||
overlays for every compute node and also all the templates in the host
|
||||
@@ -167,7 +167,7 @@ By default Warewulf will build/update and cache overlays as needed
|
||||
Chmod
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl overlay chmod overlay-name filename mode
|
||||
|
||||
@@ -177,7 +177,7 @@ overlay. You can use any mode format supported by the chmod command.
|
||||
Chown
|
||||
-----
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl overlay chown overlay-name filename UID [GID]
|
||||
|
||||
@@ -188,7 +188,7 @@ change group ownership to GID.
|
||||
Create
|
||||
------
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl overlay create overlay-name
|
||||
|
||||
@@ -197,7 +197,7 @@ This command creates a new empty overlay with the given name.
|
||||
Delete
|
||||
------
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl overlay delete [-f,--force] overlay-name [File [File ...]]
|
||||
|
||||
@@ -208,7 +208,7 @@ no other file is in the directory.
|
||||
|
||||
Edit
|
||||
----
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl overlay edit [--mode,-m MODE|--parents,p] overlay-name file
|
||||
|
||||
@@ -219,7 +219,7 @@ necessary parent directories for a new file are created.
|
||||
|
||||
Import
|
||||
------
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl overlay import [--mode,-m|--noupdate,-n] overlay-name file-name [new-file-name]
|
||||
|
||||
@@ -231,7 +231,7 @@ overlays.
|
||||
List
|
||||
----
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl overlay list [--all,-a|--long,-l] [overlay-name]
|
||||
|
||||
@@ -244,7 +244,7 @@ GID of each file.
|
||||
Show
|
||||
----
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
wwctl overlay show [--quiet,-q|--render,-r nodename] overlay-name file
|
||||
|
||||
|
||||
@@ -24,18 +24,18 @@ list`` command, this will provide a summary, but you can see **all**
|
||||
configuration attributes by using the ``--all`` or ``-a`` flag as
|
||||
follows:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl profile list
|
||||
# wwctl profile list
|
||||
PROFILE NAME COMMENT/DESCRIPTION
|
||||
================================================================================
|
||||
default This profile is automatically included for each node
|
||||
|
||||
And with the ``-a`` flag:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl profile list -a
|
||||
# wwctl profile list -a
|
||||
################################################################################
|
||||
PROFILE NAME FIELD VALUE
|
||||
default Id default
|
||||
@@ -62,9 +62,9 @@ inherited by any nodes that are configured to use this profile. So if
|
||||
we look at the node we configured in the last section, we can see that
|
||||
configuration attribute there:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node list -a | head -n 5
|
||||
# wwctl node list -a | head -n 5
|
||||
################################################################################
|
||||
NODE FIELD PROFILE VALUE
|
||||
n0000 Id -- n0000
|
||||
@@ -83,10 +83,10 @@ Multiple Profiles
|
||||
For demonstration purposes, let's create another profile and
|
||||
demonstrate how to use this second profile.
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl profile add test_profile
|
||||
$ sudo wwctl profile list
|
||||
# wwctl profile add test_profile
|
||||
# wwctl profile list
|
||||
PROFILE NAME COMMENT/DESCRIPTION
|
||||
================================================================================
|
||||
default This profile is automatically included for each node
|
||||
@@ -95,26 +95,26 @@ demonstrate how to use this second profile.
|
||||
Now that we've created a new profile, let's create a configuration
|
||||
attribute in this profile:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl profile set --cluster cluster01 test_profile
|
||||
# wwctl profile set --cluster cluster01 test_profile
|
||||
? Are you sure you want to modify 1 profile(s)? [y/N] y
|
||||
|
||||
$ sudo wwctl profile list -a test_profile | grep Cluster
|
||||
# wwctl profile list -a test_profile | grep Cluster
|
||||
test_profile Cluster cluster01
|
||||
|
||||
Lastly we just need to configure this profile to our node(s):
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node set --addprofile test_profile n0000
|
||||
# wwctl node set --addprofile test_profile n0000
|
||||
Are you sure you want to modify 1 nodes(s): y
|
||||
|
||||
And you can now verify that the node has both profile configurations:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node list -a | head -n 6
|
||||
# wwctl node list -a | head -n 6
|
||||
################################################################################
|
||||
NODE FIELD PROFILE VALUE
|
||||
n0000 Id -- n0000
|
||||
@@ -128,12 +128,12 @@ Cascading Profiles
|
||||
In the previous example, we set a single node to have two profile
|
||||
configurations. We can also overwrite configurations as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl profile set --comment "test comment" test_profile
|
||||
# wwctl profile set --comment "test comment" test_profile
|
||||
Are you sure you want to modify 1 profile(s): y
|
||||
|
||||
$ sudo wwctl node list -a | head -n 6
|
||||
# wwctl node list -a | head -n 6
|
||||
################################################################################
|
||||
NODE FIELD PROFILE VALUE
|
||||
n0000 Id -- n0000
|
||||
@@ -144,12 +144,12 @@ configurations. We can also overwrite configurations as follows:
|
||||
And if we delete the superseded profile attribute from
|
||||
``test_profile`` we can now see the previous configuration:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl profile set --comment UNDEF test_profile
|
||||
# wwctl profile set --comment UNDEF test_profile
|
||||
Are you sure you want to modify 1 profile(s): y
|
||||
|
||||
$ sudo wwctl node list -a | head -n 6
|
||||
# wwctl node list -a | head -n 6
|
||||
################################################################################
|
||||
NODE FIELD PROFILE VALUE
|
||||
n0000 Id -- n0000
|
||||
@@ -169,12 +169,12 @@ Overriding Profiles
|
||||
All profile configurations can be overwritten by a node configuration
|
||||
as can be seen here:
|
||||
|
||||
.. code-block:: bash
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo wwctl node set --comment "This value takes precedent" n0000
|
||||
# wwctl node set --comment "This value takes precedent" n0000
|
||||
Are you sure you want to modify 1 nodes(s): y
|
||||
|
||||
$ sudo wwctl node list -a | head -n 6
|
||||
# wwctl node list -a | head -n 6
|
||||
################################################################################
|
||||
NODE FIELD PROFILE VALUE
|
||||
n0000 Id -- n0000
|
||||
|
||||
Reference in New Issue
Block a user