website/docs: next release notes: add upgrade instructions for postgres to 16 (#9727)
* init Signed-off-by: 4d62 <157558804+4d62ext@users.noreply.github.com> * start * db pass upd * more * oops * simplify setting up v16 service * cut off pg * finish * release breaking changes * 2024.next * i need to be less distracted * rework upgrade instructions Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * ci: remove postgres 12 tests Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * spelling Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * try? * fix release notes * iirc theres a danger thing * typo * suggestion Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: 4d62 <157558804+4d62ext@users.noreply.github.com> * suggestion Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: 4d62 <157558804+4d62ext@users.noreply.github.com> * suggestion Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: 4d62 <157558804+4d62ext@users.noreply.github.com> * suggestion Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: 4d62 <157558804+4d62ext@users.noreply.github.com> * suggestion Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: 4d62 <157558804+4d62ext@users.noreply.github.com> * suggestion Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: 4d62 <157558804+4d62ext@users.noreply.github.com> * suggestion Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: 4d62 <157558804+4d62ext@users.noreply.github.com> * Update website/docs/troubleshooting/postgres/upgrade_docker.md Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * prettier Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> * add to sidebar Signed-off-by: 4d62 <ext@4d62.me> * 🙊 Signed-off-by: 4d62 <ext@4d62.me> * make website Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> --------- Signed-off-by: 4d62 <157558804+4d62ext@users.noreply.github.com> Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> Signed-off-by: 4d62 <ext@4d62.me> Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space> Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
This commit is contained in:
2
.github/workflows/ci-main.yml
vendored
2
.github/workflows/ci-main.yml
vendored
@ -50,7 +50,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
psql:
|
psql:
|
||||||
- 12-alpine
|
|
||||||
- 15-alpine
|
- 15-alpine
|
||||||
- 16-alpine
|
- 16-alpine
|
||||||
steps:
|
steps:
|
||||||
@ -104,7 +103,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
psql:
|
psql:
|
||||||
- 12-alpine
|
|
||||||
- 15-alpine
|
- 15-alpine
|
||||||
- 16-alpine
|
- 16-alpine
|
||||||
steps:
|
steps:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
postgresql:
|
postgresql:
|
||||||
image: docker.io/library/postgres:12-alpine
|
image: docker.io/library/postgres:16-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
||||||
|
54
website/docs/releases/2024/v2024.next.md
Normal file
54
website/docs/releases/2024/v2024.next.md
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
---
|
||||||
|
title: Release 2024.next
|
||||||
|
slug: "/releases/2024.next"
|
||||||
|
---
|
||||||
|
|
||||||
|
:::::note
|
||||||
|
2024.next has not been released yet! We're publishing these release notes as a preview of what's to come, and for our awesome beta testers trying out release candidates.
|
||||||
|
|
||||||
|
To try out the release candidate, replace your Docker image tag with the latest release candidate number, such as 2024.next.0-rc1. You can find the latest one in [the latest releases on GitHub](https://github.com/goauthentik/authentik/releases). If you don't find any, it means we haven't released one yet.
|
||||||
|
:::::
|
||||||
|
|
||||||
|
## Breaking changes
|
||||||
|
|
||||||
|
### PostgreSQL minimum supported version upgrade
|
||||||
|
|
||||||
|
authentik now requires PostgreSQL version 14 or later. We recommend upgrading to the latest version if you are running an older version.
|
||||||
|
|
||||||
|
The provided Helm chart defaults to PostgreSQL 15. If you are using the Helm chart with the default values, no action is required.
|
||||||
|
|
||||||
|
The provided Compose file was updated with PostgreSQL 16. You can follow the procedure [here](../../troubleshooting/postgres/upgrade_docker.md) to upgrade.
|
||||||
|
|
||||||
|
## New features
|
||||||
|
|
||||||
|
## Upgrading
|
||||||
|
|
||||||
|
authentik now requires PostgreSQL version 14 or later. We recommend upgrading to the latest version if needed. Follow the instructions [here](../../troubleshooting/postgres/upgrade_docker.md) if you need to upgrade PostgreSQL with docker-compose.
|
||||||
|
|
||||||
|
### Docker Compose
|
||||||
|
|
||||||
|
To upgrade, download the new Compose file and update the Docker stack with the new version, using these commands:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wget -O docker-compose.yml https://goauthentik.io/version/2024.next/docker-compose.yml
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
The `-O` flag retains the downloaded file's name, overwriting any existing local file with the same name.
|
||||||
|
|
||||||
|
### Kubernetes
|
||||||
|
|
||||||
|
Upgrade the Helm Chart to the new version, using the following commands:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
helm repo update
|
||||||
|
helm upgrade authentik authentik/authentik -f values.yaml --version ^2024.next
|
||||||
|
```
|
||||||
|
|
||||||
|
## Minor changes/fixes
|
||||||
|
|
||||||
|
<!-- _Insert the output of `make gen-changelog` here_ -->
|
||||||
|
|
||||||
|
## API Changes
|
||||||
|
|
||||||
|
<!-- _Insert output of `make gen-diff` here_ -->
|
45
website/docs/troubleshooting/postgres/upgrade_docker.md
Normal file
45
website/docs/troubleshooting/postgres/upgrade_docker.md
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
---
|
||||||
|
title: Upgrade PostgreSQL on Docker Compose
|
||||||
|
---
|
||||||
|
|
||||||
|
### Dump your database
|
||||||
|
|
||||||
|
Dump your existing database with `docker compose exec postgresql pg_dump -U authentik -d authentik -cC > upgrade_backup_12.sql`.
|
||||||
|
|
||||||
|
### Stop your authentik stack
|
||||||
|
|
||||||
|
Stop all services with `docker compose down`.
|
||||||
|
|
||||||
|
### Backup your existing database
|
||||||
|
|
||||||
|
If you use Docker volumes you can run the following command: `docker volume create authentik_database_backup && docker run --rm -v authentik_database:/from -v authentik_database_backup:/to alpine sh -c 'cd /from && cp -a . /to'`. You can find the name of the `authentik_database` volume with `docker volume ls`.
|
||||||
|
|
||||||
|
If your data is a file path: `cp -a /path/to/v12-data /path/to/v12-backup`
|
||||||
|
|
||||||
|
### Delete your old database
|
||||||
|
|
||||||
|
:::::danger
|
||||||
|
Do not execute this step without checking that the backup (previous step) completed successfully.
|
||||||
|
:::::
|
||||||
|
|
||||||
|
If you use Docker volumes: `docker volume rm -f authentik_database`.
|
||||||
|
|
||||||
|
If your data is a file path: `rm -rf /path/to/v12-data`
|
||||||
|
|
||||||
|
### Modify your docker-compose.yml file
|
||||||
|
|
||||||
|
Update the PostgreSQL service image from `docker.io/library/postgres:12-alpine` to `docker.io/library/postgres:16-alpine`.
|
||||||
|
|
||||||
|
Add `network_mode: none` to prevent connections being established to the database during the upgrade.
|
||||||
|
|
||||||
|
### Recreate the database container
|
||||||
|
|
||||||
|
Pull new images and re-create the PostgreSQL container: `docker compose pull && docker compose up --force-recreate -d postgresql`
|
||||||
|
|
||||||
|
Apply your backup to the new database: `cat upgrade_backup_12.sql | docker compose exec postgresql psql -U authentik`
|
||||||
|
|
||||||
|
Remove the network configuration setting `network_mode: none` that you added to the Compose file in the previous step.
|
||||||
|
|
||||||
|
### Recreate authentik
|
||||||
|
|
||||||
|
Start authentik again: `docker compose up --force-recreate -d`
|
@ -483,7 +483,10 @@ const docsSidebar = {
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
label: "PostgreSQL",
|
label: "PostgreSQL",
|
||||||
items: ["troubleshooting/postgres/upgrade_kubernetes"],
|
items: [
|
||||||
|
"troubleshooting/postgres/upgrade_kubernetes",
|
||||||
|
"troubleshooting/postgres/upgrade_docker",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
"troubleshooting/access",
|
"troubleshooting/access",
|
||||||
"troubleshooting/login",
|
"troubleshooting/login",
|
||||||
|
Reference in New Issue
Block a user