_Scaling Black Duck v1 - blackducksoftware/hub GitHub Wiki

Scaling Black Duck in Kubernetes and OpenShift

This page describes how to scale/resize a Black Duck instance deployed with Synopsys Operator. This page describes how to make permanent changes to scaling (this requires restarting Black Duck), and also describes how to make temporary changes that are reverted upon a subsequent Black Duck restart.

Permanent Rescaling of Black Duck

The recommended way to rescale a Black Duck instance is to reset the "size" parameter and restart Black Duck. This change is permanent, which means it will persist across Black Duck restarts.

To make this change, do the following:

  1. Familiarize yourself with the "size" parameter, which is described in the Black Duck Installation Parameters page.
  2. Set the size parameter to the value of your choice ("Small", "Medium", "Large", or "X-Large") using the "General Configuration Procedure" in the Common Configuration Tasks page.

In other words, run:

kubectl edit blackduck <blackduck instance name>

Then set the size parameter to the value of your choice, then restart Black Duck using the commands:

kubectl patch blackduck <Your BD instance name> --type merge -p '{"spec":{"desiredState":"Stopped"}}'
kubectl patch blackduck <Your BD instance name> --type merge -p '{"spec":{"desiredState":"Running"}}'

Temporary Scaling Changes

In general, there are two (and only two) Black Duck services that can be replicated/scaled to improve performance in Kubernetes/OpenShift:

  • Job Runner
  • Hub Scan

If you'd like to temporarily change the number of concurrent Black Duck services, you can do leverage the traditional "kubectl scale" functionality. To use kubectl scale, use a command of the form:

kubectl scale --replicas=2 rc/jobrunner
kubectl scale --replicas=2 rc/hub-scan