From 8bc3425a1c44e283b283477aacbb69696e61eec3 Mon Sep 17 00:00:00 2001 From: ralf401 Date: Mon, 16 Oct 2023 14:41:00 +0200 Subject: [PATCH 1/3] Fixes #375 - Added CPU cores as an option for rebuilding ES index --- appendix/troubleshooting/index.rst | 25 ++++++++++++++++--------- install/update.rst | 7 +++++++ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/appendix/troubleshooting/index.rst b/appendix/troubleshooting/index.rst index 9e1709b4..a8b9072a 100644 --- a/appendix/troubleshooting/index.rst +++ b/appendix/troubleshooting/index.rst @@ -31,8 +31,8 @@ Step 1: Verify Elasticsearch is running # check elasticsearch status $ systemctl status elasticsearch - .. note:: - + .. note:: + This should output something like the following, make sure it says ``Active: active (running)``: @@ -54,7 +54,7 @@ Step 1: Verify Elasticsearch is running $ systemctl status elasticsearch .. warning:: - + | If this fails, your Elasticsearch installation is probably broken. | Try completely purging and reinstalling Elasticsearch according to :doc:`/install/elasticsearch` @@ -66,14 +66,14 @@ Step 2: Verify the ingest-attachment plugin is installed correctly # list installed elasticsearch plugins $ /usr/share/elasticsearch/bin/elasticsearch-plugin list - .. note:: + .. note:: The output should include ``ingest-attachment``. Otherwise, try reinstalling the ``ingest-attachment`` plugin and check again: .. code-block:: sh - + $ /usr/share/elasticsearch/bin/elasticsearch-plugin remove ingest-attachment $ /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment @@ -81,14 +81,21 @@ Step 2: Verify the ingest-attachment plugin is installed correctly $ /usr/share/elasticsearch/bin/elasticsearch-plugin list -Step 3: Verify Zammad can access Elasticsearch and rebuild the indexes +Step 3: Verify Zammad can access Elasticsearch and rebuild the indexes .. code-block:: sh # force zammad to drop and rebuild the elasticsearch indexes $ zammad run rake zammad:searchindex:rebuild - .. note:: - +Optionally, you can specify a number of CPU cores which are used for rebuilding +the searchindex, as in the following example with 8 cores: + + .. code-block:: sh + + $ zammad run rake zammad:searchindex:rebuild[8] + + .. note:: + This should start rebuilding the indexes and output it's progress: .. code-block:: sh @@ -111,7 +118,7 @@ Step 3: Verify Zammad can access Elasticsearch and rebuild the indexes back to the console. .. warning:: - + | If this fails or throws an error, there might be something else wrong with your installation. | Make sure you followed the complete Elasticsearch set up and diff --git a/install/update.rst b/install/update.rst index 99a8ccfe..7942f295 100644 --- a/install/update.rst +++ b/install/update.rst @@ -233,6 +233,13 @@ use: $ zammad run rake zammad:searchindex:rebuild +Optionally, you can specify a number of CPU cores which are used for rebuilding +the searchindex, as in the following example with 8 cores: + +.. code-block:: sh + + $ zammad run rake zammad:searchindex:rebuild[8] + .. hint:: **🤓 Zammad 5.2 comes with changes** As of Zammad 5.2 the reindex command has changed! From b2d627941d03175ea925332d6de1fc5ea2d53206 Mon Sep 17 00:00:00 2001 From: ralf401 Date: Thu, 19 Oct 2023 13:19:13 +0200 Subject: [PATCH 2/3] Fixes #380 - Edited instructions for node installation --- install/includes/nodejs/debian.rst | 12 +++-- install/includes/nodejs/ubuntu.rst | 12 +++-- install/source.rst | 56 ++++++++++----------- install/source/include-rvm-install-ruby.rst | 2 +- 4 files changed, 47 insertions(+), 35 deletions(-) diff --git a/install/includes/nodejs/debian.rst b/install/includes/nodejs/debian.rst index 6e4df2e6..509c038b 100644 --- a/install/includes/nodejs/debian.rst +++ b/install/includes/nodejs/debian.rst @@ -1,6 +1,12 @@ .. code-block:: sh + # see https://github.com/nodesource/distributions#debian-and-ubuntu-based-distributions + # for detailed installation instructions. + + $ apt install -y ca-certificates curl gnupg + $ mkdir -p /etc/apt/keyrings + $ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + $ NODE_MAJOR=20 + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list $ apt update - $ apt install curl - $ curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - - $ apt install nodejs + $ apt install nodejs -y \ No newline at end of file diff --git a/install/includes/nodejs/ubuntu.rst b/install/includes/nodejs/ubuntu.rst index 6e4df2e6..509c038b 100644 --- a/install/includes/nodejs/ubuntu.rst +++ b/install/includes/nodejs/ubuntu.rst @@ -1,6 +1,12 @@ .. code-block:: sh + # see https://github.com/nodesource/distributions#debian-and-ubuntu-based-distributions + # for detailed installation instructions. + + $ apt install -y ca-certificates curl gnupg + $ mkdir -p /etc/apt/keyrings + $ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + $ NODE_MAJOR=20 + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list $ apt update - $ apt install curl - $ curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - - $ apt install nodejs + $ apt install nodejs -y \ No newline at end of file diff --git a/install/source.rst b/install/source.rst index d69c7c9e..9d754b81 100644 --- a/install/source.rst +++ b/install/source.rst @@ -8,15 +8,15 @@ Install from source .. note:: - The source installation is the most difficult installation type of Zammad. - If you're not too experienced with Linux and all that, you may want to use + The source installation is the most difficult installation type of Zammad. + If you're not too experienced with Linux and all that, you may want to use another installation type: * :doc:`/install/package` * :doc:`/install/docker-compose` | **Administrative note** - | Please note that we only use ``sudo`` after direct user changes. + | Please note that we only use ``sudo`` after direct user changes. In all other situations you can expect ``root`` being in charge. .. hint:: @@ -30,7 +30,7 @@ Prerequisites Software dependencies --------------------- -Please ensure that you already provided mentioned +Please ensure that you already provided mentioned :doc:`Software requirements `. Add user @@ -49,7 +49,7 @@ Step 1: Get the source .. note:: - Not all distributions ship ``wget`` and ``tar`` by default, you may need to + Not all distributions ship ``wget`` and ``tar`` by default, you may need to install it manually. .. include:: /install/source/include-get-the-source.rst @@ -60,7 +60,7 @@ Step 2: Install dependencies ---------------------------- .. - About this section: The RVM installation part uses definition list instead + About this section: The RVM installation part uses definition list instead of field lists intentionally. It's supposed to safe width for better readability. .. note:: @@ -69,8 +69,8 @@ Step 2: Install dependencies detailed instructions. -Zammad requires specific ruby versions. Adapt the commands below if you install -older versions. A list of required versions can be found on the +Zammad requires specific ruby versions. Adapt the commands below if you install +older versions. A list of required versions can be found on the :doc:`Software requirements ` page. .. include:: /install/includes/postgres-installation.rst @@ -85,8 +85,8 @@ older versions. A list of required versions can be found on the Install RVM .. code-block:: sh - $ apt install curl git patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev autotools-dev\ - libxslt1-dev libyaml-0-2 autoconf automake libreadline-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev\ + $ apt install curl git patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev autotools-dev\ + libxslt1-dev libyaml-0-2 autoconf automake libreadline-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev\ pkg-config libffi-dev libimlib2-dev gawk libsqlite3-dev sqlite3 software-properties-common $ apt-add-repository -y ppa:rael-gc/rvm @@ -98,7 +98,7 @@ older versions. A list of required versions can be found on the Install Ruby Environment .. include:: source/include-rvm-install-ruby.rst - + .. tab:: Debian Install Node.js @@ -107,11 +107,11 @@ older versions. A list of required versions can be found on the Install RVM .. code-block:: sh - $ apt install curl git patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev autotools-dev\ - libxslt1-dev libyaml-0-2 autoconf automake libreadline-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev\ + $ apt install curl git patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev autotools-dev\ + libxslt1-dev libyaml-0-2 autoconf automake libreadline-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev\ pkg-config libffi-dev libimlib2-dev gawk libsqlite3-dev sqlite3 - $ gpg --keyserver keyserver.ubuntu.com --recv-keys\ + $ gpg --keyserver keyserver.ubuntu.com --recv-keys\ 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB $ curl -L https://get.rvm.io | bash -s stable @@ -133,7 +133,7 @@ older versions. A list of required versions can be found on the $ yum install patch autoconf automake bison bzip2 gcc-c++ libffi-devel libtool make patch readline-devel ruby sqlite-devel\ zlib-devel glibc-headers glibc-devel openssl-devel git imlib2 imlib2-devel - $ gpg --keyserver keyserver.ubuntu.com --recv-keys\ + $ gpg --keyserver keyserver.ubuntu.com --recv-keys\ 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB $ curl -L https://get.rvm.io | bash -s stable @@ -151,10 +151,10 @@ older versions. A list of required versions can be found on the Install RVM .. code-block:: sh - $ zypper install patch autoconf automake bison bzip2 gcc-c++ libffi-devel libtool make patch readline-devel sqlite3-devel\ + $ zypper install patch autoconf automake bison bzip2 gcc-c++ libffi-devel libtool make patch readline-devel sqlite3-devel\ sqlite3 zlib-devel glibc-devel openssl-devel git imlib2 imlib2-devel gdbm-devel libyaml-devel - $ gpg --keyserver keyserver.ubuntu.com --recv-keys\ + $ gpg --keyserver keyserver.ubuntu.com --recv-keys\ 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB $ curl -L https://get.rvm.io | bash -s stable @@ -166,15 +166,15 @@ older versions. A list of required versions can be found on the .. tab:: other - Other systems than above mentioned are out of scope of this documentation. - Please check the `rvm documentation `_ on how - to install rvm on your system. + Other systems than above mentioned are out of scope of this documentation. + Please check the `rvm documentation `_ on how + to install rvm on your system. Please also ensure to install ``nodejs``. After that install the specific required ruby version. -| After installing bundler, rake and rails we'll need to install all required gems. +| After installing bundler, rake and rails we'll need to install all required gems. | The command depends on the database server you are using. .. include:: /install/includes/postgres-dependencies.rst @@ -189,8 +189,8 @@ Step 3: Configure database settings $ cp config/database/database.yml config/database.yml $ vi config/database.yml -Here's a sample configuration to give you an idea on how your configuration -file could look like. Please also have a look at +Here's a sample configuration to give you an idea on how your configuration +file could look like. Please also have a look at :doc:`/appendix/configure-database-server` for deeper details. .. code-block:: yaml @@ -204,14 +204,14 @@ file could look like. Please also have a look at username: zammad password: changeme -.. hint:: +.. hint:: - You can remove the ``password`` line if you enable socket based + You can remove the ``password`` line if you enable socket based authentication! -.. hint:: +.. hint:: - If you want to use an existing database server that's not on the same + If you want to use an existing database server that's not on the same machine, you can also use ``host`` and ``port`` to set that up. .. include:: /install/source/include-chmod-database-yml.rst @@ -277,7 +277,7 @@ You can start all services by hand or use systemd to start / stop Zammad. .. tab:: the manual way - .. warning:: + .. warning:: This method is not suitable for production use - you should avoid it. diff --git a/install/source/include-rvm-install-ruby.rst b/install/source/include-rvm-install-ruby.rst index e064384d..986c96f7 100644 --- a/install/source/include-rvm-install-ruby.rst +++ b/install/source/include-rvm-install-ruby.rst @@ -8,5 +8,5 @@ $ rvm install ruby-3.1.3 # Install bundler, rake and rails - $ rvm use 3.1.3 + $ rvm use ruby-3.1.3 $ gem install bundler rake rails From da263017b15925e2d6c0594958b6406a03855fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Tue, 24 Oct 2023 13:40:13 +0200 Subject: [PATCH 3/3] Maintenance: Remove timeout option from postgresql connection configuration --- install/source.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/install/source.rst b/install/source.rst index 9d754b81..0e1ff61c 100644 --- a/install/source.rst +++ b/install/source.rst @@ -199,7 +199,6 @@ file could look like. Please also have a look at adapter: postgresql database: zammad pool: 50 - timeout: 5000 encoding: utf8 username: zammad password: changeme