Skip to content

Commit 4c4b087

Browse files
authored
Add missing upgrade notes for 5.2 (#295)
* Mentions the removal of `curl` in the apiserver container image in favour of busybox wget. * Mentions removal of the bundled cloud SQL socket factory. Signed-off-by: nscuro <nscuro@protonmail.com>
1 parent 8d9acc7 commit 4c4b087

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

‎docs/guides/administration/configuring-database.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,25 @@ The same is not necessarily true for platforms based on heavily modified Postgre
2828
such as [CockroachDB] or [YugabyteDB]. Such solutions make certain trade-offs to achieve higher levels of scalability,
2929
which might impact functionality that Dependency-Track relies on.
3030

31+
#### Google Cloud SQL
32+
33+
To connect through the [Cloud SQL socket factory][cloud-sql-jdbc], for example to use IAM database authentication,
34+
add the socket factory to the API server. The container image doesn't include it.
35+
36+
1. [Build the socket factory JAR with its dependencies][cloud-sql-build].
37+
2. Mount it into `/opt/owasp/dependency-track/lib-external/`. The API server loads every JAR in that directory.
38+
3. Set the data source URL to your instance:
39+
40+
```yaml linenums="1" title="docker-compose.yaml"
41+
services:
42+
apiserver:
43+
image: dependencytrack/apiserver
44+
environment:
45+
DT_DATASOURCE_URL: "jdbc:postgresql:///dtrack?cloudSqlInstance=<INSTANCE_CONNECTION_NAME>&socketFactory=com.google.cloud.sql.postgres.SocketFactory"
46+
volumes:
47+
- "./postgres-socket-factory-jar-with-dependencies.jar:/opt/owasp/dependency-track/lib-external/postgres-socket-factory.jar:ro"
48+
```
49+
3150
### Self-hosting
3251
3352
#### Bare Metal / Docker
@@ -247,6 +266,8 @@ services:
247266

248267
[Autovacuum]: https://www.postgresql.org/docs/current/routine-vacuuming.html
249268
[CockroachDB]: https://www.cockroachlabs.com/
269+
[cloud-sql-build]: https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#building-the-drivers
270+
[cloud-sql-jdbc]: https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/blob/main/docs/jdbc.md
250271
[Neon]: https://neon.tech/
251272
[PGTune]: https://pgtune.leopard.in.ua/
252273
[PgBouncer]: https://www.pgbouncer.org/

‎docs/guides/upgrading/v5.2.0.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,23 @@
4848
and [`dt.vex-upload.max-size-bytes`][max-upload-size-vex]. Both properties default to 100 MiB. Increase them if
4949
your instances process documents larger than that.
5050
51+
* **The API server container image no longer includes `curl`**. The image's health check now uses `wget`.
52+
If you override the health check or run `curl` in an `exec` probe, switch to `wget`:
53+
54+
```shell
55+
wget -q -Y off -T 3 -O /dev/null http://127.0.0.1:9000/health
56+
```
57+
58+
In Kubernetes, an `httpGet` probe against port `9000` needs no tool in the image at all.
59+
60+
* **The API server container image no longer includes the Google Cloud SQL socket factory**. If your database URL sets
61+
`socketFactory=com.google.cloud.sql.postgres.SocketFactory`, the API server fails to connect after the upgrade.
62+
Add the socket factory as described in [Google Cloud SQL][cloud-sql].
63+
5164
[access-control-svc]: ../../concepts/access-control.md#service-accounts
5265
[allowed-destinations]: ../../reference/configuration/properties.md#dtoutboundallowed-destinations
5366
[cargo-alt-reg]: https://doc.rust-lang.org/cargo/reference/registries.html#using-an-alternate-registry
5467
[cargo-idx]: https://doc.rust-lang.org/cargo/reference/registry-index.html#sparse-protocol
68+
[cloud-sql]: ../administration/configuring-database.md#google-cloud-sql
5569
[max-upload-size-bom]: ../../reference/configuration/properties.md#dtbom-uploadmax-size-bytes
5670
[max-upload-size-vex]: ../../reference/configuration/properties.md#dtvex-uploadmax-size-bytes

0 commit comments

Comments
 (0)