_Installation Quick Start - blackducksoftware/hub GitHub Wiki
Important Note: The procedure described on this page has been deprecated.
For installing Black Duck in Kubernetes and OpenShift environments, it is highly recommended that you use Synopsys Operator.
The documentation below is provided only for historical purposes, and should not be followed unless instructed to by Synopsys support personnel.
Quick-start examples: The easiest way to get Black Duck up and running in your Cloud Native environment.
The following two quick starts show how to get Black Duck up 'instantly' for a prototype configuration that you can evolve.
If you're just learning Black Duck for the first time, these are a great way to get started quickly. So feel free to dive in and try the quick starts out to get Black Duck up and running quickly in your cloud native environment!
- These are only examples, not 'installers', and should be leveraged by administrators who know what they are doing to quickly grok the Black Duck setup process.
- Do not assume that running these scripts are a replacement for actually understanding the Black Duck setup/configuration process.
- Make any production modifications (volumes, certificates, etc) before running Black Duck in production. Contact Black Duck support if you have questions on how to adopt these scripts to match any special Black Duck configurations you need.
Openshift users: use oc
instead of kubectl, and project
instead of namespace.
Clone this repository , and cd to install/hub
to run these commands, so the files are local.
#start quickstart-internal
kubectl create ns blackduck
kubectl create serviceaccount postgresapp -n blackduck
kubectl create -f 1-cfssl.yml -n blackduck
kubectl create -f 1-cm-hub.yml -n blackduck
kubectl create -f 2-postgres-db-internal.yml -n blackduck
until kubectl get pods -n blackduck | grep postgres | grep -q Running ; do
echo "waiting for postgres"
sleep 5
done
kubectl create -f 3-hub.yml -n blackduck
#end quickstart-internal
Clone this repository, and cd to install/hub
to run these commands, so the files are local. Also, make sure you can write to tmpfs if running this script.
#start quickstart-external
kubectl create ns blackduck
kubectl create serviceaccount postgresapp -n blackduck
kubectl create -f 1-cfssl.yml -n blackduck
kubectl create -f 1-cm-hub.yml -n blackduck
kubectl create -f 2-postgres-db-external.yml -n blackduck
kubectl create secret generic db-creds --from-literal=blackduck=blackduck123 --from-literal=blackduck_user=blackduck123 -n blackduck
# Wait for the pods to come up, you can poll them manually.
until kubectl get pods -n blackduck | grep postgres | grep -q Running ; do
echo "waiting for postgres"
sleep 5
done
echo "... Postgres found ! Installing DB Schema in 10 seconds ..."
sleep 10
podname=$(kubectl get pods -n blackduck | grep postgres | cut -d' ' -f 1)
kubectl get pods -n blackduck
kubectl cp external-postgres-init.pgsql blackduck/${podname}:/tmp/
#### Setup external db. Just an example, replace this step with your own custom logic if you want,
cat << EOF > /tmp/pgsetup.sh
export PATH=/opt/rh/rh-postgresql96/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/rh/rh-postgresql96/root/usr/bin/
export LD_LIBRARY_PATH=/opt/rh/rh-postgresql96/root/usr/lib64
# initialize the database: RDS or CloudSQL users will implement these steps in their own way.
psql -a -f /tmp/external-postgres-init.pgsql
psql -c "ALTER USER blackduck_user WITH password 'blackduck123'"
psql -c "ALTER USER blackduck WITH password 'blackduck123'"
EOF
kubectl cp /tmp/pgsetup.sh blackduck/${podname}:/tmp/
kubectl exec -n blackduck -t -i ${podname} -- sh /tmp/pgsetup.sh
sleep 2
kubectl create -f 3-hub.yml -n blackduck
#end quickstart-external