-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c937fe8
commit c699d10
Showing
1 changed file
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,97 @@ | ||
![Magout](./magout_logo.svg) | ||
|
||
Magout is a Kubernetes operator for Mastodon, which allows you to deploy Mastodon servers really easily on Kubernetes. | ||
Magout is a successor of [Mahout](https://github.com/ushitora-anqou/mahout). | ||
|
||
Currently, Magout supports Kubernetes 1.29, 1.30, and 1.31. | ||
|
||
## Quick Start | ||
|
||
Install a Magout controller via Helm. | ||
|
||
``` | ||
helm install \ | ||
--create-namespace \ | ||
--namespace magout \ | ||
--repo https://ushitora-anqou.github.io/magout \ | ||
magout \ | ||
magout | ||
``` | ||
|
||
Install a Mastodon server managed by the Magout controller. First, write a values.yaml: | ||
|
||
```yaml | ||
fullnameOverride: "mastodon" | ||
|
||
mastodonVersion: | ||
image: ghcr.io/mastodon/mastodon:v4.2.12 # Change here to the latest version. | ||
streamingImage: ghcr.io/mastodon/mastodon:v4.2.12 # Change here to the latest version. | ||
|
||
gateway: | ||
serverName: mastodon.test # Change here to your domain. | ||
|
||
mastodonServer: | ||
web: | ||
envFrom: | ||
- secretRef: | ||
# Change here to your Secret name where Mastodon's environment variables | ||
# such as LOCAL_DOMAIN, DB_HOST, and REDIS_HOST are defined. | ||
name: secret-env-web | ||
sidekiq: | ||
envFrom: | ||
- secretRef: | ||
# Change here. | ||
name: secret-env-sidekiq | ||
streaming: | ||
envFrom: | ||
- secretRef: | ||
# Change here. | ||
name: secret-env-streaming | ||
``` | ||
Then, use helm: | ||
``` | ||
helm install \ | ||
--create-namespace \ | ||
--namespace mastodon \ | ||
--repo https://ushitora-anqou.github.io/magout \ | ||
-f values.yaml \ | ||
magout-mastodon-server \ | ||
magout-mastodon-server | ||
``` | ||
|
||
Magout 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` and `streamingImage` field in the values.yaml file and run `helm upgrade`. | ||
Magout will take care of the necessary DB migrations and roll out the new deployments. | ||
|
||
## Features & Tips | ||
|
||
- You can restart web, streaming, and/or sidekiq pods on a regular schedule by using the `periodicRestart` field. [See this test manifest](https://github.com/ushitora-anqou/magout/blob/c937fe8f299724c907c398ea5a08b1e157cb0bf7/test/e2e/testdata/values-v4.3.0b1-restart.yaml#L40-L42) for details. | ||
- You can add your favourite annotations to the pods. [See this test manifest](https://github.com/ushitora-anqou/magout/blob/master/test/e2e/testdata/values-v4.3.0b1-restart.yaml#L31-L32). 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. | ||
- Magout can work across namespaces, i.e. you can run Magout in one namespace, and create Mastodon resources in another. Of course you can also put them in the same namespace. | ||
|
||
## License | ||
|
||
- `charts/magout-mastodon-server/templates/gateway.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: | ||
|
||
``` | ||
Magout -- A Kubernetes Operator for Mastodon | ||
Copyright (C) 2024 Ryotaro Banno | ||
This 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/. | ||
``` |