Charm architecture
For an overview of Mattermost architecture, see this page on the Mattermost site. A brief summary of the key points is provided below:
At its core, Mattermost is a single-compiled Go binary that is exposed as a Restful JSON web server with Javascript and Go clients. See the Restful API docs here.
It provides the following, supported in this charm:
- RESTful JSON Web Service: Handles all incoming API requests (from web clients, apps, and integrations) and ensures that responses are formatted in JSON. Acts as the communication bridge between the clients (Access Layer) and backend systems.
- Authentication client: provides the functionality for users to log into Mattermost via email address and password in Team Edition. Enterprise E20 adds the ability to authenticate using SAML SSO providers, which this charm supports.
- Authentication Provider: Provides pluggable authentication frameworks to support OAuth, SSO, and third-party identity services. Particularly important for enterprise environments with centralized identity management.
- Notification service: sends notifications via SMTP or a Push Notification Service for mobile applications.
- Data management service: connects to supported databases and file storage solutions (local or Amazon S3), and manages the reading and writing of data to and from them.
The binary talks to a PostgreSQL database and a filestore such as S3.
Charm architecture diagram
C4Component
title Component diagram for Mattermost Charm
Container_Boundary(mattermost, "Mattermost") {
Component(charm, "Mattermost App", "", "Mattermost application")
}
Containers
Configuration file for the containers can be found in the charm repository.
Mattermost
Mattermost is a single-compiled Go binary that is exposed as a Restful JSON web server with Javascript and Go clients.
The server is started in HTTP mode (port 8065
) serving all the content.
The workload that this container is running is defined in the Dockerfile in the charm repository.
OCI images
The OCI image is built using Docker that is defined in the Dockerfile using launchpad OCI recipe. It is then published to Dockerhub.
Integrations
PostgreSQL
PostgreSQL is an open-source object-relational database used by Mattermost to store all the data needed.