Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions docs/src/operations/v2.0.0-RC2/upgrade-from-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ Upgrading the DSF from 1.9.0 to 2.0.0-RC2 involves modifying the docker-compose.
When upgrading from DSF version < 1.9.0 it is important to migrate to [DSF 1.9.0 first](../v1.9.0/upgrade-from-1).
:::

For DSF 2, we refined the [system requirements](install.md#prerequisites). If your current DSF 1 setup works, it should also work with DSF 2. As DSF 2 is designed to support large file transfers, you might need to increase the storage on the DSF FHIR Server instance.

::: info Non-standard configuration changes

The most non-standard configuration changes working in DSF 1 will continue to work in DSF 2. If you have set custom timeout options please change them to the ISO 8601 standard. `120000` (Milliseconds) must be changed to `PT2M`.

- You can now use more advanced [logging options](./fhir/logging.md).
- If you use your own certificate authority, the [configuration](root-certificates.md) will be easier.
- If can now use more fine granular access control settings in your own [access control / role config settings](./fhir/access-control.md).
:::

We recommend upgrading the PostgreSQL DBMS from version 15 to version 18. At present, it is possible to use PostgreSQL version 15, but we exclusively support PostgreSQL version 18 and test the DSF solely with version 18.
The DBMS upgrade is described below in the update instructions.

## Modify DSF FHIR Server Setup
1. Preparation / Backup
Expand Down Expand Up @@ -88,3 +101,121 @@ The environment variable `DEV_DSF_FHIR_SERVER_ORGANIZATION_THUMBPRINT` does not
`INFO main - BuildInfoReaderImpl.logBuildInfo(137) | Artifact: dsf-bpe-server-jetty, version: 2.0.0-RC2, [...]`
* Verify the DSF BPE server started without errors
* Verify your install with a ping/pong test


## Upgrade PostgreSQL from 15 to 18
To upgrade your DSF databases, you have to stop the application, dump your database, recreate the bind mount directory, update the version, start it, restore the backup and start the application again.

### On the DSF FHIR Server

1. Stop the application
From `/opt/fhir` execute
```
docker compose down app
```
2. Dump the database
From `/opt/fhir` execute
```
docker compose exec db pg_dumpall -U liquibase_user > dump.sql
```
3. Stop the database
From `/opt/fhir` execute
```
docker compose down db
```
4. Recreate the database bind mount directory
From `/opt/fhir` execute
```
mv postgres-data postgres-data-psql-15
mkdir postgres-data
```
5. Update the version and change the bind mount target to respect the [PostgreSQL best practices](https://github.com/docker-library/postgres/pull/1259) in `/opt/fhir/docker-compose.yml`
```diff
db:
- image: postgres:15
+ image: postgres:18
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U liquibase_user -d fhir"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- type: bind
source: ./postgres-data
- target: /var/lib/postgresql/data
+ target: /var/lib/postgresql
```
6. Start the new database
From `/opt/fhir` execute
```
docker compose up -d db
```
7. Restore the database dump
From `/opt/fhir` execute
```
cat dump.sql | docker compose exec -T db psql -U liquibase_user fhir
```
8. Start the application
From `/opt/fhir` execute
```
docker compose up -d && docker compose logs -f app
```

### On the DSF BPE Server

1. Stop the application
From `/opt/bpe` execute
```
docker compose down app
```
2. Dump the database
From `/opt/bpe` execute
```
docker compose exec db pg_dumpall -U liquibase_user > dump.sql
```
3. Stop the database
From `/opt/bpe` execute
```
docker compose down db
```
4. Recreate the database bind mount directory
From `/opt/bpe` execute
```
mv postgres-data postgres-data-psql-15
mkdir postgres-data
```
5. Update the version and change the bind mount target to respect the [PostgreSQL best practices](https://github.com/docker-library/postgres/pull/1259) in `/opt/bpe/docker-compose.yml`
```diff
db:
- image: postgres:15
+ image: postgres:18
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U liquibase_user -d bpe"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- type: bind
source: ./postgres-data
- target: /var/lib/postgresql/data
+ target: /var/lib/postgresql
```
6. Start the new database
From `/opt/bpe` execute
```
docker compose up -d db
```
7. Restore the database dump
From `/opt/bpe` execute
```
cat dump.sql | docker compose exec -T db psql -U liquibase_user bpe
```
8. Start the application
From `/opt/bpe` execute
```
docker compose up -d && docker compose logs -f app
```

Once you have ensured that DSF is working successfully with the new database, you can remove the dump.sql file and the postgres-data-psql-15 directory. As a precaution, we recommend keeping the postgres-data-psql-15 directory for some time.