Skip to content

Commit

Permalink
Version 1.3.0 (#206)
Browse files Browse the repository at this point in the history
* feat: 0.19.x

* chore: upgrade pictrs to 0.4.6

* chore: upgrade pictrs to 0.4.7

* chore: readme upgrade instructions

* Update README.md

1.3.1 stuff

* fix: remove 1.3.1 - wrong branch

* fix: remove placeholder about downtime

* fix: prettier thinks this is better...

* fix: add back downtime nonsense!

* fix: fix command runner

* fix: complete docs with estimated downtimes and ways to upgrade pictrs
  • Loading branch information
ticoombs authored Dec 18, 2023
1 parent 6ecaeaa commit 82fefee
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,48 @@ If you wish to see another distribution on the list, please test on the latest c
Since version `1.1.0` we no longer default to using `main` but use tags to make sure deployments are versioned.
With every new release all migration steps shall be written below so make sure you check out the [Lemmy Releases Changelog](https://github.com/LemmyNet/lemmy/blob/main/RELEASES.md) to see if there are any config changes with the releases since your last read.

### Upgrading to 1.3.0 (Lemmy 0.19.0 & pictrs-0.4.7)

This is a major change and has required reading! tl;dr

- Lemmy has been upgraded to 0.19.0
- pict-rs has been upgraded to 0.4.7
- pict-rs has not been integrated with postgres yet
- "Optional Modules" are now available to be added to your lemmy install as provided by the community.
- The first being pictrs-safety

#### Steps

- Prepare to have downtime as the database needs to perform migrations!
- Run `git pull && git checkout 1.3.0`
- Run your regular deployment. Example: `ansible-playbook -i inventory/hosts lemmy.yml --become`
- Lemmy will now be down! In testing this takes from 20 to 60 minutes.
- If you are bored you can ssh into your server, and check the logs on postgres for updates
- `docker compose logs -f postgres` while ssh'd and in your Lemmy directory

#### Update your pict-rs sled-database (Optional)

If you are happy for pict-rs to be down _for a while_ go straight to our `1.3.1` git tag which updates pictrs to 0.5.0. Otherwise keep reading.
Starting with 0.5.0 your database will automatically upgrade to the latest version, which will cause downtime for your users.
As such there is an intermediary step where you can upgrade your database in the background to prepare for 0.5 (Reference documentation)[https://git.asonix.dog/asonix/pict-rs/releases#user-content-upgrade-preparation-endpoint]. This ensure no-one is caught out by unforseen downtime of multiple services.

Once you have deployed lemmy-ansible `1.3.0` tag, please continue (if you want):

- Take note of what your pict-rs API Key is under `vars.yml`
- Take note of what your docker network name is. (It's normally the domain without any extra characters)
- You should be able to find it via: `docker network ls | grep _default` if in doubt.
- Run the following command replacing `api-key` with the pict-rs api key, & `youdomain` with the network name.
- `docker run --network yourdomain_default --rm curlimages/curl:8.5.0 --silent -XPOST -H'X-Api-Token: api-key' 'http://pictrs:8080/internal/prepare_upgrade'`
- This will start the background process updating your database from 0.4 to 0.5 compatible.

This is only Optional, and takes a shorter amount of time than the Lemmy database upgrade, but on huge installations it may take a lot longer.

#### Optional Module(s)

Our first optional module is [pictrs-safety](https://github.com/db0/pictrs-safety). See the repo linked for more information, especially for integration with pictrs (which is what it is for) Thanks to @db0 for their contribution.
See the `pictrs_safety_env_vars` under `examples/vars.yml` for relevant options (and the two password variables)
To enable this module to be used you must ADD `pictrs_safety: true` to your `vars.yml`.

### Upgrading to 1.2.1 (Lemmy 0.18.5)

This is a minor change which fixes the issue with the Postgres container not using the `customPostgres.conf` file.
Expand Down
2 changes: 1 addition & 1 deletion templates/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ services:
logging: *default-logging

pictrs:
image: docker.io/asonix/pictrs:0.4.3
image: docker.io/asonix/pictrs:0.4.7
# this needs to match the pictrs url in lemmy.hjson
hostname: pictrs
# we can set options to pictrs like this, here we set max. image size and forced format for conversion
Expand Down

0 comments on commit 82fefee

Please sign in to comment.