Skip to content

Commit 8e2f91b

Browse files
MiddelkoopTadrianreber
authored andcommitted
Add default networking to node profiles
* Add netmask, gateway, and dns at the node profile level * Add internal_network, ipv4_gateway, dns_servers across input.local.template and inputs.tex Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
1 parent 1203424 commit 8e2f91b

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

docs/recipes/install/common/add_ww4_hosts_intro.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
\begin{lstlisting}[language=bash,keywords={},upquote=true,basicstyle=\footnotesize\ttfamily,literate={BOSVER}{\baseos{}}1]
55
[sms](*\#*) for ((i=0; i<$num_computes; i++)) ; do
66
wwctl node add --container=rocky-9.4 \
7-
--ipaddr=${c_ip[$i]} --hwaddr=${c_mac[$i]} --netmask=${internal_netmask} ${c_name[i]}
7+
--ipaddr=${c_ip[$i]} --hwaddr=${c_mac[$i]} ${c_name[i]}
88
done
99
\end{lstlisting}
1010
% end_ohpc_run

docs/recipes/install/common/inputs.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ \subsection{Inputs} \label{sec:inputs}
2222
\fi
2323
& \texttt{\$\{internal\_network\}} & {\small \# Subnet network address for internal network} \\
2424
& \texttt{\$\{internal\_netmask\}} & {\small \# Subnet netmask for internal network} \\
25+
\iftoggleverb{isWarewulf4}
26+
& \texttt{\$\{ipv4\_gateway\}} & {\small \# Default gateway for the internal network} \\
27+
& \texttt{\$\{dns\_servers\}} & {\small \# DNS resolver for the internal network} \\
28+
\fi
2529
& \texttt{\$\{ntp\_server\}} & {\small \# Local ntp server for time synchronization} \\
2630
& \texttt{\$\{bmc\_username\}} & {\small \# BMC username for use by IPMI} \\
2731
& \texttt{\$\{bmc\_password\}} & {\small \# BMC password for use by IPMI} \\

docs/recipes/install/common/install_provisioning_warewulf4_intro.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
% ohpc_comment_header Add baseline OpenHPC and provisioning services \ref{sec:add_provisioning}
1414
\begin{lstlisting}[language=bash,keywords={}]
1515
# Install base packages
16-
[sms](*\#*) (*\install*) ohpc-base warewulf-ohpc hwloc-ohpc netmask
16+
[sms](*\#*) (*\install*) ohpc-base warewulf-ohpc hwloc-ohpc
1717
\end{lstlisting}
1818
% end_ohpc_run
1919

docs/recipes/install/common/warewulf4_setup_centos.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
[sms](*\#*) ip link set dev ${sms_eth_internal} up
66
[sms](*\#*) ip address add ${sms_ip}/${internal_netmask} broadcast + dev ${sms_eth_internal}
77

8-
# Compute the network address for the internal network
9-
[sms](*\#*) internal_cidr=$(netmask ${sms_ip}/${internal_netmask})
10-
[sms](*\#*) internal_network=${internal_cidr%/*}
11-
128
# Edit the warewulf.conf file to use appropriate interface and settings
139
[sms](*\#*) perl -pi -e "s/ipaddr:.*/ipaddr: ${sms_ip}/" /etc/warewulf/warewulf.conf
1410
[sms](*\#*) perl -pi -e "s/netmask:.*/netmask: ${internal_netmask}/" /etc/warewulf/warewulf.conf
@@ -18,6 +14,11 @@
1814
[sms](*\#*) perl -pi -e "s/range end:.*/range end: ${c_ip[$((num_computes-1))]}/" /etc/warewulf/warewulf.conf
1915
[sms](*\#*) perl -pi -e "s/mount: false/mount: true/" /etc/warewulf/warewulf.conf
2016

17+
# Set default network configuration
18+
[sms](*\#*) wwctl profile set -y default --netmask=${internal_netmask}
19+
[sms](*\#*) wwctl profile set -y default --gateway=${ipv4_gateway}
20+
[sms](*\#*) wwctl profile set -y default --netdev=default --nettagadd=DNS=${dns_servers}
21+
2122
# Configure /etc/hostname on master and compute nodes
2223
[sms](*\#*) perl -pi -e "s/warewulf/${sms_name}/" /srv/warewulf/overlays/host/rootfs/etc/hosts.ww
2324
[sms](*\#*) perl -pi -e "s/warewulf/${sms_name}/" /srv/warewulf/overlays/generic/rootfs/etc/hosts.ww

docs/recipes/install/rocky9/input.local.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ sms_eth_internal="${sms_eth_internal:-eth1}"
2121
# Subnet netmask for internal cluster network
2222
internal_netmask="${internal_netmask:-255.255.0.0}"
2323

24+
# Subnet network for internal cluster network
25+
internal_network="${internal_network:-172.16.0.0}"
26+
2427
# ipv4 gateway
2528
ipv4_gateway="${ipv4_gateway:-172.16.0.2}"
2629

0 commit comments

Comments
 (0)