@@ -55,10 +56,10 @@ The tech group is responsible for operating and maintaining the following servic
- tech governance
-[server access](https://www.loomio.org/d/jrbG5tue/server-access)(to vote for giving people access to server)
# Mastodon runbook
Our fediverse instance is the raison d`etre of the social.coop coop. This is what the community signs up for and our primary responsibility. The primary points of administration are:
Our fediverse instance is the raison d\`etre of the social.coop coop. This is what the community signs up for and our primary responsibility. The primary points of administration are:
- the [admin panel](https://social.coop/admin/dashboard)
- the [datadog dashboard](https://app.datadoghq.com/dash/host/640032656?from_ts=1667763442004&to_ts=1668368242004&live=true)
- ssh cli access Access via ssh on port 2022 e.g. `ssh user@runko.social.coop -p 2022`.
...
...
@@ -72,7 +73,7 @@ Compose is a tool for defining and running multi-container Docker applications.
## systemd services
| service | purpose |
|---|---|
|---------|---------|
| social.coop-mastodon | a service to control the mastodon installation via docker-compose |
| social.coop-remove-media | runs the media cleanup command to remove remote media >7 days old via a .timer |
| certbot | runs the renewals via .timer |
...
...
@@ -80,7 +81,7 @@ Compose is a tool for defining and running multi-container Docker applications.
## logs
| command | purpose |
|---|---|
|---------|---------|
| systemctl list-timers | lists timers! |
| journalctl -f | tail ALL system logs |
| docker-compose logs -f web | view and tail web logs (when in `/opt/social.coop/sauce/docker/`) |
...
...
@@ -92,8 +93,9 @@ Compose is a tool for defining and running multi-container Docker applications.
## Service management
All of these commands must be run on runko.social.coop in the `/opt/social.coop/sauce/docker/` directory.
| command | purpose |
|---|---|
|---------|---------|
| `docker-compose ps` | List all Docker containers |
| `docker-compose stop redis` | Stop a service |
| `docker-compose start redis` | Start a service |
...
...
@@ -120,25 +122,17 @@ Location of Postgres database files: `/opt/social.coop/var/lib/postgresql/data/`
- make backup? `systemctl start pg-dump-to-s3.service`
- takes 15 mins or so?
- separate command to see backup progress
- make merge request on git.coop sauce repo to bump version in a couple of
places in docker-compose.yaml
- `git diff v3.1.2..v3.1.3 -- docker-compose.yml` in mastodon repo after pulling
to check whether there were any changes we should consider mirroring to our
docker-compose file
- make merge request on git.coop sauce repo to bump version in a couple of places in docker-compose.yaml
-`git diff v3.1.2..v3.1.3 -- docker-compose.yml` in mastodon repo after pulling to check whether there were any changes we should consider mirroring to our docker-compose file
- could be cool to make these merge requests in advance
- write a toot announcing upgrade and boost on admin account
- touch file on server to activate maintenance mode
- actually do the upgrade
- migration command creates a fresh web container and runs the migration
command and then deletes that new container
- migration command creates a fresh web container and runs the migration command and then deletes that new container
- turn maintenance mode off
- we copy static assets outside of the container so they can be served by nginx
- there's a command for this which moves stuff into a temporary dir in nginx
and pulls assets out of docker container into that folder in docker
container
- ssh forwarding is nice, then with `sudo -E -s` you have ssh access to stuff
you do from host machine(?)
- there's a command for this which moves stuff into a temporary dir in nginx and pulls assets out of docker container into that folder in docker container
- ssh forwarding is nice, then with `sudo -E -s` you have ssh access to stuff you do from host machine(?)
[wiki.social.coop](https://wiki.social.coop) has two main purposes:
wiki.social.coop has two main purposes:
1. a public-facing site with information about social.coop
2. the registration system for new users
...
...
@@ -189,6 +181,7 @@ The code repo for the project is [tech/wiki.social.coop](https://git.coop/social
It's configured/deployed via ansible using the [wiki.social.coop role](https://git.coop/social.coop/tech/ansible/-/tree/master/roles/wiki.social.coop) and the `wiki` tag, so `ansible-playbook server.playbook.yml --tags wiki` will set it up.
The configuration secrets are stored in the [pass repo](https://git.coop/social.coop/tech/pass) at: