Mattermost server snap

I wish to request the mattermost server as a snap. I see there already exist snaps for the mattermost client (mattermost-desktop), and the mattermost bridge (matterbridge). But how about the server itself?

I’ve taken a look at the mattermost server build process. It’s very docker-centric at present.
Please see my detailed comments here.

In summary:

… the build system heavily assumes the AMD64 architecture, even when you download the source yourself, and try to make/build/compile/install/whatever it on armv7l . The build system would require heavy re-architecting to come out of this AMD64 assumption. It also doesn’t accommodate those who would prefer to not use docker (and thereby save about 3GB of RAM during the build process).

In order to create a snap, the builds which are published unofficially (by SmartHoneyBee, a very helpful person), and get mentioned here (see step 1 there) are actually the best starting point, as they are “docker-free”.

You’ll definitely also want to look at SmartHoneyBee’s TravisCI configs, which autogenerate the docker-free builds.

There’s a low-hanging-fruit opportunity, which could be provided by a snap, which is not being addressed by the docker build of Mattermost. The official Mattermost docker builds pull in the MySQL docker image. This MySQL docker image is currently available for AMD64 only, not ARM64, let alone ARM32. Same goes for a stock, tarball download of MySQL for linux: AMD64 only.

The official Mattermost documentation also explains how to alternately install using Postgres (instead of MySQL). Should Postgres be favored in a snap, this also makes it easier to have snaps for AMD64, and ARM64, and ARM32 (with high assurance of official compatibility with Mattermost).

Also, if the snap would use MariaDB instead (and MariaDB is notably not in the official Mattermost documentation, but I’ve installed it myself with Mattermost, and it seems to work just fine), then a snap would be able to again provide Mattermost for AMD64, and ARM64 and ARM32, which isn’t doable via the docker method at present. Again, such a snap could reach out to the ARM64 and ARM32 platforms, unlike docker.

I wrote some instructions for installing Mattermost, which totally avoid Docker:

Mattermost Team Server 5.21 is installable, and performs well in Ubuntu 18.04.4/19.10 64bit. Daily driver worthy!

Those instructions work on a Raspberry Pi 4 (ARM 64-bit), however the instructions should also work on other architectures as well, such as AMD64. SmartHoneyBee does make a Docker-free build for ARM64 on Linux!

Note: the mattermost folks are working on a snap here: https://github.com/mattermost/mattermost-server/issues/4554#issuecomment-544824307

1 Like