Skip to content

Commit

Permalink
Update main docs
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 17, 2024
1 parent 9dad5ec commit f21e269
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 1 deletion.
18 changes: 18 additions & 0 deletions static/docs/main/_sources/contents/nodeconfig.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,24 @@ To configure a bonded (link aggreagtion) network interface the following command
Note: the netnames of the member interterfaces need to match the "netname" of the bonded interface until the first "_" (in the example bond0)


Additional networks
-------------------

Additional networks for the node can also be configured.
You will have provide all the necessary network information.

.. code-block:: shell
wwctl node set \
--netdev ib0 \
--hwaddr aa:bb:cc:dd:ee:ff \
--ipaddr 10.0.20.1 \
--netmask 255.255.252.0 \
--netname iband \
--type infiniband \
n001
Node Discovery
--------------

Expand Down
111 changes: 111 additions & 0 deletions static/docs/main/_sources/contents/setup.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,114 @@ Here is an example of how the cluster's address can be divided for a
* ``10.0.2.1 - 10.0.2.255``: Static node addresses
* ``10.0.3.1 - 10.0.3.255``: IPMI and/or out of band addresses for the
compute nodes

Multiple networks
=================

It is possible to configure several networks not just for the nodes but also for the management of ``dhcpd`` and ``tftp``.
There are two ways to achive this:

1. Add the networks to the templates of ``dhcpd`` and/or the ``dnsmasq`` template directly.
2. Add the networks to a dummy node and change the templates of ``dhcp`` and ``dnsmasq`` accordingly.

As the first solution is trivial only the second way is described in the following lines.

As first the first step, add the dummy node.

.. code-block:: shell
wwctl node add deliverynet
Now you will have to add the delivery networks to this node.

.. code-block:: shell
wwctl node set \
--ipaddr 10.0.20.250 \
--netmask 255.255.255.0 \
--netname deliver1 \
--nettagadd network=10.0.20.0,dynstart=10.10.20.10,dynend=10.10.20.50 \
deliverynet
wwctl node set \
--ipaddr 10.0.30.250 \
--netmask 255.255.255.0 \
--netname deliver2 \
--nettagadd network=10.0.30.0,dynstart=10.10.30.10,dynend=10.10.30.50 \
deliverynet
The ip address is used as the network address of host in the delivery network and an additional tags is used for definition of the network itself and the dynamic dhcp range.
You can check the result with ``wwctl node list``.

.. code-block:: console
# wwctl node list -a deliverynet
NODE FIELD PROFILE VALUE
deliverynet Id -- deliverynet
deliverynet Comment default This profile is automatically included for each node
deliverynet ContainerName default leap15.5
deliverynet Ipxe -- (default)
deliverynet RuntimeOverlay -- (generic)
deliverynet SystemOverlay -- (wwinit)
deliverynet Root -- (initramfs)
deliverynet Init -- (/sbin/init)
deliverynet Kernel.Args -- (quiet crashkernel=no vga=791 net.naming-scheme=v238)
deliverynet Profiles -- default
deliverynet PrimaryNetDev -- (deliver1)
deliverynet NetDevs[deliver2].Type -- (ethernet)
deliverynet NetDevs[deliver2].OnBoot -- (true)
deliverynet NetDevs[deliver2].Ipaddr -- 10.0.30.250
deliverynet NetDevs[deliver2].Netmask -- 255.255.255.0
deliverynet NetDevs[deliver2].Tags[dynend] -- 10.10.30.50
deliverynet NetDevs[deliver2].Tags[dynstart] -- 10.10.30.10
deliverynet NetDevs[deliver2].Tags[network] -- 10.0.30.0
deliverynet NetDevs[deliver1].Type -- (ethernet)
deliverynet NetDevs[deliver1].OnBoot -- (true)
deliverynet NetDevs[deliver1].Ipaddr -- 10.0.20.250
deliverynet NetDevs[deliver1].Netmask -- 255.255.255.0
deliverynet NetDevs[deliver1].Primary -- (true)
deliverynet NetDevs[deliver1].Tags[network] -- 10.0.20.0
deliverynet NetDevs[deliver1].Tags[dynend] -- 10.10.20.50
deliverynet NetDevs[deliver1].Tags[dynstart] -- 10.10.20.10
Now the templates of ``dhcpd`` and/or ``dnsmasq`` must be modified.
You can edit the configuration files.

