]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc: deployment systemd and general structuring
authorVasek Sraier <git@vakabus.cz>
Sun, 5 Mar 2023 22:35:00 +0000 (23:35 +0100)
committerAleš Mrázek <ales.mrazek@nic.cz>
Mon, 5 Jun 2023 13:34:21 +0000 (15:34 +0200)
doc/deployment-advanced-no-manager.rst [moved from doc/advanced-no-manager.rst with 61% similarity]
doc/deployment-advanced.rst
doc/deployment-manual.rst [new file with mode: 0644]
doc/deployment-no-systemd-privileges.rst [moved from doc/config-no-systemd-privileges.rst with 100% similarity]
doc/deployment-no-systemd-processes.rst [moved from doc/config-no-systemd-processes.rst with 100% similarity]
doc/deployment-no-systemd.rst [moved from doc/config-no-systemd.rst with 81% similarity]
doc/deployment-systemd.rst [new file with mode: 0644]
doc/index.rst

similarity index 61%
rename from doc/advanced-no-manager.rst
rename to doc/deployment-advanced-no-manager.rst
index 39888a61971c2d72ca3b3f9222f2157ffc5e5a56..155116445df4a2d64450b8410e354fbb4a2f70ee 100644 (file)
@@ -2,17 +2,23 @@
 
 .. _advanced-no-manager:
 
-***********************************
-Advanced: Usage without the manager
-***********************************
+*************************
+Usage without the manager
+*************************
 
-If you want to continue using Knot Resolver as before version ``6.0.0`` this is chapter for you.
-For new and less experienced users, we recommend using the newer approach starting in :ref:`Getting Started <gettingstarted-intro>` chapter.
 
-There are a few downsides to using the legacy approach that need to be mentioned.
+.. warning::
 
-* configuration in Lua script
-* manual process management
+    This page is intended for experienced users only. If you follow these instructions, you are not protected from footguns elimited with the introduction of the manager. However, if you want to continue using Knot Resolver as before version ``6.0.0`` this is chapter for you.
+
+    For new and less experienced users, we recommend using the newer approach starting in :ref:`Getting Started <gettingstarted-intro>` chapter.
+
+
+There are a few downsides to using the Knot Resolver without the manager:.
+
+* Configuration is a imperative Lua script and can't be properly validated without actually running it.
+* ``kresd`` is single-threaded so you need to manage multiple processes manually.
+* Restarts without downtime after configuration change are only your responsibility.
 
 
 .. _advanced-no-manager-startup:
@@ -21,7 +27,7 @@ There are a few downsides to using the legacy approach that need to be mentioned
 Startup
 =======
 
-The legacy way to start Knot Resolver is to run single instance of its resolving daemon manualy using ``kresd@`` systemd integration.
+The older way to start Knot Resolver is to run single instance of its resolving daemon manualy using ``kresd@`` systemd integration.
 The daemon is single thread process.
 
 .. code-block:: bash
@@ -39,7 +45,7 @@ The daemon is single thread process.
 Configuration
 =============
 
-Legacy way to configure Knot Resolver is to paste your Lua code typically into ``/etc/knot-resolver/kresd.conf`` configuration script.
+You can configure ``kresd`` by pasting your Lua code into ``/etc/knot-resolver/kresd.conf`` configuration script.
 The resolver's daemon is preconfigure to load this script when using ``kresd@`` systemd integration.
 
 .. note::
index 2577538bb6a508992203aee066d8a28e7ffef656..0dc27d49ef0e74d4c18d933d8dbfe73578bd7565 100644 (file)
@@ -1,11 +1,9 @@
-*******************
-Advanced deployment
-*******************
-
-DO NOT DO THIS, YOU ARE ON YOUR OWN
-
+********
+Advanced
+********
 
 .. toctree::
    :maxdepth: 2
    
-   advanced-no-manager
\ No newline at end of file
+   deployment-advanced-no-manager
+   config-no-systemd
\ No newline at end of file
diff --git a/doc/deployment-manual.rst b/doc/deployment-manual.rst
new file mode 100644 (file)
index 0000000..48fa0d1
--- /dev/null
@@ -0,0 +1,5 @@
+******
+Manual
+******
+
+TODO how to run it manually without systemd, what are the requirements
\ No newline at end of file
similarity index 81%
rename from doc/config-no-systemd.rst
rename to doc/deployment-no-systemd.rst
index a8cbb0962ab267724063bf4f30ce2b079ebe3201..6aeb142e154192a98b4a65ffd6da1421bfae4f1c 100644 (file)
@@ -2,15 +2,15 @@
 
 .. _usage-without-systemd:
 
-*********************
-Usage without systemd
-*********************
+*****************************************
+Usage without systemd and without systemd
+*****************************************
 
 .. tip:: Our upstream packages use systemd integration, which is the recommended
    way to run kresd. This section is only relevant if you choose to use kresd
    without systemd integration.
 
-Knot Resolver is designed to be a single process without the use of threads.
+``kresd`` is designed to be a single process without the use of threads.
 While the cache is shared, the individual processes are independent.  This
 approach has several benefits, but it also comes with a few downsides, in
 particular:
@@ -31,7 +31,7 @@ mind when configuring and running kresd without systemd integration.
 .. toctree::
    :maxdepth: 2
 
-   config-no-systemd-processes
-   config-no-systemd-privileges
+   deployment-no-systemd-processes
+   deployment-no-systemd-privileges
 
 .. _`#529`: https://gitlab.nic.cz/knot/knot-resolver/issues/529
diff --git a/doc/deployment-systemd.rst b/doc/deployment-systemd.rst
new file mode 100644 (file)
index 0000000..3b6c3c6
--- /dev/null
@@ -0,0 +1,19 @@
+*******
+Systemd
+*******
+
+In the default installation, Knot Resolver contains systemd integration and starting it on such system usually involves only one command.
+
+.. code-block::
+
+    systemctl enable --now knot-resolver.service
+
+
+If you don't have systemd service file for Knot Resolver already installed in your system, you can create one manually with the folling content:
+
+
+.. literalinclude:: ../systemd/knot-resolver.service.in
+
+.. note::
+
+    Replace words surrounded by ``@`` to some real values (i.e. ``@user@`` to a user you want Knot Resolver to run as).
\ No newline at end of file
index 8d985ee76c1a67670bb586bf833ae9ec14e25bd2..12bddad8416537dd6d5ab1e2ed1d9f013b6edb91 100644 (file)
@@ -34,8 +34,9 @@ If you are a new user, please start with chapter for :ref:`getting started <gett
    :name: deployment-chapter
    :maxdepth: 1
 
-   config-no-systemd
+   deployment-systemd
    deployment-docker
+   deployment-manual
    deployment-advanced
 
 .. toctree::