-- Leo's gemini proxy

-- Connecting to the.teabag.ninja:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-NZ

Updating Akkoma

2022-12-11


It's that time!


A bunch of new features, far more than I expected, considering how many requests there were!


https://meta.akkoma.dev/t/akkoma-stable-2022-12-automatic-static/225


I thought I should add a short post on updating for OTP. This assumes you're logged on as root (I always drop to root because... fuck it I know what I am doing. Mostly)



The update procedure


I always run a backup. I have dailies, but if I have to roll back then a more recent one would have less activites to sync back up from fedi.


I then ssh into the server an then run the commands as per linked above, as the `akkoma` user as required for parts of it.


Download the update:

su akkoma -s $SHELL -lc "./bin/pleroma_ctl update --branch stable"

Which should give you something like this in your terminal:

root@localhost:~# su akkoma -s $SHELL -lc "./bin/pleroma_ctl update --branch stable"
Downloading the artifact from https://akkoma-updates.s3-website.fr-par.scw.cloud/stable/akkoma-amd64.zip to /tmp/pleroma.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19.3M  100 19.3M    0     0  2931k      0  0:00:06  0:00:06 --:--:-- 4269k
Unpacking /tmp/pleroma.zip to /tmp
Backing up erlang cookie
Cookie: *******************************************====
Copying files over to /opt/akkoma
Removing files from the previous release
Removing temporary files
Restoring erlang cookie
Done! Please refer to the changelog/release notes for changes and update instructions
You probably also want to update your frontend!

---


Then stop the akkoma service

systemctl stop akkoma

Wait while it blinks the curser and stops the service, then returns you to the terminal prompt. Might be a 10 seconds or so, be patient.


Then run the migration

su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate"

Which might return something like this (subsequent updates were significantly less):

root@localhost:~# su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate"

00:02:11.005 [info] == Running 20221123221956 Pleroma.Repo.Migrations.AddHasRequestSignatures.change/0 forward

00:02:11.010 [info] alter table instances

00:02:11.021 [info] == Migrated 20221123221956 in 0.0s

00:02:11.085 [info] == Running 20221128103145 Pleroma.Repo.Migrations.AddPerUserPostExpiry.change/0 forward

00:02:11.085 [info] alter table users

00:02:11.087 [info] == Migrated 20221128103145 in 0.0s

00:02:11.089 [info] == Running 20221129105331 Pleroma.Repo.Migrations.AddNotificationActivityIdIndex.change/0 forward

00:02:11.089 [info] create index notifications_activity_id_index

00:02:11.093 [info] == Migrated 20221129105331 in 0.0s

00:02:11.095 [info] == Running 20221129110627 Pleroma.Repo.Migrations.AddBookmarksActivityIdIndex.change/0 forward

00:02:11.095 [info] create index bookmarks_activity_id_index

00:02:11.097 [info] == Migrated 20221129110627 in 0.0s

00:02:11.098 [info] == Running 20221129110727 Pleroma.Repo.Migrations.AddReportNotesActivityIdIndex.change/0 forward

00:02:11.098 [info] create index report_notes_activity_id_index

00:02:11.100 [info] == Migrated 20221129110727 in 0.0s

00:02:11.102 [info] == Running 20221129112022 Pleroma.Repo.Migrations.AddCascadeToReportNotesOnActivityDelete.up/0 forward

00:02:11.102 [info] drop constraint report_notes_activity_id_fkey from table report_notes

00:02:11.105 [info] alter table report_notes

00:02:11.113 [info] == Migrated 20221129112022 in 0.0s

00:02:11.115 [info] == Running 20221203232118 Pleroma.Repo.Migrations.AddUserFollowsHashtag.change/0 forward

00:02:11.115 [info] create table user_follows_hashtag

00:02:11.129 [info] create index user_follows_hashtag_user_id_hashtag_id_index

00:02:11.131 [info] == Migrated 20221203232118 in 0.0s

---


Restart the service and update the front-end (assumes PleromaFE)

systemctl start akkoma
su akkoma -s $SHELL -lc "./bin/pleroma_ctl frontend install pleroma-fe --ref stable"

which should give you:

root@localhost:~# su akkoma -s $SHELL -lc "./bin/pleroma_ctl frontend install pleroma-fe --ref stable"
Downloading pleroma-fe (stable)...

00:09:10.861 [info] Downloading pre-built bundle for pleroma-fe
Installing pleroma-fe (stable) to /var/lib/akkoma/static/frontends/pleroma-fe/stable
Frontend pleroma-fe (stable) installed to /var/lib/akkoma/static/frontends/pleroma-fe/stable

You probably also want to update AdminFE

su akkoma -s $SHELL -lc "./bin/pleroma_ctl frontend install admin-fe --ref stable"

---


Then check the [changelog](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/CHANGELOG.md) for any post-upgrade steps



That's it!

-- Response ended

-- Page fetched on Mon May 20 18:01:45 2024