docs
docs copied to clipboard
Simplifying upgrade instructions
I've upgraded my self-hosted mattermost multiple times with a much simpler set of instructions and wonder if the documentation could be improved by a few small changes.
- Rename the top-level directory in the tar file so that it uses the semvar name,
./mattermost-X.Y.Zinstead of just./mattermost. This would eliminate the need for thetar --transformstep or extracting in a temp directory and moving. - Use a symlink from
/opt/mattermostto/opt/mattermost-X.Y.Zso that the startup scripts always refer to the latest version, and so that the older versions are easier to roll-back if necessary. - Copy or move only the
data,config, andclient/pluginsdirectories to the new directory instead of the complexfindcommand to try to clean-out any old files.
My usual upgrade steps (the tar transform is necessary since the distribution tar file doesn't have the new name):
tar -xf mattermost-X.Y.Z-linux-amd64.tar.gz -C /tmp
mv /tmp/mattermost /opt/mattermost-X.Y.Z
cd /opt/mattermost-X.Y.Z
chown -R mattermost:mattermost .
mv ../mattermost/data .
mv ../mattermost/client/plugins ./client/
cp ../mattermost/config/config.json ./config/
rm /opt/mattermost
ln -s `pwd` /opt/mattermost
Thank you, @osresearch, for submitting this contribution. While this abbreviated upgrade process wouldn't replace the existing expanded product documentation, there's value in offering a condensed version of the process for experienced admins. @coltoneshaw @sadohert - Would you be open to reviewing this contribution for technical accuracy and completeness, please?
I definitely agree that this would be far more streamlined for an upgrade and management process. It would be a bit of an implementation shift for our customers but I could see some instant benefits by doing it via this process. For example the complex find command in our current docs always stumps people.
If we want to do something like this, I'm curious how we'd want to roll it out. You'd want to update both implementation and upgrade documentation for this long term.
Adding @nab-77 for visibility
@osresearch Thanks for sharing, and I specifically like the proposal for "versioning" the deployment using symlink. Can I ask for some more feedback, namely what are you feelings on an RPM/DEB package?
As @cwarnermm explained such a condensed flow would not replace, but compliment.