From ad05f74105189d30d3e4253742f467309b036aa7 Mon Sep 17 00:00:00 2001 From: Timothy Middelkoop Date: Thu, 17 Oct 2024 09:58:03 -0500 Subject: [PATCH] Copy Warewulf to Warewulf4 for development Signed-off-by: Timothy Middelkoop --- .../install/common/add_ww4_hosts_finalize.tex | 27 ++ .../install/common/add_ww4_hosts_intro.tex | 28 ++ .../install/common/add_ww4_hosts_slurm.tex | 9 + .../finalize_warewulf4_provisioning.tex | 74 ++++ .../install/common/import_ww4_files.tex | 14 + .../install/common/import_ww4_files_slurm.tex | 9 + .../install_provisioning_warewulf4_intro.tex | 21 ++ .../warewulf4_add_to_compute_chroot_intro.tex | 33 ++ .../common/warewulf4_mkchroot_rocky.tex | 48 +++ .../install/common/warewulf4_setup.tex | 15 + .../install/common/warewulf4_setup_centos.tex | 21 ++ .../rocky9/x86_64/warewulf4/slurm/Makefile | 24 ++ .../rocky9/x86_64/warewulf4/slurm/common | 1 + .../rocky9/x86_64/warewulf4/slurm/manifest | 1 + .../x86_64/warewulf4/slurm/manifest.tex | 1 + .../rocky9/x86_64/warewulf4/slurm/steps.tex | 322 ++++++++++++++++++ 16 files changed, 648 insertions(+) create mode 100644 docs/recipes/install/common/add_ww4_hosts_finalize.tex create mode 100644 docs/recipes/install/common/add_ww4_hosts_intro.tex create mode 100644 docs/recipes/install/common/add_ww4_hosts_slurm.tex create mode 100644 docs/recipes/install/common/finalize_warewulf4_provisioning.tex create mode 100644 docs/recipes/install/common/import_ww4_files.tex create mode 100644 docs/recipes/install/common/import_ww4_files_slurm.tex create mode 100644 docs/recipes/install/common/install_provisioning_warewulf4_intro.tex create mode 100644 docs/recipes/install/common/warewulf4_add_to_compute_chroot_intro.tex create mode 100644 docs/recipes/install/common/warewulf4_mkchroot_rocky.tex create mode 100644 docs/recipes/install/common/warewulf4_setup.tex create mode 100644 docs/recipes/install/common/warewulf4_setup_centos.tex create mode 100644 docs/recipes/install/rocky9/x86_64/warewulf4/slurm/Makefile create mode 120000 docs/recipes/install/rocky9/x86_64/warewulf4/slurm/common create mode 120000 docs/recipes/install/rocky9/x86_64/warewulf4/slurm/manifest create mode 120000 docs/recipes/install/rocky9/x86_64/warewulf4/slurm/manifest.tex create mode 100644 docs/recipes/install/rocky9/x86_64/warewulf4/slurm/steps.tex diff --git a/docs/recipes/install/common/add_ww4_hosts_finalize.tex b/docs/recipes/install/common/add_ww4_hosts_finalize.tex new file mode 100644 index 0000000000..960a4a1216 --- /dev/null +++ b/docs/recipes/install/common/add_ww4_hosts_finalize.tex @@ -0,0 +1,27 @@ +\iftoggleverb{isx86} +% ohpc_validation_newline +% ohpc_validation_comment Optionally, define IPoIB network settings (required if planning to mount Lustre over IB) +% ohpc_command if [[ ${enable_ipoib} -eq 1 ]];then +% ohpc_indent 5 +\begin{lstlisting}[language=bash,keywords={},upquote=true,basicstyle=\footnotesize\ttfamily] +# Optionally define IPoIB network settings (required if planning to mount Lustre/BeeGFS over IB) +[sms](*\#*) for ((i=0; i<$num_computes; i++)) ; do + wwsh -y node set ${c_name[$i]} -D ib0 --ipaddr=${c_ipoib[$i]} --netmask=${ipoib_netmask} + done +[sms](*\#*) wwsh -y provision set "${compute_regex}" --fileadd=ifcfg-ib0.ww +\end{lstlisting} +% ohpc_indent 0 +% ohpc_command fi +% ohpc_validation_newline +% end_ohpc_run +\fi + +\input{common/wwnodescan} + +% begin_ohpc_run +\begin{lstlisting}[language=bash,keywords={},upquote=true,basicstyle=\footnotesize\ttfamily] +# Restart dhcp / update PXE +[sms](*\#*) systemctl restart dhcpd +[sms](*\#*) wwsh pxe update +\end{lstlisting} +% end_ohpc_run diff --git a/docs/recipes/install/common/add_ww4_hosts_intro.tex b/docs/recipes/install/common/add_ww4_hosts_intro.tex new file mode 100644 index 0000000000..39b7bf0843 --- /dev/null +++ b/docs/recipes/install/common/add_ww4_hosts_intro.tex @@ -0,0 +1,28 @@ +%\iftoggle{isx86}{\clearpage} +% begin_ohpc_run +% ohpc_validation_comment Add hosts to cluster + +\begin{lstlisting}[language=bash,keywords={},upquote=true,basicstyle=\footnotesize\ttfamily,] +# Set provisioning interface as the default networking device +[sms](*\#*) echo "GATEWAYDEV=${eth_provision}" > /tmp/network.$$ +[sms](*\#*) wwsh -y file import /tmp/network.$$ --name network +[sms](*\#*) wwsh -y file set network --path /etc/sysconfig/network --mode=0644 --uid=0 + +# Add nodes to Warewulf data store +[sms](*\#*) for ((i=0; i<$num_computes; i++)) ; do + wwsh -y node new ${c_name[i]} --ipaddr=${c_ip[i]} --hwaddr=${c_mac[i]} -D ${eth_provision} + done +\end{lstlisting} +% end_ohpc_run + +%\iftoggle{isCentOS_ww_pbs_x86}{\clearpage} + +%\iftoggle{isSLES_ww_slurm_x86}{\clearpage} + +\begin{lstlisting}[language=bash,keywords={},upquote=true,basicstyle=\footnotesize\ttfamily] +# Additional step required if desiring to use predictable network interface +# naming schemes (e.g. en4s0f0). Skip if using eth# style names. +[sms](*\#*) export kargs="${kargs} net.ifnames=1,biosdevname=1" +[sms](*\#*) wwsh provision set --postnetdown=1 "${compute_regex}" +\end{lstlisting} + diff --git a/docs/recipes/install/common/add_ww4_hosts_slurm.tex b/docs/recipes/install/common/add_ww4_hosts_slurm.tex new file mode 100644 index 0000000000..a3e8c2a85b --- /dev/null +++ b/docs/recipes/install/common/add_ww4_hosts_slurm.tex @@ -0,0 +1,9 @@ +% begin_ohpc_run +% ohpc_validation_comment Add hosts to cluster (Cont.) +\begin{lstlisting}[language=bash,keywords={},upquote=true,basicstyle=\footnotesize\ttfamily,literate={BOSVER}{\baseos{}}1] +# Define provisioning image for hosts +[sms](*\#*) wwsh -y provision set "${compute_regex}" --vnfs=BOSVER --bootstrap=`uname -r` \ + --files=dynamic_hosts,passwd,group,shadow,munge.key,network +\end{lstlisting} + + diff --git a/docs/recipes/install/common/finalize_warewulf4_provisioning.tex b/docs/recipes/install/common/finalize_warewulf4_provisioning.tex new file mode 100644 index 0000000000..e258f052ba --- /dev/null +++ b/docs/recipes/install/common/finalize_warewulf4_provisioning.tex @@ -0,0 +1,74 @@ +\subsection{Finalizing provisioning configuration} \label{sec:assemble_bootstrap} + +\Warewulf{} employs a two-stage boot process for provisioning nodes via +creation of a bootstrap image that is used to initialize the process, and a virtual node +file system capsule containing the full system image. This section highlights +creation of the necessary provisioning images, followed by the registration of +desired compute nodes. + +\subsubsection{Assemble bootstrap image} + +The bootstrap image includes the runtime kernel and associated modules, as well +as some simple scripts to complete the provisioning process. The +following commands highlight the inclusion of additional drivers and creation +of the bootstrap image based on the running kernel. + +%\iftoggle{isCentOS_ww_slurm_aarch}{\clearpage} + +% begin_ohpc_run +% ohpc_comment_header Assemble bootstrap image \ref{sec:assemble_bootstrap} +\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true] +# (Optional) Include drivers from kernel updates; needed if enabling additional kernel modules on computes +[sms](*\#*) export WW_CONF=/etc/warewulf/bootstrap.conf +[sms](*\#*) echo "drivers += updates/kernel/" >> $WW_CONF + +# Build bootstrap image +[sms](*\#*) wwbootstrap `uname -r` +\end{lstlisting} +% end_ohpc_run + +\subsubsection{Assemble Virtual Node File System (VNFS) image} + +With the local site customizations in place, the following step uses the +\texttt{wwvnfs} command to assemble a VNFS capsule from the chroot environment +defined for the {\em compute} instance. + +% begin_ohpc_run +% ohpc_validation_comment Assemble VNFS +\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true] +[sms](*\#*) wwvnfs --chroot $CHROOT +\end{lstlisting} +% end_ohpc_run + +\iftoggle{isCentOS_ww_slurm_aarch}{\vspace*{0.4cm}} + +\iftoggle{isSLES_ww_slurm_aarch}{\vspace*{-0.1cm}} + +\subsubsection{Register nodes for provisioning} + +In preparation for provisioning, we can now define the desired network settings +for four example compute nodes with the underlying provisioning system and +restart the \texttt{dhcp} service. Note the use of variable names for the +desired compute hostnames, node IPs, and MAC addresses which should be modified +to accommodate local settings and hardware. By default, \Warewulf{} uses +network interface names of the \texttt{eth\#} variety and adds kernel boot +arguments to maintain this scheme on newer kernels. Consequently, when specifying +the desired provisioning interface via the \texttt{\$eth\_provision} variable, +it should follow this convention. Alternatively, if you prefer to use the +predictable network interface naming scheme (e.g. names like \texttt{en4s0f0}), +additional steps are included to alter the default kernel boot arguments and take +the \texttt{eth\#} named interface down after bootstrapping so the normal init +process can bring it up again using the desired name. + +\iftoggleverb{isx86} +Also included in these steps are commands +to enable \Warewulf{} to manage IPoIB settings and corresponding definitions of +IPoIB addresses for the compute nodes. This is typically optional unless you +are planning to include a \Lustre{} client mount over \InfiniBand{}. +\fi +The final step +in this process associates the VNFS image assembled in previous steps with the +newly defined compute nodes, utilizing the user credential files and munge key +that were imported in \S\ref{sec:file_import}. + + diff --git a/docs/recipes/install/common/import_ww4_files.tex b/docs/recipes/install/common/import_ww4_files.tex new file mode 100644 index 0000000000..47d668d6f7 --- /dev/null +++ b/docs/recipes/install/common/import_ww4_files.tex @@ -0,0 +1,14 @@ +The \Warewulf{} system includes functionality to import arbitrary files from +the provisioning server for distribution to managed hosts. This is one way to +distribute user credentials to {\em compute} nodes. To import local file-based +credentials, issue the following: + +% begin_ohpc_run +% ohpc_comment_header Import files \ref{sec:file_import} +\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true] +[sms](*\#*) wwsh file import /etc/passwd +[sms](*\#*) wwsh file import /etc/group +[sms](*\#*) wwsh file import /etc/shadow + +\end{lstlisting} +% \end_ohpc_run diff --git a/docs/recipes/install/common/import_ww4_files_slurm.tex b/docs/recipes/install/common/import_ww4_files_slurm.tex new file mode 100644 index 0000000000..0ef06cf29f --- /dev/null +++ b/docs/recipes/install/common/import_ww4_files_slurm.tex @@ -0,0 +1,9 @@ +\noindent Similarly, to import the cryptographic +key that is required by the {\em munge} authentication library to be available +on every host in the resource management pool, issue the following: + +% begin_ohpc_run +\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true] +[sms](*\#*) wwsh file import /etc/munge/munge.key +\end{lstlisting} +% \end_ohpc_run diff --git a/docs/recipes/install/common/install_provisioning_warewulf4_intro.tex b/docs/recipes/install/common/install_provisioning_warewulf4_intro.tex new file mode 100644 index 0000000000..e8a076383f --- /dev/null +++ b/docs/recipes/install/common/install_provisioning_warewulf4_intro.tex @@ -0,0 +1,21 @@ +With the \OHPC{} repository enabled, we can now begin adding desired components onto the +{\em master} server. This repository provides a number of aliases that group +logical components together in order to help aid in this process. For +reference, a complete list of available group aliases and RPM packages available +via \OHPC{} are provided in Appendix~\ref{appendix:manifest}. To add +support for provisioning services, the following commands illustrate addition +of a common base package followed by the Warewulf provisioning system. + +%\nottoggle{isCentOS}{\clearpage} + +% begin_ohpc_run +% ohpc_comment_header Add baseline OpenHPC and provisioning services \ref{sec:add_provisioning} +\begin{lstlisting}[language=bash,keywords={}] +# Install base meta-packages +[sms](*\#*) (*\install*) ohpc-base +[sms](*\#*) (*\install*) ohpc-warewulf +[sms](*\#*) (*\install*) hwloc-ohpc +\end{lstlisting} +% end_ohpc_run + + diff --git a/docs/recipes/install/common/warewulf4_add_to_compute_chroot_intro.tex b/docs/recipes/install/common/warewulf4_add_to_compute_chroot_intro.tex new file mode 100644 index 0000000000..592d1e0618 --- /dev/null +++ b/docs/recipes/install/common/warewulf4_add_to_compute_chroot_intro.tex @@ -0,0 +1,33 @@ +The \texttt{wwmkchroot} process used in the previous step is designed to +provide a minimal \baseOS{} configuration. Next, we add additional components +to include resource management client services, NTP support, and +other additional packages to support the default \OHPC{} environment. This +process augments the chroot-based install performed by \texttt{wwmkchroot} to +modify the base provisioning image and will access the BOS and \OHPC{} +repositories to resolve package install requests. We begin by installing a few +common base packages: + +% begin_ohpc_run +% ohpc_comment_header Add OpenHPC base components to compute image \ref{sec:add_components} +\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true] +# Install compute node base meta-package +[sms](*\#*) (*\chrootinstall*) ohpc-base-compute +\end{lstlisting} +% end_ohpc_run + +To access the remote +repositories by hostname (and not IP addresses), the chroot environment needs +to be updated to enable DNS resolution. Assuming that the {\em master} host has +a working DNS configuration in place, the chroot environment can be updated +with a copy of the configuration as follows: + +% begin_ohpc_run +% ohpc_comment_header Add OpenHPC components to compute image \ref{sec:add_components} +\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true] +[sms](*\#*) cp -p /etc/resolv.conf $CHROOT/etc/resolv.conf +\end{lstlisting} +% end_ohpc_run + +\noindent Now, we can include additional required components to the compute +instance including resource manager client, NTP, and development environment modules support. + diff --git a/docs/recipes/install/common/warewulf4_mkchroot_rocky.tex b/docs/recipes/install/common/warewulf4_mkchroot_rocky.tex new file mode 100644 index 0000000000..b3cc70d423 --- /dev/null +++ b/docs/recipes/install/common/warewulf4_mkchroot_rocky.tex @@ -0,0 +1,48 @@ +With the provisioning services enabled, the next step is to define and +customize a system image that can subsequently be used to provision one or more +{\em compute} nodes. The following subsections highlight this process. + +\subsubsection{Build initial BOS image} \label{sec:assemble_bos} +The \OHPC{} build of \Warewulf{} includes specific enhancements enabling support for +\baseOS{}. The following steps illustrate the process to build a minimal, default +image for use with \Warewulf{}. We begin by defining a directory structure on the +{\em master} host that will represent the root filesystem of the compute node. The +default location for this example is in +\texttt{/opt/ohpc/admin/images/\baseos{}}. + +\begin{center} + \begin{tcolorbox}[] + \small \Warewulf{} is configured by default to access an external + repository (download.rockylinux.org) during the \texttt{wwmkchroot} process. If + the master host cannot reach the public Rocky mirrors, or if you prefer to + access a locally cached mirror, set the \texttt{\$\{YUM\_MIRROR\}} + environment variable to your desired repo location {\em prior} to running + the \texttt{wwmkchroot} command below. For example: + +% begin_ohpc_run +% ohpc_command if [ ! -z ${BOS_MIRROR+x} ]; then +% ohpc_indent 5 +\begin{lstlisting}[language=bash,keywords={}] +# Override default OS repository (optional) - set YUM_MIRROR variable to desired repo location +[sms](*\#*) export YUM_MIRROR=${BOS_MIRROR} +\end{lstlisting} +% ohpc_indent 0 +% ohpc_command fi +% end_ohpc_run + +\end{tcolorbox} +\end{center} + +% begin_ohpc_run +% ohpc_comment_header Create compute image for Warewulf \ref{sec:assemble_bos} +\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true,keepspaces,literate={BOSVER}{\baseos{}}1] +# Define chroot location +[sms](*\#*) export CHROOT=/opt/ohpc/admin/images/BOSVER + +# Build initial chroot image +[sms](*\#*) wwmkchroot -v rocky-9 $CHROOT +# Enable OpenHPC and EPEL repos inside chroot +[sms](*\#*) dnf -y --installroot $CHROOT install epel-release +[sms](*\#*) cp -p /etc/yum.repos.d/OpenHPC*.repo $CHROOT/etc/yum.repos.d +\end{lstlisting} +% end_ohpc_run diff --git a/docs/recipes/install/common/warewulf4_setup.tex b/docs/recipes/install/common/warewulf4_setup.tex new file mode 100644 index 0000000000..0f199c3539 --- /dev/null +++ b/docs/recipes/install/common/warewulf4_setup.tex @@ -0,0 +1,15 @@ +At this point, all of the packages necessary to use \Warewulf{} on the {\em +master} host should be installed. Next, we need to update several +configuration files in order to allow \Warewulf{} to work with \baseOS{} and to +support local provisioning using a second private interface (refer to +Figure~\ref{fig:physical_arch}). +%\vspace*{-0.05cm} +\begin{center} +\begin{tcolorbox}[] +\small +By default, \Warewulf{} is configured to +provision over the \texttt{eth1} interface and the steps below include updating +this setting to override with a potentially alternatively-named interface specified by +\texttt{\$\{sms\_eth\_internal\}}. +\end{tcolorbox} +\end{center} diff --git a/docs/recipes/install/common/warewulf4_setup_centos.tex b/docs/recipes/install/common/warewulf4_setup_centos.tex new file mode 100644 index 0000000000..5b533e9154 --- /dev/null +++ b/docs/recipes/install/common/warewulf4_setup_centos.tex @@ -0,0 +1,21 @@ +% begin_ohpc_run +% ohpc_comment_header Complete basic Warewulf setup for master node \ref{sec:setup_ww} +%\begin{verbatim} + +\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true,keepspaces] +# Configure Warewulf provisioning to use desired internal interface +[sms](*\#*) perl -pi -e "s/device = eth1/device = ${sms_eth_internal}/" /etc/warewulf/provision.conf + +# Enable internal interface for provisioning +[sms](*\#*) ip link set dev ${sms_eth_internal} up +[sms](*\#*) ip address add ${sms_ip}/${internal_netmask} broadcast + dev ${sms_eth_internal} + +# Restart/enable relevant services to support provisioning +[sms](*\#*) systemctl enable httpd.service +[sms](*\#*) systemctl restart httpd +[sms](*\#*) systemctl enable dhcpd.service +[sms](*\#*) systemctl enable tftp.socket +[sms](*\#*) systemctl start tftp.socket +\end{lstlisting} +%\end{verbatim} +% end_ohpc_run diff --git a/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/Makefile b/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/Makefile new file mode 100644 index 0000000000..b8bc9fcb21 --- /dev/null +++ b/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/Makefile @@ -0,0 +1,24 @@ +PAPER := steps.pdf +TEX_SUFS := .aux .log .nav .out .snm .toc .vrb .fdb_latexmk .bbl .blg .fls +GITID := $(shell git describe 2> /dev/null) + +#$(info $$GITID is [${GITID}]) + + +%.pdf:%.tex steps.tex manifest.tex $(wildcard common/*.tex common/ohpc-doc.sty common/base_edition/*.tex common/figures/*.pdf manifest/*.tex) +ifdef GITID + common/vc +else + test -s vc.tex || { echo "vc.tex file does not exist (and this is not a git repo)!"; exit 1; } +endif + latexmk -pdf $< + +all: $(PAPER) + +clean: + $(RM) $(foreach suf, ${TEX_SUFS}, $(PAPER:.pdf=${suf})) +ifdef GITID + $(RM) vc.tex +endif + $(RM) $(PAPER) + diff --git a/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/common b/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/common new file mode 120000 index 0000000000..3f6330a4b5 --- /dev/null +++ b/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/common @@ -0,0 +1 @@ +../../../../common/ \ No newline at end of file diff --git a/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/manifest b/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/manifest new file mode 120000 index 0000000000..29057155d1 --- /dev/null +++ b/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/manifest @@ -0,0 +1 @@ +../../warewulf/slurm/manifest \ No newline at end of file diff --git a/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/manifest.tex b/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/manifest.tex new file mode 120000 index 0000000000..9417c314c9 --- /dev/null +++ b/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/manifest.tex @@ -0,0 +1 @@ +../../warewulf/slurm/manifest.tex \ No newline at end of file diff --git a/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/steps.tex b/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/steps.tex new file mode 100644 index 0000000000..fbdd040118 --- /dev/null +++ b/docs/recipes/install/rocky9/x86_64/warewulf4/slurm/steps.tex @@ -0,0 +1,322 @@ +\documentclass[letterpaper]{article} +\usepackage{common/ohpc-doc} +\setcounter{secnumdepth}{5} +\setcounter{tocdepth}{5} + +% Include git variables +\input{vc.tex} + +% Define Base OS and other local macros +\newcommand{\baseOS}{Rocky 9.3} +\newcommand{\OSRepo}{Rocky\_9.3} +\newcommand{\OSTree}{EL\_9} +\newcommand{\OSTag}{el9} +\newcommand{\baseos}{rocky9.3} +\newcommand{\baseosshort}{rocky9} +\newcommand{\provisioner}{Warewulf} +\newcommand{\provheader}{\provisioner{}} +\newcommand{\rms}{SLURM} +\newcommand{\rmsshort}{slurm} +\newcommand{\arch}{x86\_64} + +% Define package manager commands +\newcommand{\pkgmgr}{dnf} +\newcommand{\addrepo}{wget -P /etc/yum.repos.d} +\newcommand{\chrootaddrepo}{wget -P \$CHROOT/etc/yum.repos.d} +\newcommand{\clean}{dnf clean expire-cache} +\newcommand{\chrootclean}{dnf --installroot=\$CHROOT clean expire-cache} +\newcommand{\install}{dnf -y install} +\newcommand{\chrootinstall}{dnf -y --installroot=\$CHROOT install} +\newcommand{\groupinstall}{dnf -y groupinstall} +\newcommand{\groupchrootinstall}{dnf -y --installroot=\$CHROOT groupinstall} +\newcommand{\remove}{dnf -y remove} +\newcommand{\upgrade}{dnf -y upgrade} +\newcommand{\chrootupgrade}{dnf -y --installroot=\$CHROOT upgrade} +\newcommand{\tftppkg}{syslinux-tftpboot} +\newcommand{\beegfsrepo}{https://www.beegfs.io/release/beegfs\_7.2.1/dists/beegfs-rhel8.repo} + +% boolean for os-specific formatting +\toggletrue{isCentOS} +\toggletrue{isCentOS_ww_slurm_x86} +\toggletrue{isSLURM} +\toggletrue{isWarewulf} +\toggletrue{isx86} +\toggletrue{isCentOS_x86} + +\begin{document} +\graphicspath{{common/figures/}} +\thispagestyle{empty} + +% Title Page +\input{common/title} +% Disclaimer +\input{common/legal} + +\newpage +\tableofcontents +\newpage + +% Introduction -------------------------------------------------- + +\section{Introduction} \label{sec:introduction} +\input{common/install_header} +\input{common/intro} \\ + +\input{common/base_edition/edition} +\input{common/audience} +\input{common/requirements} +\input{common/inputs} + +% begin_ohpc_run +% ohpc_validation_newline +% ohpc_validation_comment Verify OpenHPC repository has been enabled before proceeding +% ohpc_validation_newline +% ohpc_command dnf repolist | grep -q OpenHPC +% ohpc_command if [ $? -ne 0 ];then +% ohpc_command echo "Error: OpenHPC repository must be enabled locally" +% ohpc_command exit 1 +% ohpc_command fi +% end_ohpc_run + +% Base Operating System -------------------------------------------- + +\section{Install Base Operating System (BOS)} +\input{common/bos} + +%\clearpage +% begin_ohpc_run +% ohpc_validation_newline +% ohpc_validation_comment Disable firewall +\begin{lstlisting}[language=bash,keywords={}] +[sms](*\#*) systemctl disable firewalld +[sms](*\#*) systemctl stop firewalld +\end{lstlisting} +% end_ohpc_run + +% ------------------------------------------------------------------ + +\section{Install \OHPC{} Components} \label{sec:basic_install} +\input{common/install_ohpc_components_intro.tex} + +\subsection{Enable \OHPC{} repository for local use} \label{sec:enable_repo} +\input{common/enable_ohpc_repo} +\input{common/rocky_repos} +\input{common/automation} + + +\subsection{Add provisioning services on {\em master} node} \label{sec:add_provisioning} +\input{common/install_provisioning_intro} +\input{common/enable_pxe} +\input{common/time} + +\vspace*{0.15cm} +\subsection{Add resource management services on {\em master} node} \label{sec:add_rm} +\input{common/install_slurm} + +\subsection{Optionally add \InfiniBand{} support services on {\em master} node} \label{sec:add_ofed} +\input{common/ibsupport_sms_centos} + +\subsection{Optionally add \OmniPath{} support services on {\em master} node} \label{sec:add_opa} +\input{common/opasupport_sms_centos} + +\vspace*{-0.15cm} +\subsection{Complete basic Warewulf setup for {\em master} node} \label{sec:setup_ww} +\input{common/warewulf_setup} +\input{common/warewulf_setup_centos} + + +\subsection{Define {\em compute} image for provisioning} +\input{common/warewulf_mkchroot_rocky} + +\subsubsection{Add \OHPC{} components} \label{sec:add_components} +\input{common/add_to_compute_chroot_intro} + +%\newpage +% begin_ohpc_run +% ohpc_validation_comment Add SLURM and other components to compute instance +\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true] +# copy credential files into $CHROOT to ensure consistent uid/gids for slurm/munge at +# install. Note that these will be synchronized with future updates via the provisioning system. +[sms](*\#*) cp /etc/passwd /etc/group $CHROOT/etc + +# Add Slurm client support meta-package and enable munge and slurmd +[sms](*\#*) (*\chrootinstall*) ohpc-slurm-client +[sms](*\#*) chroot $CHROOT systemctl enable munge +[sms](*\#*) chroot $CHROOT systemctl enable slurmd + +# Register Slurm server with computes (using "configless" option) +[sms](*\#*) echo SLURMD_OPTIONS="--conf-server ${sms_ip}" > $CHROOT/etc/sysconfig/slurmd + +# Add Network Time Protocol (NTP) support +[sms](*\#*) (*\chrootinstall*) chrony +# Identify master host as local NTP server +[sms](*\#*) echo "server ${sms_ip} iburst" >> $CHROOT/etc/chrony.conf + +# Add kernel drivers (matching kernel version on SMS node) +[sms](*\#*) (*\chrootinstall*) kernel-`uname -r` + +# Include modules user environment +[sms](*\#*) (*\chrootinstall*) lmod-ohpc +\end{lstlisting} +% end_ohpc_run + +\vspace*{.2cm} +\subsubsection{Customize system configuration} \label{sec:master_customization} +\input{common/warewulf_chroot_customize_centos} +\input{common/oneapi_mountpoint} +\input{common/restart_nfs} + +% Additional commands when additional computes are requested + +% begin_ohpc_run +% ohpc_validation_newline +% ohpc_validation_comment Update basic slurm configuration if additional computes defined +% ohpc_command if [ ${num_computes} -gt 4 ];then +% ohpc_command perl -pi -e "s/^NodeName=(\S+)/NodeName=${compute_prefix}[1-${num_computes}]/" /etc/slurm/slurm.conf +% ohpc_command perl -pi -e "s/^PartitionName=normal Nodes=(\S+)/PartitionName=normal Nodes=${compute_prefix}[1-${num_computes}]/" /etc/slurm/slurm.conf + +% ohpc_command fi +% end_ohpc_run + +%\clearpage +\subsubsection{Additional Customization ({\em optional})} \label{sec:addl_customizations} +\input{common/compute_customizations_intro} + +%\clearpage +\paragraph{Enable \InfiniBand{} drivers} +\input{common/ibsupport_compute_centos.tex} + +\paragraph{Enable \OmniPath{} drivers} +\input{common/opasupport_compute_centos.tex} + +\vspace*{0.28cm} +\paragraph{Increase locked memory limits} +\input{common/memlimits} + +\vspace*{-.17cm} +\paragraph{Enable ssh control via resource manager} +\input{common/slurm_pam} + +\vspace*{-.17cm} +\paragraph{Add \beegfs{}} \label{sec:add_beegfs} +\input{common/install_beegfs_client_centos} + +\paragraph{Add \Lustre{} client} \label{sec:lustre_client} +\input{common/lustre-client} +%\vspace*{0.25cm} +\input{common/lustre-client-centos} +\input{common/lustre-client-post} + +%\vspace*{.45cm} +\paragraph{Enable forwarding of system logs} \label{sec:add_syslog} +\input{common/syslog} + +\paragraph{Add \clustershell{}} +\input{common/clustershell} + +\paragraph{Add \genders{}} +\input{common/genders} + +\paragraph{Add Magpie} +\input{common/magpie} + +\paragraph{Add \conman{}} \label{sec:add_conman} +\input{common/conman} + +\paragraph{Add \nhc{}} \label{sec:add_nhc} +\input{common/nhc} +\input{common/nhc_slurm} + +\vspace*{0.3cm} +\paragraph{Add \GEOPM{}} \label{sec:add_geopm} +\input{common/geopm_config} + +%\clearpage +\subsubsection{Import files} \label{sec:file_import} +\input{common/import_ww_files} +%\vspace*{0.3cm} +\input{common/import_ww_files_slurm} +\input{common/import_ww_files_ib_centos} +%\vspace*{0.3cm} +\input{common/finalize_provisioning} +%\vspace*{0.2cm} +\input{common/add_ww_hosts_intro} +\input{common/add_ww_hosts_slurm} +\input{common/add_ww_hosts_finalize} + +%\clearpage +\subsubsection{Optional kernel arguments} \label{sec:optional_kargs} +\input{common/charliecloud_centos_warewulf_post} +\input{common/conman_post} +\input{common/kargs_post} + +\vspace*{-0.1cm} +\subsubsection{Optionally configure stateful provisioning} +\input{common/stateful} + +%\vspace*{-0.4cm} +\clearpage +\subsection{Boot compute nodes} \label{sec:boot_computes} +\input{common/reset_computes} + +%\clearpage +\section{Install \OHPC{} Development Components} +\input{common/dev_intro.tex} + +%\vspace*{-0.15cm} +\subsection{Development Tools} \label{sec:install_dev_tools} +\input{common/dev_tools} + +\vspace*{-0.15cm} +\subsection{Compilers} \label{sec:install_compilers} +\input{common/compilers} + +%\clearpage +\subsection{MPI Stacks} \label{sec:mpi} +\input{common/mpi_slurm} + +\subsection{Performance Tools} \label{sec:install_perf_tools} +\input{common/perf_tools_with_geopm} + +\subsection{Setup default development environment} +\input{common/default_dev} + +\vspace*{0.3cm} +\subsection{3rd Party Libraries and Tools} \label{sec:3rdparty} +\input{common/third_party_libs_intro} +\input{common/third_party_libs_petsc_centos} +\input{common/third_party_libs} +\vspace*{0.1cm} +\input{common/third_party_mpi_libs_x86} +\vspace*{0.5cm} +\subsection{Optional Development Tool Builds} \label{sec:3rdparty_intel} +\input{common/oneapi_enabled_builds_slurm.tex} + +\clearpage +\section{Resource Manager Startup} \label{sec:rms_startup} +\input{common/slurm_startup} + +\section{Post-boot compute node configuration} \label{sec:post_boot} +\input{common/post_boot} + +\section{Run a Test Job} \label{sec:test_job} +\input{common/slurm_test_job} + +\clearpage +\appendix +%\section*{Appendices} +{\bf \LARGE \centerline{Appendices}} \vspace*{0.2cm} + +\addcontentsline{toc}{section}{Appendices} +\renewcommand{\thesubsection}{\Alph{subsection}} + +\input{common/automation_appendix} +\input{common/upgrade} +\input{common/test_suite} +\input{common/customization_appendix_centos} +\input{manifest} +\input{common/signature} + + +\end{document} +