diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-03-30 18:47:01 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-03-30 18:47:01 +0200 |
commit | dd53c45a2cb46f882a856869de26215942749cba (patch) | |
tree | 332f56863a8a243a33f55f889cc2132d45ece39a /docs/utils | |
parent | 4e307edb2d3e5a726d78d73dea1ebe4b9d831615 (diff) | |
download | searxng-dd53c45a2cb46f882a856869de26215942749cba.tar.gz searxng-dd53c45a2cb46f882a856869de26215942749cba.zip |
docs: add utils/lxc.sh docs, normalize filtron, morty & searx docs
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'docs/utils')
-rw-r--r-- | docs/utils/filtron.sh.rst | 25 | ||||
-rw-r--r-- | docs/utils/index.rst | 1 | ||||
-rw-r--r-- | docs/utils/lxc.sh.rst | 79 | ||||
-rw-r--r-- | docs/utils/morty.sh.rst | 11 | ||||
-rw-r--r-- | docs/utils/searx.sh.rst | 41 |
5 files changed, 126 insertions, 31 deletions
diff --git a/docs/utils/filtron.sh.rst b/docs/utils/filtron.sh.rst index e6d7d6251..40e57aa3c 100644 --- a/docs/utils/filtron.sh.rst +++ b/docs/utils/filtron.sh.rst @@ -27,8 +27,8 @@ The script adds a ``${SERVICE_USER}`` (default:``filtron``) and installs filtron into this user account: #. Create a separated user account (``filtron``). -#. Download and install Go_ binary in users $HOME (``~filtron``). -#. Install filtron with the package management of Go_ (``go get -v -u +#. Download and install Go_ binary in user's $HOME (``~filtron``). +#. Install filtron with the package management from Go_ (``go get -v -u github.com/asciimoo/filtron``) #. Setup a proper rule configuration :origin:`[ref] <utils/templates/etc/filtron/rules.json>` (``/etc/filtron/rules.json``). @@ -36,6 +36,16 @@ into this user account: <utils/templates/lib/systemd/system/filtron.service>` (``/lib/systemd/system/filtron.service``). +.. _filtron.sh overview: + +Overview +======== + +The ``--help`` output of the script is largely self-explanatory +(:ref:`toolboxing common`): + +.. program-output:: ../utils/filtron.sh --help + .. _reverse proxy: Public Reverse Proxy @@ -63,14 +73,3 @@ To install searx in your public HTTP server use: $ sudo -H a2enmod headers $ sudo -H a2enmod proxy $ sudo -H a2enmod proxy_http - -.. _filtron.sh overview: - -Overview -======== - -The ``--help`` output of the script is largely self-explanatory -(:ref:`toolboxing common`): - -.. program-output:: ../utils/filtron.sh --help - diff --git a/docs/utils/index.rst b/docs/utils/index.rst index 1c77cbfcd..088586e43 100644 --- a/docs/utils/index.rst +++ b/docs/utils/index.rst @@ -15,6 +15,7 @@ developers. searx.sh filtron.sh morty.sh + lxc.sh .. _toolboxing common: diff --git a/docs/utils/lxc.sh.rst b/docs/utils/lxc.sh.rst new file mode 100644 index 000000000..68577ea13 --- /dev/null +++ b/docs/utils/lxc.sh.rst @@ -0,0 +1,79 @@ + + +.. _snap: https://snapcraft.io +.. _snapcraft LXD: https://snapcraft.io/lxd +.. _LXC/LXD Image Server: https://uk.images.linuxcontainers.org/ +.. _LXC: https://linuxcontainers.org/lxc/introduction/ +.. _LXD: https://linuxcontainers.org/lxd/introduction/ +.. _`LXD@github`: https://github.com/lxc/lxd + +.. _lxc.sh: + +================ +``utils/lxc.sh`` +================ + +.. sidebar:: further reading + + - snap_, `snapcraft LXD`_ + - LXC_, LXD_ + - `LXC/LXD Image Server`_ + - `LXD@github`_ + +With the use of *Linux Containers* (LXC_) we can scale our tasks over a stack of +containers, what we call the: *lxc suite*. Before you can start with +containers, you need to install and initiate LXD_ once:: + + $ snap install lxd + $ lxd init --auto + +The *searx suite* (:origin:`lxc-searx.env <utils/lxc-searx.env>`) is loaded by +default, every time you start the ``lxc.sh`` script (you do not need to care +about). To make use of the containers from the *searx suite*, you have to build +the :ref:`LXC suite containers <lxc.sh --help>` first. But be warned, this +might take some time:: + + $ sudo -H ./utils/lxc.sh build + +A cup of coffee later, your LXC suite is build up and you can run whatever task +you want / in a selected or even in all :ref:`LXC suite containers <lxc.sh +--help>`. Each container shares the root folder of the repository and the +command ``utils/lxc.sh cmd`` handles relative path names *transparent*:: + + $ sudo -H ./utils/lxc.sh cmd -- ls -la Makefile + ... + [searx-ubu2004] -rw-r--r-- 1 root root 7603 Mar 30 11:54 Makefile + [searx-fedora31] -rw-r--r-- 1 root root 7603 Mar 30 11:54 Makefile + [searx-archlinux] -rw-r--r-- 1 root root 7603 Mar 30 11:54 Makefile + +With this in mind, you can run :ref:`searx.sh` and install packages, needed by +searx:: + + $ sudo -H ./utils/lxc.sh cmd -- ./utils/searx.sh install packages + +And run one of the :origin:`Makefile` targets:: + + $ sudo -H ./utils/lxc.sh cmd -- make test.sh + +You can install a *buildhost environment* into the containers (time for another +cup of coffee):: + + $ sudo -H ./utils/lxc.sh install buildhost + +If you want to get rid off all the containers, just type:: + + $ sudo -H ./utils/lxc.sh remove + +To clean up your local images use:: + + $ sudo -H ./utils/lxc.sh remove images + +.. _lxc.sh --help: + +Overview +======== + +The ``--help`` output of the script is largely self-explanatory: + +.. program-output:: ../utils/lxc.sh --help + diff --git a/docs/utils/morty.sh.rst b/docs/utils/morty.sh.rst index 5ab6ee982..2bdc4d9c8 100644 --- a/docs/utils/morty.sh.rst +++ b/docs/utils/morty.sh.rst @@ -1,6 +1,7 @@ .. _morty: https://github.com/asciimoo/morty .. _morty's README: https://github.com/asciimoo/morty +.. _Go: https://golang.org/ .. _morty.sh: @@ -22,7 +23,15 @@ running the command: sudo -H ./utils/morty.sh install all The script adds a ``${SERVICE_USER}`` (default:``morty``) and installs morty_ -into this user account. +into this user account: + +#. Create a separated user account (``morty``). +#. Download and install Go_ binary in user's $HOME (``~morty``). +#. Install morty_ with the package management from Go_ (``go get -v -u + github.com/asciimoo/morty``) +#. Setup a systemd service unit :origin:`[ref] + <utils/templates/lib/systemd/system/morty.service>` + (``/lib/systemd/system/morty.service``). .. hint:: diff --git a/docs/utils/searx.sh.rst b/docs/utils/searx.sh.rst index 988c08438..905f765dd 100644 --- a/docs/utils/searx.sh.rst +++ b/docs/utils/searx.sh.rst @@ -29,45 +29,52 @@ into this user account. The installation is described in chapter .. _intranet reverse proxy: -Intranet Reverse Proxy -====================== +Overview +======== -To install searx in your intranet HTTP server use: +The ``--help`` output of the script is largely self-explanatory +(:ref:`toolboxing common`): -.. code:: bash +.. program-output:: ../utils/searx.sh --help - sudo -H ./utils/searx.sh apache install + +Intranet Reverse Proxy +====================== .. warning:: This setup is **not** suitable **for public instances**, go on with :ref:`reverse proxy`! +To install searx in your intranet HTTP server use: + +.. code:: bash + + sudo -H ./utils/searx.sh apache install + .. tabs:: .. group-tab:: apache .. literalinclude:: ../../utils/templates/etc/apache2/sites-available/searx.conf:uwsgi - :language: apache + :language: apache .. tabs:: - .. group-tab:: Ubuntu / debian + .. group-tab:: Ubuntu / debian - .. code-block:: sh + .. code-block:: sh - $ sudo -H apt install libapache2-mod-uwsgi + $ sudo -H apt install libapache2-mod-uwsgi - .. group-tab:: Arch Linux + .. group-tab:: Arch Linux - .. code-block:: sh + .. code-block:: sh - $ sudo pacman -S uwsgi + $ sudo -H pacman -S uwsgi -Overview -======== + .. group-tab:: Fedora / RHEL -The ``--help`` output of the script is largely self-explanatory -(:ref:`toolboxing common`): + .. code-block:: sh -.. program-output:: ../utils/searx.sh --help + $ sudo -H dnf install uwsgi |