Skip to content

Commit

Permalink
Target Warewulf 4.5
Browse files Browse the repository at this point in the history
 * Updated container name to use ${c_name[i]}
 * removed `/bin/false` in the container build to remove scarry warning
 * Fixed duplicate `template: default`
 * Fixed bad paths for hosts overlay (target Warewulf 4.5, not 4.4)
 * Added servername.localdomain first for nodes in /etc/hosts for CI testing
 * Add workaround for dhcpd.conf.ww not including a `next-server` for tftp clients
 * ssh keys does work - no need for slurm.conf, no need for authorized keys

Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
  • Loading branch information
MiddelkoopT committed Oct 29, 2024
1 parent c9cc55b commit b75e1a7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/recipes/install/common/add_ww4_hosts_intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
\begin{lstlisting}[language=bash,keywords={},upquote=true,basicstyle=\footnotesize\ttfamily,literate={BOSVER}{\baseos{}}1]
[sms](*\#*) for ((i=0; i<$num_computes; i++)) ; do
wwctl node add --container=rocky-9.4 \
--ipaddr=${c_ip[$i]} --hwaddr=${c_mac[$i]} --netmask=${internal_netmask} ${compute_prefix}$((i+1))
--ipaddr=${c_ip[$i]} --hwaddr=${c_mac[$i]} --netmask=${internal_netmask} ${c_name[i]}
done
\end{lstlisting}
% end_ohpc_run
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# Install compute node base meta-package
[sms](*\#*) wwctl container exec rocky-9.4 /bin/bash <<- EOF
dnf -y install ohpc-base-compute
/bin/false
EOF
\end{lstlisting}
% end_ohpc_run
Expand Down
6 changes: 3 additions & 3 deletions docs/recipes/install/common/warewulf4_mkchroot_rocky.tex
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ \subsubsection{Build initial BOS image} \label{sec:assemble_bos}

The \texttt{wwctl container exec} command runs the commands below it, these commands
also be run interactively one a time with the command \texttt{wwctl container
shell \baseos{}}. The final command \texttt{/bin/false} prevents the image from
rebuilding, this is also true for any final command that fails.
shell \baseos{}}. You can add \texttt{/bin/false} as the last command to prevent
the image from rebuilding (it will show an error) and rebuild later with the
`wwctl container build` command.

% begin_ohpc_run
% ohpc_comment_header Create compute image for Warewulf \ref{sec:assemble_bos}
Expand All @@ -25,7 +26,6 @@ \subsubsection{Build initial BOS image} \label{sec:assemble_bos}
[sms](*\#*) wwctl container exec rocky-9.4 /bin/bash <<- EOF
dnf -y install http://repos.openhpc.community/OpenHPC/3/EL_9/x86_64/ohpc-release-3-1.el9.x86_64.rpm
dnf -y update
/bin/false
EOF

# Define chroot location
Expand Down
15 changes: 12 additions & 3 deletions docs/recipes/install/common/warewulf4_setup_centos.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
% begin_ohpc_run
% ohpc_validation_newline
% ohpc_validation_comment Update /etc/hosts template to have ${hostname}.localdomain as the first host entry
% ohpc_command sed -e 's_\({{$node.Id.Get}}{{end}}\)_{{$node.Id.Get}}.localdomain \1_g' -i /srv/warewulf/overlays/host/rootfs/etc/hosts.ww
% end_ohpc_run

% begin_ohpc_run
% ohpc_comment_header Complete basic Warewulf setup for master node \ref{sec:setup_ww}
\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true,keepspaces]
Expand All @@ -12,14 +18,17 @@
[sms](*\#*) perl -pi -e "s/ipaddr:.*/ipaddr: ${sms_ip}/" /etc/warewulf/warewulf.conf
[sms](*\#*) perl -pi -e "s/netmask:.*/netmask: ${internal_netmask}/" /etc/warewulf/warewulf.conf
[sms](*\#*) perl -pi -e "s/network:.*/network: ${internal_network}/" /etc/warewulf/warewulf.conf
[sms](*\#*) perl -pi -e 's/^(dhcp:.*)/$1\n template: static/' /etc/warewulf/warewulf.conf
[sms](*\#*) perl -pi -e 's/template:.*/template: static/' /etc/warewulf/warewulf.conf
[sms](*\#*) perl -pi -e "s/range start:.*/range start: ${c_ip[0]}/" /etc/warewulf/warewulf.conf
[sms](*\#*) perl -pi -e "s/range end:.*/range end: ${c_ip[$((num_computes-1))]}/" /etc/warewulf/warewulf.conf
[sms](*\#*) perl -pi -e "s/mount: false/mount: true/" /etc/warewulf/warewulf.conf

# Configure /etc/hostname on master and compute nodes
[sms](*\#*) perl -pi -e "s/warewulf/${sms_name}/" /srv/warewulf/overlays/host/etc/hosts.ww
[sms](*\#*) perl -pi -e "s/warewulf/${sms_name}/" /srv/warewulf/overlays/generic/etc/hosts.ww
[sms](*\#*) perl -pi -e "s/warewulf/${sms_name}/" /srv/warewulf/overlays/host/rootfs/etc/hosts.ww
[sms](*\#*) perl -pi -e "s/warewulf/${sms_name}/" /srv/warewulf/overlays/generic/rootfs/etc/hosts.ww

# Bugfix: dhcpd.template does not set next-server
[sms](*\#*) echo "next-server ${sms_ip};" >> /srv/warewulf/overlays/host/rootfs/etc/dhcpd.conf.ww

# Configuring Warewulf will restart/enable relevant services to support provisioning
[sms](*\#*) systemctl enable --now warewulfd
Expand Down
3 changes: 0 additions & 3 deletions docs/recipes/install/rocky9/x86_64/warewulf4/slurm/steps.tex
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ \subsubsection{Add \OHPC{} components} \label{sec:add_components}

# Include modules user environment
dnf -y install lmod-ohpc

# defer image rebuild
/bin/false
EOF
\end{lstlisting}
% end_ohpc_run
Expand Down

0 comments on commit b75e1a7

Please sign in to comment.