From 582e4ca89bc7848fc0b56dabc42e6f4abeee9b74 Mon Sep 17 00:00:00 2001 From: amanita Date: Wed, 8 Feb 2023 20:57:00 +0100 Subject: [PATCH] eine anleitung fuers zammad update --- technikzeugs/update-zammad.md | 82 +++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 technikzeugs/update-zammad.md diff --git a/technikzeugs/update-zammad.md b/technikzeugs/update-zammad.md new file mode 100644 index 0000000..875e859 --- /dev/null +++ b/technikzeugs/update-zammad.md @@ -0,0 +1,82 @@ +# Updating Debian on zammad vm +As always, debian needs updates from time to time. +Here i wrote down the last update procedure, to guide +everyone else who follows this path, since our email setup +is sadly very important to us. + +## disable mail +Disable Email in the Zammad webinterface to make zammad unable to recieve mails until it is proven to work fine. Otherwise we could loose emails, when we are forced to migrate back + +## Clone vm +Log in into the vm server (sol). +Check if there is enough free space `df -h` + +Stop the vm. +At our setup this is done via + + systemctl stop vm@zammad + +Copy the virtual-disk: + + cp /var/lib/vm/zammad /var/lib/vm/zammad-backup-before-update + +## Start zammad again + + systemctl start vm@zammad + +## Update Debian, Zammad and elasticsearch + +Log in into zammad vm. +Do a full systemupdate. +reboot + +Change `/etc/apt/sources.list` and `/etc/apt/sources.list.d`: +Disable all external package repos +Exchange _buster_ against _bullseys_ ( in vim with `%s/buster/bullseye/g` + +Stop postgres: `systemctl stop postgresql` + +update package lists and do full-upgrade + + apt update + apt full-upgrade + +reboot + +## Update Zammad and elasticsearch +Reanable sources.list.d and use the correct repo for your debian version + +Follow these instructions for elasic search https://docs.zammad.org/en/latest/install/elasticsearch.html + +apt update && apt upgrade +to update elastic search + +change permissions for /etc/default/elasticsearch + + chmod elasticsearch:elasticsearch /etc/default/elasticsearch + +update the ingest-attachment plugin + + /usr/share/elasticsearch/bin/elasticsearch-plugin remove ingest-attachment + /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment + +add a systemd-drop in to increase elasticsearch timout to make starting possible + + mkdir /etc/systemd/system/elasticsearch.service.d + echo -e "[Service]\nTimeoutStartSec=180" | tee /etc/systemd/system/elasticsearch.service.d/startup-timeout.conf + +And see, that elastic search 7.x doesn not like your indices from 5.6 + + +## Disable elasticsearch alltogether + + systemctl stop elasticsearch + systemctl disable elasticsearch + +go to rubyconsole with `zammad run rails c` + + Setting.set('es_url', '') + + + +