GithubHelp home page GithubHelp logo

mattermost-kubernetes's Introduction

Mattermost Kubernetes (Beta)

This is the helm chart for Mattermost Enterprise Edition. It is in beta and subject to changes but is used by Mattermost internally to run some CI servers.

Pre requisites

To use the Mattermost Enterprise Helm Chart you will need first a running Kubernetes cluster or Minikube.

If you want to expose the application to the outside, you will need to configure some ingress in the Kubernetes and also if you want to get ssl certificates automatically you can use cert-manager, you also can use kube-lego but it is deprecated. You can choose the one that you are most comfortable. We use the nginx-ingress and to install this in your Kubernetes cluster you can follow this documentation or also can use the helm charts

For cert-manager follow this and here is the helm charts

Configuration

To start, copy mattermost-helm/values.yaml and name it config.yaml. This will be your configuration file for the Mattermost helm chart.

DNS

Depending on the DNS service you're using, the exact steps will differ but generally to point your domain name at your release you can do the following:

Note that your helm release must already be installed and running.

  1. Run kubectl describe svc <release-name>-nginx-ingress-controller
  2. Copy the domain name beside "LoadBalancer Ingress:"
  3. On your DNS service, create a CNAME record pointing from the domain you'd like to use to the domain name you just copied
  4. Save that and wait 10-15 minutes for the DNS change to propagate

TLS/SSL

To configure the chart to use Let's Encrypt to register and get a TLS certificate, do the following:

  • Set tls.enabled to true
  • Set tls.hostname to the domain name that will be hosting your Mattermost instance

Now, install or upgrade your helm release, wait a couple minutes and go to your domain.

MySQL

We are using the incubator/mysqlha chart to be able to get HA for the databases. Since this is still in the incubator phase you need to add the repository:

helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/

MySQL Backup / Restore

To backup / restore you Mattermost Database please follow this how-to.

Install

helm repo add mattermost https://releases.mattermost.com/helm
helm upgrade -f config.yaml mattermost-helm

Getting started using minikube

Install minikube and kubectl

See: https://kubernetes.io/docs/tasks/tools/install-minikube/

Launch minikube

The helm charts start a lot of containers, and it will work better if you launch minikube with additional memory and CPU. You also need to enable persistent volume mapping. This only needs to be done the first time you launch minikube. The settings will persist across restarts. If you need to modify the values try minikube delete and minikube stop

minikube start --memory 4096 --cpus 4 --mount

Install and start Helm

See: https://docs.helm.sh/using_helm/#quickstart

Once helm is installed, run helm init to get it loaded onto minikube

You may need to add some additional repos for helm

helm repo add mattermost https://releases.mattermost.com/helm
helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/

Launch Mattermost

The helm charts have external dependencies, fetch them with:

helm dependency update

Once dependencies have been loaded, you can launch the charts directly with:

helm install ./mattermost-helm

If you have a custom config you would like to use (say a license key), create a config.yaml

To list options for mattermost-helm:

helm inspect values mattermost-helm

Create a yaml file config.yaml to overide any defaults you want to change and install using:

helm install -f config.yaml ./mattermost-helm

Tearing down your Mattermost deployment

If you are done with your deployment and want to delete it, you can use helm delete <NAME> where is the name of your deployment. If you don't know the name of your deployment, you can use helm ls to find it.

You may also want/need to delete the persistent volumes from minikube. To do that use kubectl get pv,pvc to get a list of persistent volumes and claims, and use kubectl delete to delete them.

Developing the helm charts

If you are going to modify the helm charts, it is helpful to use --dry-run (doesn't do an actual deployment) and --debug (print the generated config files) when running helm install.

Helm has partial support for pulling values out of a subchart via the requirements.yaml. It also has limited support for pushing values into subcharts. It does not support using templating inside a values.yaml file.

mattermost-kubernetes's People

Contributors

jwilander avatar cpanato avatar coreyhulen avatar crspeller avatar grundleborg avatar dlahn avatar brunzer avatar jespino avatar escardin avatar

Watchers

AmesianX avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.