This is the interactive script the Hachyderm team ran to upgrade to Mastodon version v4.1.3. Please note by interactive, we mean human-powered. This is not yet meant to be run in an automated fashion.
We have a couple of interesting things about our infrastructure:
- We're not running in Docker nor Kubernetes, we install directly to the host.
- We're running Arch and because of this, we're running Node v19 (not the v16 recommneded by Mastodon). This means we have to do a little more around openssl when running the assets precompile
- We run several different servers, each with a unique "role" - mastodon-web, mastodon-sidekiqs, mastodon-streaming. This provides us flexibility if we need to scale a particular component.
- We preserve X number of old versions of mastodon on our hosts (
/var/lib/mastodon-versions
) and use symlinks to/var/lib/mastodon
in the event we need to rollback.