Difference between revisions of "Chat"

From Fixme.ch
Jump to: navigation, search
(Current)
(Current)
Line 43: Line 43:
 
mattermost-app-b68b5cdb-5jlhj    1/1    Running  5          308d
 
mattermost-app-b68b5cdb-5jlhj    1/1    Running  5          308d
 
postgresql-db-59ffdffd84-klkw2  1/1    Running  4          466d
 
postgresql-db-59ffdffd84-klkw2  1/1    Running  4          466d
 +
 +
# Watch the logs of the newly created pod
 +
ubuntu@k8s:~$ kubectl logs -n mattermost -f mattermost-app-b68b5cdb-5jlhj
 
</pre>
 
</pre>
  

Revision as of 15:58, 15 January 2020

Description

Goal

  • Initial goal was to get out of slack
  • The other goal is to have a userfriendly chat, better than IRC (which still have its use cases of course)

Team chat.png

Component

Upgrade

Current

Work in progress

ssh ubunut@k8s.fixme.ch

# Backup
ubuntu@k8s:~$ rsync -av /srv/chat.fixme.ch/ /root/backup-chat-$(date +'%Y-%m-%d')/

# Upgrade
ubuntu@k8s:~$ sudo docker pull mattermost/mattermost-prod-app:5.9.8
ubuntu@k8s:~$ kubectl -n mattermost edit deployment.apps/mattermost-app

# Update the image tag to be to the last version (not latest!), ex:
# image: mattermost/mattermost-prod-app:5.8.0
# image: mattermost/mattermost-prod-app:5.9.8
# save/quit

# Watch the pods being restarted

ubuntu@k8s:~$ kubectl get pods -n mattermost -w
NAME                             READY   STATUS    RESTARTS   AGE
mattermost-app-b68b5cdb-5jlhj    1/1     Running   5          308d
postgresql-db-59ffdffd84-klkw2   1/1     Running   4          466d

# Watch the logs of the newly created pod
ubuntu@k8s:~$ kubectl logs -n mattermost -f mattermost-app-b68b5cdb-5jlhj

Old

  • This is outdated since we migrated to Kubernetes
# ssh root@chat.fixme.ch
systemctl stop mattermost
autopostgresqlbackup
ls -l /var/lib/autopostgresqlbackup/daily/mattermost/

su - chat

# Get the TEAM edition (not the enterprise version)
# VERSION from http://about.mattermost.com/download/

cd mattermost
VERSION=3.6.2
OLDVERSION=$(/home/chat/mattermost/bin/platform version 2>&1 | head -n 1 | awk '{print $2}')

cd
wget https://releases.mattermost.com/$VERSION/mattermost-team-$VERSION-linux-amd64.tar.gz
mv mattermost mattermost-$OLDVERSION
tar xvf mattermost-team-$VERSION-linux-amd64.tar.gz
rsync -a ./mattermost-$OLDVERSION/config/ ./mattermost/config/
exit

setcap cap_net_bind_service=+ep /home/chat/mattermost/bin/platform
systemctl start mattermost
tail -F /home/chat/mattermost/logs/mattermost.log

Channel naming convention

  • 10_* = general/association
  • 20_* = events
  • 30_* = projects/topics
  • 40_* = other
  • 99_* = archived channels

Participants