_Installing Black Duck from the Command Line - blackducksoftware/hub GitHub Wiki
This page has been deprecated. Please see the official Kubernetes Black Duck Installation Guide here.
Introduction
This page describes how to leverage Synopsys Operator to install Black Duck from the command line.
Summary
As stated in the Synopsys Operator Usage Guide, the general command to install Synopsys software with Synopsys Operator is:
kubectl create -f <config_file_name>
To install Black Duck from the command line, simply invoke the command above and provide the name of a JSON or YML file containing the Black Duck Configuration parameters.
Because the number of configurable parameters is large, a number of example config files are given in the Synopsys Operator installation bundle to simplify the process. See the "Using Example Files" section for details. To further customize a Black Duck installation, see the "Advanced Installation Options" section.
Using Example Files
In Synopsys Operator's synopsys-operator-2019.1.0/examples
directory (see the Synopsys Operator Installation Guide to install Operator if you haven't already), there are several files that can be used to quickly create Black Duck deployments. These files can be used for both production deployments and also demonstrations, evaluations, proof-of-concepts, and testing.
Important note: In all of the json files, you must replace <BLACKDUCK_LICENSE_KEY>
with your license key; otherwise, the registration portion of the installation procedure will fail.
black_duck_ephemeral.json
This file creates a Black Duck installation with the following characteristics:
- Black Duck version 2018.12.2
- images pulled from Docker Hub
- small deployment
- no persistent volume claims, proxies, or certificates
- no pre-populated (cloned) database
- IPv6 support required
This is the most basic Black Duck deployment. This would be suitable only for a non-production environment (e.g., a demonstration or proof-of-concept). Note that because there are no persistent volumes, the Black Duck database will use "emptyDir" for data storage, which is not guaranteed to persist if the Postgres pod is rescheduled.
black_duck_persistent_storage.json
This file creates a Black Duck installation the same as "black_duck_ephemeral.json", except that the database is configured to use a persistent volume claim. This provides protection against data loss if the Black Duck database container dies or is otherwise rescheduled.
In order to use this file, you must do one of two things:
- Ensure that you have at least one persistent volume defined in your cluster, or
- Have a storage class (dynamic provisioner) configured such that a volume will be created for you
Note: If you want to specify a particular storage class, make sure to edit the "pvcStorageClass" value accordingly in the JSON file. See the Black Duck Installation Parameters page for more details on this value.
black_duck_external_database.json
This file creates a Black Duck installation the same as "black_duck_ephemeral.json", except that an external database is used (rather than in internal Postgres container).
Important note: Before you can use this option, you must properly configure the external database. For instructions, please reference the section entitled "Configuring an external PostgreSQL instance" in the Black Duck Compose installation documentation, which can be found here.
Once you have properly configured the external database, you must edit the following parameters appropriately in the JSON file:
- postgresHost
- postgresPort
- postgresAdmin
- postgresUser
- postgresSsl
- postgresAdminPassword
- postgresUserPassword
See the Black Duck Installation Parameters page for more details on this value.
black_duck_bdba.json
This file creates a Black Duck installation the same as "black_duck_ephemeral.json", except that Black Duck Binary Analysis (BDBA) is enabled.
Advanced Installation Options
See the Black Duck Installation Parameters page for help specifying values for a custom Black Duck deployment.
Note: Generally, parameter values in the JSON files are case insensitive. For example, in the JSON files, "small", "Small" and "SMALL" are all the same value.