This chapter describes the process for installing Black Duck SCA.

The Black Duck Air-gapped KnowledgeBase Services are decoupled from the Black Duck SCA version. All Air-gapped KB versions can act as a single KB in a one-to-many Black Duck SCA instance model. Black Duck SCA recommends this model for optimal performance and ease of management; you can set up a separate VM for Black Duck SCA.

The following instructions are to configure a Black Duck SCA instance isolated from the KB server, and to configure the Black Duck SCA instance on the same server as the KB server by following the steps described below on the KB server itself.

Prerequisites

The following are the system requirements to install Black Duck SCA:

  • Downloaded artifacts

  • Black Duck SCA license key (suite_v1.xml) from Black Duck Support

  • Refer to the Black Duck Docker Swarm installation guide installation planning chapter for information about the requirements.

Bringing up Black Duck SCA

Apply the license key and start the Black Duck SCA system.:

Note: You will need the suite_v1.xml file that Black Duck Support gave you to complete this process.
  1. Set up the Black Duck SCA images. For this step, the Docker daemon must be up and running.

    Ensure Docker is installed correctly; to verify, use the sudo docker ps command.

    1. Navigate to the Black Duck folder and load the Docker images by using the following commands.

      cd ~/software/Blackduck/
      sh load_images.sh

      It's helpful to check if there are any existing images and containers loaded by using the following commands:

      docker images ls
      docker container ls
  2. Apply the license key.

    1. If this is your first time setting up Black Duck SCA, use the following command to create a volume for the configuration:

      docker volume create hub_config-volume
    2. Use the docker ps command to verify that Black Duck SCA is down.

    3. Optional: If any containers are running, go to the docker-swarm folder and use the following command to bring down the containers:

      docker stack rm hub
    4. Go the the /var/lib/docker/volumes/hub_config-volume/_data/ directory and paste/overwrite the suite_v1.xml file that you get from Black Duck support by using the following commands:

      cd /var/lib/docker/volumes/hub_config-volume/_data/
      rm suite_v1.xml
      cp -p <path_to_suite_v1.xml> .
  3. Bring up the Black Duck SCA system.

    1. Optional: Go to the folder with the orchestration files and edit the hub-webserver.env file in the docker-compose directory and configure a hostname of your choosing as shown in the following example:

      PUBLIC_HUB_WEBSERVER_HOST=mysca.organization.com

    2. Go back to the orchestration folder and edit the blackduck-config.externalHub.env file using a text editor such as Vim.

      cd ~/software/Orchestration/hub-*/docker-swarm/
      vi blackduck-config.externalHub.env
    3. Replace the IP Address of On Prem KB with the IP address or hostname of your KB server and save the file.

      Note: Ensure this matches either the hostname or IP address of the value set for bds.security.hostHeaderAllowlistCsv in the overrides.properties file.
    4. Copy all contents from blackduck-config.externalHub.env and overwrite the blackduck-config.env file with the new updated instructions.

      cd ~/software/Orchestration/hub-*/docker-swarm/
      docker swarm init
      docker stack deploy -c docker-compose.yml hub
    5. Optional: In addition to Black Duck SCA, if you want to scan using BDBA (Black Duck Binary Analysis), use the following command:

      docker stack deploy -c docker-compose.yml -c docker-compose.bdba.yml hub
      Tip: Repeat the above steps for all instances of Black Duck SCA servers you want to create.
    Note: All containers except kb-meta-api, kbapi-snippet-lookup and kb_search should show a status of “Healthy”. When you use Docker Swarm, containers might take a few minutes to come up.

Upon startup, verify that Black Duck SCA is accessible by typing https://<hostname>; if prompted with an invalid registration message, enter the root node text from your suite_v1.xml file, for example, as follows:

example_hub_8002H000002PyifQAC