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 Dec 3, 2024
1 parent 418c3b3 commit ea4b53a
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 1 deletion.
37 changes: 37 additions & 0 deletions static/docs/main/_sources/contents/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,43 @@ openSuse Leap
# zypper install https://github.com/warewulf/warewulf/releases/download/v4.5.8/warewulf-4.5.8-1.suse.lp155.x86_64.rpm
Container images
================

Warewulf is prepared to be built inside and packaged into a Linux container.
This can be especially useful for testing and development or just replace classic package installation.
It is also possible to only use the container for building and the install it in the host system afterwards.
For that look at the INSTALL, UNINSTALL and PURGE labels inside the `Dockerfile`_

.. _Dockerfile: https://github.com/warewulf/warewulf/blob/main/Dockerfile

Docker
------

.. code-block:: console
# docker build -t warewulf .
# docker run -d --replace --name warewulf-test --privileged --net=host -v /:/host -v /etc/warewulf:/etc/warewulf -v /var/lib/warewulf/:/var/lib/warewulf/ -e NAME=warewulf-test -e IMAGE=warewulf warewulf
Systemd-nspawn
--------------

Since Warewulf runs multiple services inside one single container it uses systemd as init system.
Since a full privileged Docker container running a systemd can cause some side effects,
it might be a better option to use `systemd-nspawn`_ in some cases which was explicitly made to run
containers with a full init system.

.. _systemd-nspawn: https://www.freedesktop.org/software/systemd/man/latest/systemd-nspawn.html

.. code-block:: console
# docker build -t warewulf .
# mkdir warewulf-nspawn
# docker export "$(docker create --name warewulf-test warewulf true)" | tar -x -C warewulf-nspawn
# systemd-nspawn -D warewulf-nspawn/ passwd
# systemd-nspawn -D warewulf-nspawn/ --boot
Compiled Source code
====================

Expand Down
33 changes: 33 additions & 0 deletions static/docs/main/contents/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
<li class="toctree-l3"><a class="reference internal" href="#opensuse-leap">openSuse Leap</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#container-images">Container images</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#docker">Docker</a></li>
<li class="toctree-l3"><a class="reference internal" href="#systemd-nspawn">Systemd-nspawn</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#compiled-source-code">Compiled Source code</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#release-tarball">Release Tarball</a></li>
<li class="toctree-l3"><a class="reference internal" href="#git">Git</a></li>
Expand Down Expand Up @@ -144,6 +149,34 @@ <h3>openSuse Leap<a class="headerlink" href="#opensuse-leap" title="Link to this
</div>
</section>
</section>
<section id="container-images">
<h2>Container images<a class="headerlink" href="#container-images" title="Link to this heading"></a></h2>
<p>Warewulf is prepared to be built inside and packaged into a Linux container.
This can be especially useful for testing and development or just replace classic package installation.
It is also possible to only use the container for building and the install it in the host system afterwards.
For that look at the INSTALL, UNINSTALL and PURGE labels inside the <a class="reference external" href="https://github.com/warewulf/warewulf/blob/main/Dockerfile">Dockerfile</a></p>
<section id="docker">
<h3>Docker<a class="headerlink" href="#docker" title="Link to this heading"></a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp"># </span>docker<span class="w"> </span>build<span class="w"> </span>-t<span class="w"> </span>warewulf<span class="w"> </span>.
<span class="gp"># </span>docker<span class="w"> </span>run<span class="w"> </span>-d<span class="w"> </span>--replace<span class="w"> </span>--name<span class="w"> </span>warewulf-test<span class="w"> </span>--privileged<span class="w"> </span>--net<span class="o">=</span>host<span class="w"> </span>-v<span class="w"> </span>/:/host<span class="w"> </span>-v<span class="w"> </span>/etc/warewulf:/etc/warewulf<span class="w"> </span>-v<span class="w"> </span>/var/lib/warewulf/:/var/lib/warewulf/<span class="w"> </span>-e<span class="w"> </span><span class="nv">NAME</span><span class="o">=</span>warewulf-test<span class="w"> </span>-e<span class="w"> </span><span class="nv">IMAGE</span><span class="o">=</span>warewulf<span class="w"> </span>warewulf
</pre></div>
</div>
</section>
<section id="systemd-nspawn">
<h3>Systemd-nspawn<a class="headerlink" href="#systemd-nspawn" title="Link to this heading"></a></h3>
<p>Since Warewulf runs multiple services inside one single container it uses systemd as init system.
Since a full privileged Docker container running a systemd can cause some side effects,
it might be a better option to use <a class="reference external" href="https://www.freedesktop.org/software/systemd/man/latest/systemd-nspawn.html">systemd-nspawn</a> in some cases which was explicitly made to run
containers with a full init system.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp"># </span>docker<span class="w"> </span>build<span class="w"> </span>-t<span class="w"> </span>warewulf<span class="w"> </span>.
<span class="gp"># </span>mkdir<span class="w"> </span>warewulf-nspawn
<span class="gp"># </span>docker<span class="w"> </span><span class="nb">export</span><span class="w"> </span><span class="s2">&quot;</span><span class="k">$(</span>docker<span class="w"> </span>create<span class="w"> </span>--name<span class="w"> </span>warewulf-test<span class="w"> </span>warewulf<span class="w"> </span><span class="nb">true</span><span class="k">)</span><span class="s2">&quot;</span><span class="w"> </span><span class="p">|</span><span class="w"> </span>tar<span class="w"> </span>-x<span class="w"> </span>-C<span class="w"> </span>warewulf-nspawn
<span class="gp"># </span>systemd-nspawn<span class="w"> </span>-D<span class="w"> </span>warewulf-nspawn/<span class="w"> </span>passwd
<span class="gp"># </span>systemd-nspawn<span class="w"> </span>-D<span class="w"> </span>warewulf-nspawn/<span class="w"> </span>--boot
</pre></div>
</div>
</section>
</section>
<section id="compiled-source-code">
<h2>Compiled Source code<a class="headerlink" href="#compiled-source-code" title="Link to this heading"></a></h2>
<p>Before you build the Warewulf source code you will first need to
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 @@ -137,6 +137,7 @@ <h1>User Guide<a class="headerlink" href="#user-guide" title="Link to this headi
</li>
<li class="toctree-l1"><a class="reference internal" href="contents/installation.html">Warewulf Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="contents/installation.html#binary-rpms">Binary RPMs</a></li>
<li class="toctree-l2"><a class="reference internal" href="contents/installation.html#container-images">Container images</a></li>
<li class="toctree-l2"><a class="reference internal" href="contents/installation.html#compiled-source-code">Compiled Source code</a></li>
</ul>
</li>
Expand Down
2 changes: 1 addition & 1 deletion static/docs/main/searchindex.js

Large diffs are not rendered by default.

0 comments on commit ea4b53a

Please sign in to comment.