Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ushitora-anqou/mahout
A K8s operator for Mastodon, written in OCaml and model checked by NuSMV.
https://github.com/ushitora-anqou/mahout
docker kubernetes mastodon nusmv ocaml
Last synced: 5 days ago
JSON representation
A K8s operator for Mastodon, written in OCaml and model checked by NuSMV.
- Host: GitHub
- URL: https://github.com/ushitora-anqou/mahout
- Owner: ushitora-anqou
- License: other
- Created: 2024-01-26T13:27:16.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-04-14T14:18:11.000Z (8 months ago)
- Last Synced: 2024-05-01T16:53:57.504Z (8 months ago)
- Topics: docker, kubernetes, mastodon, nusmv, ocaml
- Language: OCaml
- Homepage:
- Size: 1.05 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MAHOUT IS ARCHIVED! Users should use [Magout](https://github.com/ushitora-anqou/magout), which supersedes Mahout.
# Mahout -- A Kubernetes Operator for Mastodon
Mahout is a Kubernetes operator to deploy Mastodon nicely on your cluster. It's being used for [mstdn.anqou.net](https://mstdn.anqou.net/). Mahout is written in OCaml.
Currently, Mahout supports Kubernetes 1.28, 1.29, and 1.30.
## Quick Start
Install Mahout via Helm.
```
helm install --namespace mahout --repo https://ushitora-anqou.github.io/mahout mahout mahout
```Create and apply a `Mastodon` resource for your server:
```yaml
apiVersion: mahout.anqou.net/v1alpha1
kind: Mastodon
metadata:
name: mastodon
spec:
serverName: "mastodon.example"
image: "ghcr.io/mastodon/mastodon:v4.2.0" # Change here to the latest version
envFrom:
- secretRef:
# Define necessary Mastodon's environment vairables such as LOCAL_DOMAIN.
name: secret-env
gateway:
image: nginx:1
```Mahout will then start the necessary migration jobs and deployments for nginx, web, streaming, and sidekiq.
When upgrading Mastodon, all you need to do is edit the `image` field in the `Mastodon` resource.
Mahout will take care of the necessary DB migrations and roll out the new deployments.## Features & Tips
- You can restart mastodon-web pods on a regular schedule by using the `periodicRestart` field. [See this test manifest](https://github.com/ushitora-anqou/mahout/blob/d8abd2c92a27064f6f4c3567548582b7992ae124/e2e/manifests/mastodon0-v4.2.0-restart.yaml#L30-L31) for details.
- You can add your favourite annotations to the pods. [See this test manifest](https://github.com/ushitora-anqou/mahout/blob/d8abd2c92a27064f6f4c3567548582b7992ae124/e2e/manifests/mastodon0-v4.2.0-restart.yaml#L28-L29). This feature is especially useful in combination with [stakater/Reloader](https://github.com/stakater/Reloader) to reload configmaps and secrets specified in the Mastodon resources.
- Mahout can work across namespaces, i.e. you can run Mahout in one namespace, and create Mastodon resources in another. Of course you can also put them in the same namespace.## License
- `charts/mahout/templates/gateway-nginx-conf-template.yaml`
- A fork of Mastodon's `dist/nginx.conf`. See the file for the details.The rest of the files are licensed under AGPL-3.0:
```
Mahout -- A Kubernetes Operator for Mastodon
Copyright (C) 2024 Ryotaro BannoThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.You should have received a copy of the GNU Affero General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
```