.. code-block:: shell
wwctl overlay edit host etc/dhcpd.conf.ww
wwctl overlay edit host etc/dnsmasq.d/ww4-hosts.ww
For the ``dhcp`` template you should add following lines

.. code-block::
{{/* multiple networks */}}
{{- range $node := $.AllNodes}}
{{- if eq $node.Id.Get "deliverynet" }}
{{- range $netname, $netdev := $node.NetDevs}}
# network {{ $netname }}
subnet {{$netdev.Tags.network.Get}} netmask {{$netdev.Netmask.Get}} {
max-lease-time 120;
range {{$netdev.Tags.dynstart.Get}} {{$netdev.Tags.dynend.Get}};
next-server {{$netdev.Ipaddr.Get}};
}
{{- end }}
{{- end }}
{{- end }}
and for the ``dnsmasq`` the following lines should be added

.. code-block::
{{/* multiple networks */}}
{{- range $node := $.AllNodes}}
{{- if eq $node.Id.Get "deliverynet" }}
{{- range $netname, $netdev := $node.NetDevs}}
# network {{ $netname }}
dhcp-range={{$netdev.Tags.dynstart.Get}},{{$netdev.Tags.dynend.Get}},{{$netdev.Netmask.Get}},6h
{{- end }}
{{- end }}
{{- end }}
Note that the ``{{- if eq $node.Id.Get "deliverynet" }}`` is used to identify the dummy host which carries the network information.
16 changes: 16 additions & 0 deletions static/docs/main/contents/nodeconfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<li class="toctree-l2"><a class="reference internal" href="#configuring-the-node-s-container-image">Configuring the Node’s Container Image</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#configuring-the-node-s-kernel">Configuring the Node’s Kernel</a></li>
<li class="toctree-l3"><a class="reference internal" href="#configuring-the-node-s-network">Configuring the Node’s Network</a></li>
<li class="toctree-l3"><a class="reference internal" href="#additional-networks">Additional networks</a></li>
<li class="toctree-l3"><a class="reference internal" href="#node-discovery">Node Discovery</a></li>
</ul>
</li>
Expand Down Expand Up @@ -341,6 +342,21 @@ <h3>Configuring the Node’s Network<a class="headerlink" href="#configuring-the
</div>
<p>Note: the netnames of the member interterfaces need to match the “netname” of the bonded interface until the first “_” (in the example bond0)</p>
</section>
<section id="additional-networks">
<h3>Additional networks<a class="headerlink" href="#additional-networks" title="Link to this heading"></a></h3>
<p>Additional networks for the node can also be configured.
You will have provide all the necessary network information.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>wwctl<span class="w"> </span>node<span class="w"> </span><span class="nb">set</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--netdev<span class="w"> </span>ib0<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--hwaddr<span class="w"> </span>aa:bb:cc:dd:ee:ff<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ipaddr<span class="w"> </span><span class="m">10</span>.0.20.1<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--netmask<span class="w"> </span><span class="m">255</span>.255.252.0<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--netname<span class="w"> </span>iband<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--type<span class="w"> </span>infiniband<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>n001
</pre></div>
</div>
</section>
<section id="node-discovery">
<h3>Node Discovery<a class="headerlink" href="#node-discovery" title="Link to this heading"></a></h3>
<p>The hwaddr of a node can be automatically discovered by setting
Expand Down
98 changes: 98 additions & 0 deletions static/docs/main/contents/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<li class="toctree-l2"><a class="reference internal" href="#operating-system-installation">Operating System Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#network">Network</a></li>
<li class="toctree-l2"><a class="reference internal" href="#addressing">Addressing</a></li>
<li class="toctree-l2"><a class="reference internal" href="#multiple-networks">Multiple networks</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Warewulf Installation</a></li>
Expand Down Expand Up @@ -183,6 +184,103 @@ <h2>Addressing<a class="headerlink" href="#addressing" title="Link to this headi
compute nodes</p></li>
</ul>
</section>
<section id="multiple-networks">
<h2>Multiple networks<a class="headerlink" href="#multiple-networks" title="Link to this heading"></a></h2>
<p>It is possible to configure several networks not just for the nodes but also for the management of <code class="docutils literal notranslate"><span class="pre">dhcpd</span></code> and <code class="docutils literal notranslate"><span class="pre">tftp</span></code>.
There are two ways to achive this:</p>
<ol class="arabic simple">
<li><p>Add the networks to the templates of <code class="docutils literal notranslate"><span class="pre">dhcpd</span></code> and/or the <code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code> template directly.</p></li>
<li><p>Add the networks to a dummy node and change the templates of <code class="docutils literal notranslate"><span class="pre">dhcp</span></code> and <code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code> accordingly.</p></li>
</ol>
<p>As the first solution is trivial only the second way is described in the following lines.</p>
<p>As first the first step, add the dummy node.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>wwctl<span class="w"> </span>node<span class="w"> </span>add<span class="w"> </span>deliverynet
</pre></div>
</div>
<p>Now you will have to add the delivery networks to this node.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>wwctl<span class="w"> </span>node<span class="w"> </span><span class="nb">set</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ipaddr<span class="w"> </span><span class="m">10</span>.0.20.250<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--netmask<span class="w"> </span><span class="m">255</span>.255.255.0<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--netname<span class="w"> </span>deliver1<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--nettagadd<span class="w"> </span><span class="nv">network</span><span class="o">=</span><span class="m">10</span>.0.20.0,dynstart<span class="o">=</span><span class="m">10</span>.10.20.10,dynend<span class="o">=</span><span class="m">10</span>.10.20.50<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>deliverynet

