reformat el8 quickstart

This commit is contained in:
Brian Clemens
2021-03-03 23:04:39 +09:00
parent c9d6e1ceca
commit 70ebfdbf70

View File

@@ -3,98 +3,92 @@ id: quickstart-el8
title: Quick Start for RHEL, CentOS, and Rocky 8 title: Quick Start for RHEL, CentOS, and Rocky 8
--- ---
Install Warewulf and dependencies ## Install Warewulf and dependencies
=================================
.. code-block:: bash ```bash
$ sudo dnf groupinstall "Development Tools"
$ sudo dnf install epel-release
$ sudo dnf install golang tftp-server dhcp-server nfs-utils
$ sudo dnf groupinstall "Development Tools" $ sudo systemctl stop firewalld
$ sudo dnf install epel-release $ sudo systemctl disable firewalld
$ sudo dnf install golang tftp-server dhcp-server nfs-utils
$ sudo systemctl stop firewalld $ git clone https://github.com/ctrliq/warewulf.git
$ sudo systemctl disable firewalld $ cd warewulf
$ make all
$ sudo make install
```
$ git clone https://github.com/ctrliq/warewulf.git ## Configure the controller
$ cd warewulf
$ make all
$ sudo make install
Configure the controller
=========================
Edit the file ``/etc/warewulf/warewulf.conf`` and ensure that you've set the Edit the file ``/etc/warewulf/warewulf.conf`` and ensure that you've set the
appropriate configuration paramaters. Here are some of the defaults for reference: appropriate configuration paramaters. Here are some of the defaults for reference:
.. code-block:: yaml ```yaml
ipaddr: 192.168.1.1
netmask: 255.255.255.0
warewulf:
port: 9873
secure: true
update interval: 60
dhcp:
enabled: true
range start: 192.168.1.150
range end: 192.168.1.200
template: default
systemd name: dhcpd
tftp:
enabled: true
tftproot: /var/lib/tftpboot
systemd name: tftp
nfs:
systemd name: nfs-server
exports:
- /home
- /var/warewulf
```
ipaddr: 192.168.1.1 ## Configure system services automatically
netmask: 255.255.255.0
warewulf:
port: 9873
secure: true
update interval: 60
dhcp:
enabled: true
range start: 192.168.1.150
range end: 192.168.1.200
template: default
systemd name: dhcpd
tftp:
enabled: true
tftproot: /var/lib/tftpboot
systemd name: tftp
nfs:
systemd name: nfs-server
exports:
- /home
- /var/warewulf
Configure system services automatically ```bash
======================================= $ sudo wwctl configure dhcp # Create the default dhcpd.conf file and start/enable service
$ sudo wwctl configure tftp # Install the base tftp/PXE boot files and start/enable service
.. code-block:: bash $ sudo wwctl configure nfs # Configure the exports and create an fstab in the default system overlay
$ sudo wwctl configure ssh # Build the basic ssh keys to be included by the default system overlay
$ sudo wwctl configure dhcp # Create the default dhcpd.conf file and start/enable service ```
$ sudo wwctl configure tftp # Install the base tftp/PXE boot files and start/enable service
$ sudo wwctl configure nfs # Configure the exports and create an fstab in the default system overlay
$ sudo wwctl configure ssh # Build the basic ssh keys to be included by the default system overlay
Pull and build the VNFS container and kernel ## Pull and build the VNFS container and kernel
============================================
This will pull a basic VNFS container from Docker Hub and import the default running 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. kernel from the controller node and set both in the "default" node profile.
.. code-block:: bash ```bash
$ sudo wwctl container import docker://warewulf/centos-8 centos-8 --setdefault
$ sudo wwctl kernel import $(uname -r) --setdefault
```
$ sudo wwctl container import docker://warewulf/centos-8 centos-8 --setdefault ## Set up the default node profile
$ sudo wwctl kernel import $(uname -r) --setdefault
Set up the default node profile
===============================
The ``--setdefault`` arguments above will automatically set those entries in the default The ``--setdefault`` arguments above will automatically set those entries in the default
profile, but if you wanted to set them by hand to something different, you can do the profile, but if you wanted to set them by hand to something different, you can do the
following: following:
.. code-block:: bash ```bash
$ sudo wwctl profile set default -K $(uname -r) -C centos-7
$ sudo wwctl profile set default -K $(uname -r) -C centos-7 ```
Next we set some default networking configurations for the first ethernet device. On 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 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 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: configuration, we can set them in the default profile as follows:
.. code-block:: bash ```bash
$ sudo wwctl profile set default --netdev eth0 -M 255.255.255.0 -G 192.168.1.1
$ sudo wwctl profile list
```
$ sudo wwctl profile set default --netdev eth0 -M 255.255.255.0 -G 192.168.1.1 ## Add a node and build node specific overlays
$ sudo wwctl profile list
Add a node and build node specific overlays
===========================================
Adding nodes can be done while setting configurations in one command. Here we are setting 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 the IP address of ``eth0`` and setting this node to be discoverable, which will then
@@ -106,13 +100,12 @@ them using dot notation.
Note that the full node configuration comes from both cascading profiles and node Note that the full node configuration comes from both cascading profiles and node
configurations which always supersede profile configurations. configurations which always supersede profile configurations.
.. code-block:: bash ```bash
$ sudo wwctl node add n0000.cluster --netdev eth0 -I 192.168.1.100 --discoverable
$ sudo wwctl node list -a n0000
```
$ sudo wwctl node add n0000.cluster --netdev eth0 -I 192.168.1.100 --discoverable ## Warewulf Overlays
$ sudo wwctl node list -a n0000
Warewulf Overlays
=================
There are two types of overlays: system and runtime overlays. There are two types of overlays: system and runtime overlays.
@@ -129,32 +122,31 @@ commands. Files that end in the ``.ww`` suffix are templates and abide by standa
text/template rules. This supports loops, arrays, variables, and functions making overlays text/template rules. This supports loops, arrays, variables, and functions making overlays
extremely flexible. extremely flexible.
.. note:: :::note
When using the overlay subsystem, system overlays are never shown by default. So when running ``overlay`` commands, you are always looking at runtime overlays unless the ``-s`` option is passed. When using the overlay subsystem, system overlays are never shown by default. So when running ``overlay`` commands, you are always looking at runtime overlays unless the ``-s`` option is passed.
:::
All overlays are compiled before being provisioned. This accelerates the provisioning All overlays are compiled before being provisioned. This accelerates the provisioning
process because there is less to do when nodes are being managed at scale. process because there is less to do when nodes are being managed at scale.
Here are some of the common ``overlay`` commands: Here are some of the common ``overlay`` commands:
.. code-block:: bash ```bash
$ sudo wwctl overlay list -l
$ sudo wwctl overlay list -ls
$ sudo wwctl overlay edit default /etc/hello_world.ww
$ sudo wwctl overlay build -a
```
$ sudo wwctl overlay list -l ## Start the Warewulf daemon
$ sudo wwctl overlay list -ls
$ sudo wwctl overlay edit default /etc/hello_world.ww
$ sudo wwctl overlay build -a
Start the Warewulf daemon
-------------------------
Once the above provisioning images are built, you can check the provisioning "rediness" Once the above provisioning images are built, you can check the provisioning "rediness"
and then begin booting nodes. and then begin booting nodes.
.. code-block:: bash ```bash
$ sudo wwctl ready
$ sudo wwctl server start
$ sudo wwctl server status
```
$ sudo wwctl ready ## Boot your compute node and watch it boot
$ sudo wwctl server start
$ sudo wwctl server status
Boot your compute node and watch it boot
----------------------------------------