software:mattermost

mattermost

mattermost hat den Anspruch eine opensource-Alternativen zu dem bekannten Diensten slack und microsoft teams zu bieten. Es kann in Eigenregie betrieben werden. Es stehen zahlreiche Clients für Mobil- und Desktopbetriebssyteme zur Verfügung.

Wichtige Features (z.B. push aufs Handy bzw. Kanalbenachrichtigungen ohne Erwähnung, LDAP-Anbindung) erfordern eine enterprise-Version. Alternativ kann gitlab Oauth-backen dienen bzw. Mattermost-LDAP Module.

In version v5.32 kam die freie Sortierbarkeit von Kanälen dazu und eigene Kategorien, siehe https://mattermost.com/blog/custom-collapsible-channel-categories/. Ab Version 6.x zogen die Preise an und der Hersteller fing an mattermost als eine Art Produktivitätsplattform zu positionieren.

Nützlich sind die webhooks, damit kann mattermost auch von anderen Programmen als Nachrichtenzentrale benutzt werden. Es sind HTTP POST mit JSON-Payload.

Leider existieren keine offiziellen Pakete, eigene Pakete können mit dem mattermost-packager erzeugt werden.

detaillierte Anleitungen für verschiedene Distributionen bzw. ein paar mehr oder weniger gute rollen auf ansible-galaxy.

Hallo, mattermost ist unser Instant messenger, damit lassen sich für kleine Absprachen so einige mails (mit CC) sparen. Die Oberfläche ist so ähnlich wie slack und damit nicht so unübersichtlich wie teams in Sachen chat.
 Bei direkten Ansprachen "@all" im Channel oder "@Benutzername" bekommt man auch mails falls kein Client angemeldet ist. Das lässt sich aber einstellen. Clients für Handy/PC usw. bekommt ihr hier:
https://mattermost.com/download/#

Datei conf/config.json

:!: Die Konfiguration kann nicht ohne backup im laufenden Betrieb verändert werden, beim unit-neustart via systemctl werden die Änderungen resettet (u.U. auch auf die leere Standardconfig!).

löschen: /opt/mattermost/bin/mattermost team delete $NAME (2x mit YES antworten)

Programmverzeichnis /opt/mattermost: Eigentümer root, Gruppe root, nur die folgende Ordner verlinken in das Datenverzeichnis.

  • config → ../mattermost-daten/config/
  • data → ../mattermost-daten/data/
  • logs → ../mattermost-daten/logs/
  • plugins → ../mattermost-daten/plugins/

Datenverzeichnis /opt/mattermost-daten: Eigentümer mattermost, Gruppe mattermost

  • config
  • data
  • logs
  • plugins

/lib/systemd/system/mattermost.service

[Unit]
Description=Mattermost
After=network.target
After=mysql.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=60
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
WantedBy=multi-user.target

Important Upgrade Notes

Grundsätzlich ist durch eine Trennung von Daten und Code das upgrade relativ stressfrei und kann mit symlinks passieren:

  1. service mattermost stop
  2. backup machen
  3. symlink mattermost wegnehmen!! (wird sonst durch neue version ersetzt)
  4. wget https://releases.mattermost.com/$VERSION/mattermost-$VERSION-linux-amd64.tar.gz
  5. tar xvjf mattermost-$VERSION-linux-amd64.tar.gz
  6. mv matermost mattermost-x.y.z
  7. symlink mattermost auf neue Version zeigen lassen:
    ln -s mattermost-x.y.z mattermost
  8. symlinks für die Verzeichnisse unterhalb von mattermost-daten anlegen:
    1. inhaltlich:
      1. config → ../mattermost-daten/config/
      2. data → ../mattermost-daten/data/
      3. logs → ../mattermost-daten/logs/
      4. PluginSettings → Directory: Standard ist: plugins → ../mattermost-daten/plugins/
      5. PluginSettings → Client-Directory muss existieren, Standard ist „./client/plugins“:
        mkdir mattermost/client/plugins && chown mattermost.mattermost mattermost/client/plugins
    2. Befehle:
      cd mattermost
      mv config config-empty
      ln -s  ../mattermost-daten/config
      ln -s  ../mattermost-daten/data
      rmdir logs
      ln -s ../mattermost-daten/logs
      ln -s ../mattermost-daten/plugins
      mkdir client/plugins
      chown mattermost.mattermost client/plugins
  9. setcap cap_net_bind_service=+ep /opt/mattermost/bin/mattermost

    1)

  10. systemctl start mattermost

Wunschliste:

Geht leider nicht auf der Oberfläche, aber in der Datenbank

USE mattermost;
UPDATE Users SET Username = 'NEU' WHERE Username = 'ALT';

Fehlermeldung: MarkChannelsAsViewed: Unable to update the last viewed at time., failed to fetch threads: Error 1267: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '='

Bugreport: [SOLVED] After upgrading to 5.29 messages fail to mark as read

Lösung: Die Datenbank muss angepasst werden: mysql -u mmuser -p < changes.sql

changes.sql:

ALTER DATABASE mattermost CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE mattermost;
ALTER TABLE Audits CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Bots CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE ChannelMemberHistory CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE ChannelMembers CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Channels CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE ClusterDiscovery CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE CommandWebhooks CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Commands CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Compliances CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Emoji CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE FileInfo CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE GroupChannels CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE GroupMembers CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE GroupTeams CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE IncomingWebhooks CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Jobs CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Licenses CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE LinkMetadata CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE OAuthAccessData CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE OAuthApps CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE OAuthAuthData CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE OutgoingWebhooks CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE PluginKeyValueStore CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Posts CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Preferences CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE ProductNoticeViewState CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE PublicChannels CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Reactions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Roles CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Schemes CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Sessions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE SidebarCategories CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE SidebarChannels CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE STATUS CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Systems CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE TeamMembers CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Teams CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE TermsOfService CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE ThreadMemberships CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Threads CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Tokens CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE UploadSessions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE UserAccessTokens CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE UserGroups CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE UserTermsOfService CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE Users CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
err_where":"GetAllTeamsPage","http_code":500,"err_details":"failed to find Teams: Error 1267: Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '='"}

Lösung: Die Datenbank muss angepasst werden, siehe auch: https://docs.mattermost.com/install/software-hardware-requirements.html mysql -u mmuser -p < changes.sql

changes.sql:

ALTER DATABASE mattermost CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
USE mattermost;
ALTER TABLE Audits CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Bots CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE ChannelMemberHistory CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE ChannelMembers CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Channels CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE ClusterDiscovery CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE CommandWebhooks CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Commands CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Compliances CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Emoji CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE FileInfo CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE GroupChannels CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE GroupMembers CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE GroupTeams CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE IncomingWebhooks CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Jobs CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Licenses CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE LinkMetadata CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE OAuthAccessData CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE OAuthApps CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE OAuthAuthData CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE OutgoingWebhooks CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE PluginKeyValueStore CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Posts CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Preferences CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE ProductNoticeViewState CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE PublicChannels CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Reactions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Roles CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Schemes CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Sessions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE SidebarCategories CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE SidebarChannels CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE STATUS CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Systems CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE TeamMembers CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Teams CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE TermsOfService CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE ThreadMemberships CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Threads CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Tokens CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE UploadSessions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE UserAccessTokens CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE UserGroups CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE UserTermsOfService CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
ALTER TABLE Users CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;

1)
vor 5.x:
setcap cap_net_bind_service=+ep /opt/mattermost/bin/platform