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 f21e269 commit 9602817
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 18 deletions.
61 changes: 53 additions & 8 deletions static/docs/main/_sources/contents/dnsmasq.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,58 @@ Dnsmasq
Usage
=====

As experimental feature its possible to use `dnsmasq` instead of the ISC `dhcpd` server in combination
with a `tFTP` server. The `dnsmasq` service is then acting as `dhcp` and `tftp` server. In order to keep
the file `/etc/dnsmasq.d/ww4-hosts.conf` is created and must be included in the main `dnsmasq.conf` via
the `conf-dir=/etc/dnsmasq.d` option.
As experimental feature its possible to use ``dnsmasq`` instead of the ISC ``dhcpd`` server in combination with a ``TFTP`` server.
The ``dnsmasq`` service is then acting as ``dhcp`` and ``TFTP`` server.
In order to keep the file ``/etc/dnsmasq.d/ww4-hosts.conf`` is created and must be included in the main ``dnsmasq.conf`` via the ``conf-dir=/etc/dnsmasq.d`` option.

Addionally in the configuration file `warewulf.conf` in the sections `dhcp` and `tftp` the systemd name of
dnsmasq must set for the option `systemd name`.

After this configuration steps its recommended to rebuild the host overlay with `wwctl overlay build -H` and
the the services should be configured with `wwctl configure -a`.
Installation
------------

Before the installation, make sure that ``dhcpd`` and ``tftp`` are disabled.
You can do that with the commands:

.. code-block:: shell
systemctl disable dhcpd
systemctl stop dhcpd
systemctl disable tftp
systemctl stop tftp
Now you can install ``dnsmasq``.

.. code-block:: shell
zypper install dnsmasq
After the installation you have to instruct ``warewulf`` to use ``dnsmasq`` as its ``dhcpd`` and ``tftp`` service.
``dnsmasq`` has to be specified in the configuration file ``/etc/warewulf/warewulf.conf``.

.. code-block:: shell
tftp:
systemd name: dnsmasq
dhcp:
systemd name: dnsmasq
The configuration of ``dnsmasq`` doesn't need to be changed, as the default configuration includes all files with following pattern ``/etc/dnsmasq.d/*conf`` into its configuration.
This configuration is created by the overlay template ``host:/etc/dnsmasq.d/ww4-hosts.conf.ww``.
In order to build this template run

.. code-block:: shell
wwctl overlay build -H
After that the ``dnsmasq`` service has to be enabled.
Either

.. code-block:: shell
systemctl enable --now dnsmasq
or by (re)configuring warewulf with

.. code-block:: shell
wwctl configure dhcp
wwctl configure tftp
55 changes: 46 additions & 9 deletions static/docs/main/contents/dnsmasq.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@
<li class="toctree-l1"><a class="reference internal" href="security.html">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="templating.html">Templating</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">dnsmasq</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#usage">Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="#usage">Usage</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#installation">Installation</a></li>
</ul>
</li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -119,14 +122,48 @@
<h1>Dnsmasq<a class="headerlink" href="#dnsmasq" title="Link to this heading"></a></h1>
<section id="usage">
<h2>Usage<a class="headerlink" href="#usage" title="Link to this heading"></a></h2>
<p>As experimental feature its possible to use <cite>dnsmasq</cite> instead of the ISC <cite>dhcpd</cite> server in combination
with a <cite>tFTP</cite> server. The <cite>dnsmasq</cite> service is then acting as <cite>dhcp</cite> and <cite>tftp</cite> server. In order to keep
the file <cite>/etc/dnsmasq.d/ww4-hosts.conf</cite> is created and must be included in the main <cite>dnsmasq.conf</cite> via
the <cite>conf-dir=/etc/dnsmasq.d</cite> option.</p>
<p>Addionally in the configuration file <cite>warewulf.conf</cite> in the sections <cite>dhcp</cite> and <cite>tftp</cite> the systemd name of
dnsmasq must set for the option <cite>systemd name</cite>.</p>
<p>After this configuration steps its recommended to rebuild the host overlay with <cite>wwctl overlay build -H</cite> and
the the services should be configured with <cite>wwctl configure -a</cite>.</p>
<p>As experimental feature its possible to use <code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code> instead of the ISC <code class="docutils literal notranslate"><span class="pre">dhcpd</span></code> server in combination with a <code class="docutils literal notranslate"><span class="pre">TFTP</span></code> server.
The <code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code> service is then acting as <code class="docutils literal notranslate"><span class="pre">dhcp</span></code> and <code class="docutils literal notranslate"><span class="pre">TFTP</span></code> server.
In order to keep the file <code class="docutils literal notranslate"><span class="pre">/etc/dnsmasq.d/ww4-hosts.conf</span></code> is created and must be included in the main <code class="docutils literal notranslate"><span class="pre">dnsmasq.conf</span></code> via the <code class="docutils literal notranslate"><span class="pre">conf-dir=/etc/dnsmasq.d</span></code> option.</p>
<section id="installation">
<h3>Installation<a class="headerlink" href="#installation" title="Link to this heading"></a></h3>
<p>Before the installation, make sure that <code class="docutils literal notranslate"><span class="pre">dhcpd</span></code> and <code class="docutils literal notranslate"><span class="pre">tftp</span></code> are disabled.
You can do that with the commands:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>systemctl<span class="w"> </span>disable<span class="w"> </span>dhcpd
systemctl<span class="w"> </span>stop<span class="w"> </span>dhcpd
systemctl<span class="w"> </span>disable<span class="w"> </span>tftp
systemctl<span class="w"> </span>stop<span class="w"> </span>tftp
</pre></div>
</div>
<p>Now you can install <code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code>.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>zypper<span class="w"> </span>install<span class="w"> </span>dnsmasq
</pre></div>
</div>
<p>After the installation you have to instruct <code class="docutils literal notranslate"><span class="pre">warewulf</span></code> to use <code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code> as its <code class="docutils literal notranslate"><span class="pre">dhcpd</span></code> and <code class="docutils literal notranslate"><span class="pre">tftp</span></code> service.
<code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code> has to be specified in the configuration file <code class="docutils literal notranslate"><span class="pre">/etc/warewulf/warewulf.conf</span></code>.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>tftp:
<span class="w"> </span>systemd<span class="w"> </span>name:<span class="w"> </span>dnsmasq
dhcp:
<span class="w"> </span>systemd<span class="w"> </span>name:<span class="w"> </span>dnsmasq
</pre></div>
</div>
<p>The configuration of <code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code> doesn’t need to be changed, as the default configuration includes all files with following pattern <code class="docutils literal notranslate"><span class="pre">/etc/dnsmasq.d/*conf</span></code> into its configuration.
This configuration is created by the overlay template <code class="docutils literal notranslate"><span class="pre">host:/etc/dnsmasq.d/ww4-hosts.conf.ww</span></code>.
In order to build this template run</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>wwctl<span class="w"> </span>overlay<span class="w"> </span>build<span class="w"> </span>-H
</pre></div>
</div>
<p>After that the <code class="docutils literal notranslate"><span class="pre">dnsmasq</span></code> service has to be enabled.
Either</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>--now<span class="w"> </span>dnsmasq
</pre></div>
</div>
<p>or by (re)configuring warewulf with</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>wwctl<span class="w"> </span>configure<span class="w"> </span>dhcp
wwctl<span class="w"> </span>configure<span class="w"> </span>tftp
</pre></div>
</div>
</section>
</section>
</section>

Expand Down
2 changes: 1 addition & 1 deletion static/docs/main/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 9602817

Please sign in to comment.