Moar fediverse stuff…
After a little while, I came to the conclusion that the GoToSocial server I setup isn’t quite ready to do what I want - they posted a rather timely reminder shortly after I made this decision that it’s “ALPHA” software. I didn’t run into any actual issues, it’s just that there’s lots of features I wanted that they don’t implement yet… and after trawling through them looking for something I can help with it became clear that I just don’t have the Go skills required to do anything super-helpful yet.
So I decided to wait, keep that instance up, and set up a new instance on another old domain running Mastodon proper. But Mastodon itself is a bit heavier than gotosocial (read: a lot heavier, instead of a couple hundred megabytes of RAM it’s up to nearly a gigabyte on an empty instance) and required a good bit more work to set up, and since it supports video already it’ll eat more disk space too.
But I wondered how much bandwidth it’d require? So I decided to see, and set it up on my home Kubernetes cluster. This turned out to be an exercise in and of itself, it turned out lots of people have already done this work but like a dumbass I didn’t find any of this until I was most of the way done and reinvented it myself.
I’ll probably publish my stuff when I figure out how to clean up and publish the rest of my YAML.
I did figure out how to update it without any downtime too though, and it’s actually pretty nice:
Update tag/hash for all three deployments.yml to the desired new tag (don’t deploy them).
Take a backup of the pg database (
kubectl execinto the container, run
pg_dump, then move the dump file out somewhere safe).
In sidekiq’s deployment, change the command (comment the old one out) to:
command: ["/usr/bin/env", "bash", "-c", "sleep 3600"]
Deploy only sidekiq. Wait for it to pull the image.
kubectl exec -it <new sidekiq pod> -- /bin/bash; Run the pre-upgrade migrations specified in the upgrade notes.
Change the command back in sidekiq deploy.
Deploy all the things.
kubectl execinto the sidekiq pod again, run the post upgrade command(s).
Kick all the mastodon processes over after the post-upgrade commands, eg something like
kubectl rollout restart deployment mastodon-webor whatever (note that this part’s only downtimeless if you have more than one replica)
This all went fairly smoothly and for the most part it hasn’t given me any grief. The server’s been up about five days now, the media cache is sitting at about 5GB, and I have it set to throw away cached media after 7 days which should be plenty… I kinda wish there was a separate setting for video, because I could afford to keep cached photos/memes/etc for significantly longer, but c’est la vie.
I am hoping that in the next year or so I can go back to GoToSocial!