puppet-mastodon/README.md

109 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

2023-11-28 22:15:25 +01:00
# mastodon
2023-11-26 11:45:00 +01:00
2023-11-28 18:52:21 +01:00
This module install and manage Mastodon, Redis and PostgreSQL servers.
2023-11-26 11:45:00 +01:00
## Table of Contents
1. [Description](#description)
1. [Setup - The basics of getting started with mastodon](#setup)
* [What mastodon affects](#what-mastodon-affects)
* [Setup requirements](#setup-requirements)
* [Beginning with mastodon](#beginning-with-mastodon)
1. [Usage - Configuration options and additional functionality](#usage)
1. [Limitations - OS compatibility, etc.](#limitations)
1. [Development - Guide for contributing to the module](#development)
## Description
2023-11-28 18:52:21 +01:00
Mastodon https://joinmastodon.org/ is a decrentralized social network using the ActivityPub protocol to federate.
This module install and configure it with the required components (PostgreSQL and Redis).
2023-11-26 11:45:00 +01:00
## Setup
2023-11-28 19:11:42 +01:00
### What mastodon affects
2023-11-26 11:45:00 +01:00
2023-11-28 18:52:21 +01:00
This module will install PostgreSQL and Redis server.
2023-11-26 11:45:00 +01:00
2023-11-28 19:11:42 +01:00
### Setup Requirements
You will need a host name registered in DNS.
### Beginning with mastodon
2023-11-26 11:45:00 +01:00
2023-11-28 18:52:21 +01:00
You need to generate these secrets:
- mastodon::db_password
- mastodon::secret_key_base
- mastodon::otp_secret
- mastodon::vapid_private_key
- mastodon::vapid_public_key
2023-11-26 11:45:00 +01:00
## Usage
2024-02-16 17:48:17 +01:00
In your Puppetfile include:
```ruby
mod 'mastodon',
:git => 'https://codeberg.org/adelgado/puppet-mastodon.git',
:branch => 'production'
```
Hiera data to set up the instance:
2023-11-28 22:15:13 +01:00
```yaml
classes:
- mastodon
mastodon::hostname: mastodon.example.org
mastodon::db_host: /var/run/postgresql
mastodon::db_port: 5432
mastodon::db_name: mastodon
mastodon::db_user: mastodon
mastodon::users:
- username: my_custom_admin
email: admin@example.org
confirmed: true
role: Owner
mastodon::config:
SINGLE_USER_MODE: false
REDIS_HOST: 127.0.0.1
SMTP_SERVER: 127.0.0.1
SMTP_PORT: 25
SMTP_AUTH_METHOD: none
SMTP_OPENSSL_VERIFY_MODE: none
SMTP_ENABLE_STARTTLS: auto
SMTP_FROM_ADDRESS: 'Mastodon <notifications@example.org>'
```
And some secrets in eyaml (you can do a first run that fails and
then run ```RAILS_ENV=production bundle exec rake mastodon:setup``` to create this secrets).
```yaml
mastodon::db_password: >
ENC[PKCS7,]
mastodon::secret_key_base: >
ENC[PKCS7,]
mastodon::otp_secret: >
ENC[PKCS7,]
mastodon::vapid_private_key: >
ENC[PKCS7,]
mastodon::vapid_public_key: >
ENC[PKCS7,]
```
2024-02-16 17:45:09 +01:00
## Updating your instance
The module deploys a script to do updates. But many updates required extra
steps that are not included in the script, so use it at your own risk.
This script requires a Github token with access to read public repositories.
2023-11-26 11:45:00 +01:00
## Limitations
2023-11-28 22:15:13 +01:00
Tested in Ubuntu
2023-11-26 11:45:00 +01:00
## Development
2023-11-28 22:15:13 +01:00
## Release Notes/Contributors/Etc.