Skip to content

Commit 7042467

Browse files
authored
Add v4 migration rehearsal tutorial (#79)
To make it easier to v4 users to test with a local stack and provide feedback for the migration procedure. Signed-off-by: nscuro <nscuro@protonmail.com>
1 parent a3321eb commit 7042467

12 files changed

Lines changed: 414 additions & 32 deletions

File tree

.markdownlint-cli2.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ config:
2424
siblings_only: true
2525
code-block-style: false
2626
no-space-in-code: false
27+
ul-indent:
28+
indent: 4
2729

2830
globs:
2931
- "docs/**/*.md"

.vale/styles/config/vocabularies/DependencyTrack/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ Webex
143143
apiserver
144144
autovacuum
145145
crypto
146+
cutover
146147
eDirectory
147148
keysets?
148149
keytool

context/briefing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ Version 5 (codename "Hyades") is a ground-up rearchitecture of the backend:
4646

4747
### Tech stack
4848

49-
- Java 21, Jetty, Jakarta REST (Jersey), DataNucleus (JDO), Liquibase, Protocol Buffers.
49+
- Java 21, Jetty, Jakarta REST (Jersey), DataNucleus (JDO), Flyway, Protocol Buffers.
5050
- PostgreSQL as the sole external dependency.
5151
- Google CEL for policy evaluation and notification filtering.

context/source-inventory.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,3 @@ Map of app repo paths and accuracy status of existing-docs/ files.
88
Contains REST API definitions in OpenAPI format, configuration (application.properties), and database migrations.
99
- **frontend**: Refers to the repository of the frontend, a SPA built with Vue.js.
1010
Contains route definitions and UI component structure.
11-
12-
## Existing Docs Accuracy
13-
14-
- **v4**: Refers to documentation of the previous major version of Dependency-Track.
15-
Most of it is outdated and incomplete. General documentation such as description of the project,
16-
use-cases, and integrations still apply. Built with Jekyll.
17-
- **v5**: Refers to the initial state of the documentation for this major version of Dependency-Track.
18-
It is most thorough around the topics of operations and administration, but is missing most of the
19-
truly user-facing documentation (tutorials, workflows, concepts).

docs/guides/administration/configuring-database.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ Before proceeding, take note of the following constraints:
174174
* Only `session` and `transaction` pooling modes are supported. `transaction` is recommended.
175175
* Initialisation tasks, which include database migrations, **must** connect to the
176176
database directly, bypassing the connection pooler, when using pooling mode `transaction`.
177-
* To prevent concurrent initialisation, session-level PostgreSQL advisory locks are used,
178-
which are not supported with the `transaction` pooling mode.
179-
* To facilitate this, initialisation tasks can be executed in dedicated containers,
180-
and / or using separate data sources.
177+
* To prevent concurrent initialisation, session-level PostgreSQL advisory locks are used,
178+
which are not supported with the `transaction` pooling mode.
179+
* To facilitate this, initialisation tasks can be executed in dedicated containers,
180+
and / or using separate data sources.
181181

182182
### Example
183183

docs/guides/administration/migrating-from-v4.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ See the [per-release upgrade pages](../upgrading/index.md) instead.
1414
To try v5 against your real workload before committing to the migration, see
1515
[Running v4 and v5 in parallel](running-v4-and-v5-in-parallel.md).
1616

17+
To walk this migration end to end against a sandbox v5 stack before the production cutover, see
18+
[Rehearsing the v4 to v5 migration](../../tutorials/rehearsing-the-v4-migration.md).
19+
1720
## How the migration works
1821

1922
The `v4-migrator` command-line tool runs three offline phases (**extract**, **transform**, **load**)
@@ -111,7 +114,7 @@ The migrator ships as a container image published at `ghcr.io/dependencytrack/v4
111114
The examples below use the following shell alias for brevity:
112115

113116
```bash
114-
alias v4-migrator='docker run --rm -it --network=host ghcr.io/dependencytrack/hyades-apiserver-v4-migrator:<version>'
117+
alias v4-migrator='docker run --rm -it --network=host ghcr.io/dependencytrack/v4-migrator:<version>'
115118
```
116119

117120
!!! note

docs/guides/upgrading/v0.7.0-alpha.3.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@
8686
* **The notification-publisher service has been removed**. Publishing of notifications
8787
is now performed by the API server. Refer to the [design documentation](../../concepts/architecture/design/notifications.md) for details.
8888
* The way notification publishers and alerts are configured behind the scenes has changed.
89-
* Existing configuration is migrated during the upgrade on a best-effort basis.
90-
* To prevent partially migrated alert configurations from taking effect,
91-
**all alerts are turned off during the upgrade**.
92-
* You must manually review and re-enable them after the upgrade.
93-
* Refer to the [notification publishers documentation](../../reference/notifications/publishers.md) for guidance.
89+
* Existing configuration is migrated during the upgrade on a best-effort basis.
90+
* To prevent partially migrated alert configurations from taking effect,
91+
**all alerts are turned off during the upgrade**.
92+
* You must manually review and re-enable them after the upgrade.
93+
* Refer to the [notification publishers documentation](../../reference/notifications/publishers.md) for guidance.
9494
* **Notifications are no longer published to Kafka by default**. Going forward, you must configure
9595
alerts explicitly, and use the new [Kafka publisher](../../reference/notifications/publishers.md#kafka)
9696
if you want to receive notifications via Kafka.
@@ -111,11 +111,11 @@
111111
| `alpine.database.pool.idle.timeout` | `dt.datasource.pool.idle-timeout-ms` |
112112
| `alpine.database.pool.max.lifetime` | `dt.datasource.pool.max-lifetime-ms` |
113113

114-
* For this version, the `dt.datasource.*` configurations default to their `alpine.database.*`
115-
counterparts. Existing deployments should continue to function without changes.
116-
Support for `alpine.database.*` configs is removed before the GA release.
117-
* The new datasource configuration mechanism is documented in the
118-
[datasource configuration reference](../../reference/configuration/datasources.md).
114+
* For this version, the `dt.datasource.*` configurations default to their `alpine.database.*`
115+
counterparts. Existing deployments should continue to function without changes.
116+
Support for `alpine.database.*` configs is removed before the GA release.
117+
* The new datasource configuration mechanism is documented in the
118+
[datasource configuration reference](../../reference/configuration/datasources.md).
119119

120120
* **All configuration properties have been standardized to use the `dt.` prefix**.
121121
Properties that previously used the `alpine.` prefix, or no prefix at all, are now under `dt.`.
@@ -127,9 +127,9 @@
127127
| `alpine.oidc.enabled` | `dt.oidc.enabled` |
128128
| `task.portfolio.metrics.update.cron` | `dt.task.portfolio.metrics.update.cron` |
129129

130-
* The naming rule is straightforward:
131-
* `alpine.<suffix>``dt.<suffix>` (for all former `alpine.*` properties)
132-
* `<name>``dt.<name>` (for all previously unprefixed properties)
130+
* The naming rule is straightforward:
131+
* `alpine.<suffix>``dt.<suffix>` (for all former `alpine.*` properties)
132+
* `<name>``dt.<name>` (for all previously unprefixed properties)
133133

134134
When using environment variables, the same mapping applies: `ALPINE_LDAP_ENABLED` becomes
135135
`DT_LDAP_ENABLED`, `TASK_PORTFOLIO_METRICS_UPDATE_CRON` becomes `DT_TASK_PORTFOLIO_METRICS_UPDATE_CRON`,
@@ -157,9 +157,9 @@
157157
via `dt.logging.level."<logger-name>"` per-logger properties.
158158
Refer to the [logging documentation](../administration/configuring-observability.md#adjusting-log-levels) for details.
159159
* The following init task configurations have been removed and replaced with `init.tasks.datasource.name`:
160-
* `init.tasks.database.url`
161-
* `init.tasks.database.username`
162-
* `init.tasks.database.password`
160+
* `init.tasks.database.url`
161+
* `init.tasks.database.username`
162+
* `init.tasks.database.password`
163163
* Refer to [schema migration credentials](../administration/configuring-database.md#schema-migration-credentials)
164164
for an example of how to run init tasks with separate database credentials.
165165

docs/tutorials/.pages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ nav:
44
- quickstart.md
55
- creating-a-component-policy.md
66
- setting-up-notifications.md
7+
- rehearsing-the-v4-migration.md
78
- ...

0 commit comments

Comments
 (0)