wwctl<span class="w"> </span>node<span class="w"> </span><span class="nb">set</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ipaddr<span class="w"> </span><span class="m">10</span>.0.30.250<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--netmask<span class="w"> </span><span class="m">255</span>.255.255.0<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--netname<span class="w"> </span>deliver2<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--nettagadd<span class="w"> </span><span class="nv">network</span><span class="o">=</span><span class="m">10</span>.0.30.0,dynstart<span class="o">=</span><span class="m">10</span>.10.30.10,dynend<span class="o">=</span><span class="m">10</span>.10.30.50<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>deliverynet
</pre></div>
</div>
<p>The ip address is used as the network address of host in the delivery network and an additional tags is used for definition of the network itself and the dynamic dhcp range.
You can check the result with <code class="docutils literal notranslate"><span class="pre">wwctl</span> <span class="pre">node</span> <span class="pre">list</span></code>.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp"># </span>wwctl<span class="w"> </span>node<span class="w"> </span>list<span class="w"> </span>-a<span class="w"> </span>deliverynet
<span class="go">NODE FIELD PROFILE VALUE</span>
<span class="go">deliverynet Id -- deliverynet</span>
<span class="go">deliverynet Comment default This profile is automatically included for each node</span>
<span class="go">deliverynet ContainerName default leap15.5</span>
<span class="go">deliverynet Ipxe -- (default)</span>
<span class="go">deliverynet RuntimeOverlay -- (generic)</span>
<span class="go">deliverynet SystemOverlay -- (wwinit)</span>
<span class="go">deliverynet Root -- (initramfs)</span>
<span class="go">deliverynet Init -- (/sbin/init)</span>
<span class="go">deliverynet Kernel.Args -- (quiet crashkernel=no vga=791 net.naming-scheme=v238)</span>
<span class="go">deliverynet Profiles -- default</span>
<span class="go">deliverynet PrimaryNetDev -- (deliver1)</span>
<span class="go">deliverynet NetDevs[deliver2].Type -- (ethernet)</span>
<span class="go">deliverynet NetDevs[deliver2].OnBoot -- (true)</span>
<span class="go">deliverynet NetDevs[deliver2].Ipaddr -- 10.0.30.250</span>
<span class="go">deliverynet NetDevs[deliver2].Netmask -- 255.255.255.0</span>
<span class="go">deliverynet NetDevs[deliver2].Tags[dynend] -- 10.10.30.50</span>
<span class="go">deliverynet NetDevs[deliver2].Tags[dynstart] -- 10.10.30.10</span>
<span class="go">deliverynet NetDevs[deliver2].Tags[network] -- 10.0.30.0</span>
<span class="go">deliverynet NetDevs[deliver1].Type -- (ethernet)</span>
<span class="go">deliverynet NetDevs[deliver1].OnBoot -- (true)</span>
<span class="go">deliverynet NetDevs[deliver1].Ipaddr -- 10.0.20.250</span>
<span class="go">deliverynet NetDevs[deliver1].Netmask -- 255.255.255.0</span>
<span class="go">deliverynet NetDevs[deliver1].Primary -- (true)</span>
<span class="go">deliverynet NetDevs[deliver1].Tags[network] -- 10.0.20.0</span>
<span class="go">deliverynet NetDevs[deliver1].Tags[dynend] -- 10.10.20.50</span>
<span class="go">deliverynet NetDevs[deliver1].Tags[dynstart] -- 10.10.20.10</span>
</pre></div>
</div>
<p>Now the templates of <code class="docutils literal notranslate"><span class="pre">dhcpd</span></code> and/or <code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code> must be modified.
You can edit the configuration files.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>wwctl<span class="w"> </span>overlay<span class="w"> </span>edit<span class="w"> </span>host<span class="w"> </span>etc/dhcpd.conf.ww
wwctl<span class="w"> </span>overlay<span class="w"> </span>edit<span class="w"> </span>host<span class="w"> </span>etc/dnsmasq.d/ww4-hosts.ww
</pre></div>
</div>
<p>For the <code class="docutils literal notranslate"><span class="pre">dhcp</span></code> template you should add following lines</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>{{/* multiple networks */}}
{{- range $node := $.AllNodes}}
{{- if eq $node.Id.Get &quot;deliverynet&quot; }}
{{- range $netname, $netdev := $node.NetDevs}}
# network {{ $netname }}
subnet {{$netdev.Tags.network.Get}} netmask {{$netdev.Netmask.Get}} {
max-lease-time 120;
range {{$netdev.Tags.dynstart.Get}} {{$netdev.Tags.dynend.Get}};
next-server {{$netdev.Ipaddr.Get}};
}
{{- end }}
{{- end }}
{{- end }}
</pre></div>
</div>
<p>and for the <code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code> the following lines should be added</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>{{/* multiple networks */}}
{{- range $node := $.AllNodes}}
{{- if eq $node.Id.Get &quot;deliverynet&quot; }}
{{- range $netname, $netdev := $node.NetDevs}}
# network {{ $netname }}
dhcp-range={{$netdev.Tags.dynstart.Get}},{{$netdev.Tags.dynend.Get}},{{$netdev.Netmask.Get}},6h
{{- end }}
{{- end }}
{{- end }}
</pre></div>
</div>
<p>Note that the <code class="docutils literal notranslate"><span class="pre">{{-</span> <span class="pre">if</span> <span class="pre">eq</span> <span class="pre">$node.Id.Get</span> <span class="pre">&quot;deliverynet&quot;</span> <span class="pre">}}</span></code> is used to identify the dummy host which carries the network information.</p>
</section>
</section>


Expand Down
1 change: 1 addition & 0 deletions static/docs/main/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ <h1>User Guide<a class="headerlink" href="#user-guide" title="Link to this headi
<li class="toctree-l2"><a class="reference internal" href="contents/setup.html#operating-system-installation">Operating System Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="contents/setup.html#network">Network</a></li>
<li class="toctree-l2"><a class="reference internal" href="contents/setup.html#addressing">Addressing</a></li>
<li class="toctree-l2"><a class="reference internal" href="contents/setup.html#multiple-networks">Multiple networks</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="contents/installation.html">Warewulf Installation</a><ul>
Expand Down
2 changes: 1 addition & 1 deletion static/docs/main/searchindex.js

Large diffs are not rendered by default.

0 comments on commit f21e269

Please sign in to comment.