_Configuring Black Duck to Use an External Database - blackducksoftware/hub GitHub Wiki
Important Note: The procedure described on this page has been deprecated.
This page describes how to configure Black Duck to use an external database in Kubernetes/OpenShift when Black Duck is not deployed with Synopsys Operator.
Do not use these instructions for Black Duck instances deployed with Synopsys Operator.
The documentation below is provided only for historical purposes, and should not be followed unless instructed to by Synopsys support personnel.
Deprecated: Configuring Black Duck to Use an External Database
Configuring your Black Duck YAMLs to connect to the Aurora DB
- Even though the instructions discuss editing the YAML file in the Kubernetes directory, they are applicable to OpenShift as well.
- Edit/vi/vim the file 1-cm-hub.yml and under HUB_POSTGRES_HOST change 'postgres' to be your Aurora RDS Endpoint (e.g. hub47-aurora-jfs.XXXXXXXX.us-east-2.rds.amazonaws.com), leave all other settings as is UNLESS you've specified a different PORT than '5432'
- Save the file and exit
Inject database secrets
- In OpenShift we utilize OpenShift Secrets to store and pass credentials to the database. You can create a Secret using the following command. Modify the command to meet your actual passwords and namespace your Black Duck Powered by Synopsys Hub is running in within your OpenShift cluster (the -n option below):
oc create secret generic db-creds --from-literal=blackduck=blackduck123! --from-literal=blackduck_user=blackduck123! -n myusername
- In the case where your Black Duck containers were already running and you're switching from a local DB to a remote DB you'll need to:
- Stop all the running Black Duck pods (in deployments, scale down each deployment to 0)
- Delete the existing Secret with the command
oc delete secret db-creds
- Reload the new Secret with the new/updated Secrets running the
oc create secret
command from above ^ ^ ^ - Edit the ConfigMap named 'hub-db-config' updating the HUB_POSTGRES_HOST from 'postgres' to your Amazon Aurora RDS. You do this by opening the ConfigMap, selecting the 'Actions' dropdown and selecting Edit YAML, and add your Aurora RDS in the place of 'postgres'
- Go back to Deployments and Open the latest Deployment for each Hub POD and click/scale up 1 POD each