Skip to content

Commit 76ac60c

Browse files
committed
improved upgrade instructions, added postgres update manual
1 parent 788ae2a commit 76ac60c

File tree

1 file changed

+131
-0
lines changed

1 file changed

+131
-0
lines changed

docs/src/operations/v2.0.0-RC2/upgrade-from-1.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ Upgrading the DSF from 1.9.0 to 2.0.0-RC2 involves modifying the docker-compose.
1818
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).
1919
:::
2020

21+
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.
22+
23+
::: info Non-standard configuration changes
24+
25+
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`.
26+
27+
- You can now use more advanced [logging options](./fhir/logging.md).
28+
- If you use your own certificate authority, the [configuration](root-certificates.md) will be easier.
29+
- If can now use more fine granular access control settings in your own [access control / role config settings](./fhir/access-control.md).
30+
:::
31+
32+
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.
33+
The DBMS upgrade is described below in the update instructions.
2134

2235
## Modify DSF FHIR Server Setup
2336
1. Preparation / Backup
@@ -88,3 +101,121 @@ The environment variable `DEV_DSF_FHIR_SERVER_ORGANIZATION_THUMBPRINT` does not
88101
`INFO main - BuildInfoReaderImpl.logBuildInfo(137) | Artifact: dsf-bpe-server-jetty, version: 2.0.0-RC2, [...]`
89102
* Verify the DSF BPE server started without errors
90103
* Verify your install with a ping/pong test
104+
105+
106+
## Upgrade PostgreSQL from 15 to 18
107+
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.
108+
109+
### On the DSF FHIR Server
110+
111+
1. Stop the application
112+
From `/opt/fhir` execute
113+
```
114+
docker compose down app
115+
```
116+
2. Dump the database
117+
From `/opt/fhir` execute
118+
```
119+
docker compose exec db pg_dumpall -U liquibase_user > dump.sql
120+
```
121+
3. Stop the database
122+
From `/opt/fhir` execute
123+
```
124+
docker compose down db
125+
```
126+
4. Recreate the database bind mount directory
127+
From `/opt/fhir` execute
128+
```
129+
mv postgres-data postgres-data-psql-15
130+
mkdir postgres-data
131+
```
132+
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`
133+
```diff
134+
db:
135+
- image: postgres:15
136+
+ image: postgres:18
137+
restart: always
138+
healthcheck:
139+
test: ["CMD-SHELL", "pg_isready -U liquibase_user -d fhir"]
140+
interval: 10s
141+
timeout: 5s
142+
retries: 5
143+
volumes:
144+
- type: bind
145+
source: ./postgres-data
146+
- target: /var/lib/postgresql/data
147+
+ target: /var/lib/postgresql
148+
```
149+
6. Start the new database
150+
From `/opt/fhir` execute
151+
```
152+
docker compose up -d db
153+
```
154+
7. Restore the database dump
155+
From `/opt/fhir` execute
156+
```
157+
cat dump.sql | docker compose exec -T db psql -U liquibase_user fhir
158+
```
159+
8. Start the application
160+
From `/opt/fhir` execute
161+
```
162+
docker compose up -d && docker compose logs -f app
163+
```
164+
165+
### On the DSF BPE Server
166+
167+
1. Stop the application
168+
From `/opt/bpe` execute
169+
```
170+
docker compose down app
171+
```
172+
2. Dump the database
173+
From `/opt/bpe` execute
174+
```
175+
docker compose exec db pg_dumpall -U liquibase_user > dump.sql
176+
```
177+
3. Stop the database
178+
From `/opt/bpe` execute
179+
```
180+
docker compose down db
181+
```
182+
4. Recreate the database bind mount directory
183+
From `/opt/bpe` execute
184+
```
185+
mv postgres-data postgres-data-psql-15
186+
mkdir postgres-data
187+
```
188+
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`
189+
```diff
190+
db:
191+
- image: postgres:15
192+
+ image: postgres:18
193+
restart: always
194+
healthcheck:
195+
test: ["CMD-SHELL", "pg_isready -U liquibase_user -d bpe"]
196+
interval: 10s
197+
timeout: 5s
198+
retries: 5
199+
volumes:
200+
- type: bind
201+
source: ./postgres-data
202+
- target: /var/lib/postgresql/data
203+
+ target: /var/lib/postgresql
204+
```
205+
6. Start the new database
206+
From `/opt/bpe` execute
207+
```
208+
docker compose up -d db
209+
```
210+
7. Restore the database dump
211+
From `/opt/bpe` execute
212+
```
213+
cat dump.sql | docker compose exec -T db psql -U liquibase_user bpe
214+
```
215+
8. Start the application
216+
From `/opt/bpe` execute
217+
```
218+
docker compose up -d && docker compose logs -f app
219+
```
220+
221+
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.

0 commit comments

Comments
 (0)