Configuration files and guides for deployment and usage of Dependency Track at the Eclipse Foundation
Dependency-Track is deployed with the upstream Helm chart.
| Environment | Host | Namespace | Release | Values file |
|---|---|---|---|---|
| staging | sbom-staging.eclipse.org |
foundation-internal-security-sbom-staging |
dependency-track |
deployment/values-staging.yaml |
| production | sbom.eclipse.org |
foundation-internal-security-sbom |
dependency-track |
deployment/values-production.yaml |
Add the chart repository (one-time setup) and refresh it:
helm repo add dependency-track https://dependencytrack.github.io/helm-charts # once
helm repo update dependency-trackDeploy from the repository root. Make sure the Secrets exist first (see Secrets).
Staging
helm upgrade --install dependency-track dependency-track/dependency-track --version 1.6.0 \
-n foundation-internal-security-sbom-staging -f deployment/values-staging.yamlProduction
helm upgrade --install dependency-track dependency-track/dependency-track --version 1.6.0 \
-n foundation-internal-security-sbom -f deployment/values-production.yamlThese Secrets are managed outside of Helm and must exist before deploying.
- Secret key: Secret
dependency-track-secret-key(keysecret.key) in both namespaces. Dependency-Track encrypts credentials it stores (e.g. the NVD API key, GitHub token, notification credentials) with this key. If it changes, they can no longer be decrypted and must be re-entered in the UI. - Database password:
- Staging: Secret
sbom-user(keypassword). It belongs to the CloudNativePG clustersbom-postgres, which also sets the password of thedependency-trackdatabase role from it. Both are managed outside this repository. - Production: Secret
dependencytrack-secrets(keydb-password), the password forpgsql-write.eclipse.org/dependency-track.
- Staging: Secret
Create the secret key with a random 32-byte key (only for a new environment; a new key invalidates the stored credentials):
openssl rand 32 > secret.key
oc create secret generic dependency-track-secret-key -n <namespace> --from-file=secret.key=secret.key
rm secret.keyCreate or update dependencytrack-secrets (the password is read from the
prompt, so it doesn't end up in the shell history):
read -rs DB_PASSWD
oc create secret generic dependencytrack-secrets -n <namespace> \
--from-literal=db-password="${DB_PASSWD}" --dry-run=client -o yaml | oc apply -f -
unset DB_PASSWDRestart the API server after changing a Secret:
oc rollout restart statefulset -n <namespace>
Upgrade staging first, verify it, then repeat steps 4 to 6 for production.
curl -s https://sbom-staging.eclipse.org/api/version | jq .version
curl -s https://sbom.eclipse.org/api/version | jq .versioncurl asks the running application and is always accurate. helm list -n <namespace> shows the chart version and the chart's app version, which match
what is running as long as the image tags in the values files equal the chart's
app version (see step 4) and nobody changed the workloads by hand.
helm repo update dependency-track
helm search repo dependency-track/dependency-track --versions | headChart 2.x deploys Dependency-Track v5. That is not an in-place upgrade: it
needs a new PostgreSQL database and the chart's migration job. Stay on 1.x
(Dependency-Track 4) unless that migration is planned.
Compare the deployed and the new chart, and adapt the values files where needed:
helm pull dependency-track/dependency-track --version <old> --untar --untardir /tmp/chart-old
helm pull dependency-track/dependency-track --version <new> --untar --untardir /tmp/chart-new
diff -ru /tmp/chart-old/dependency-track /tmp/chart-new/dependency-track- Read the chart's
MIGRATION.mdand the Dependency-Track release notes. - Dependency-Track migrates the database schema on startup, and there is no
downgrade path: a failed upgrade can only be undone by restoring the
database. Production (
pgsql-write.eclipse.org) is backed up by the infrastructure team; ask them for a restore. Staging has no backups and does not need any: if its database is lost, start from an empty one. - Watch out for new defaults that clash with OpenShift. For example, the chart
sets
podSecurityContext.fsGroup: 1000, which OpenShift rejects; it is set tonullin our values files. - Render the result and review it:
helm template dependency-track dependency-track/dependency-track --version <new> -f deployment/values-staging.yaml
- Set
apiServer.image.tagandfrontend.image.tagin both values files to the app version of the new chart (shown byhelm searchin step 2). - Set
--versionin the deploy commands above to the new chart version.
Never use floating tags such as snapshot or latest with
pullPolicy: Always. Every pod restart can then silently change the running
version, including schema migrations of the database.
Run the deploy command for the environment (see Deploying), first
with --dry-run=server appended to check the result against the cluster.
curl -s https://<host>/api/version | jq .versionshows the new version, andhelm list -n <namespace>the new chart and app version.oc get pods -n <namespace>: pods are ready and not restarting; the API server log shows no errors from the schema migration.- Log in via OIDC, check that projects and findings are there, and upload an SBOM to see it processed.