-
Notifications
You must be signed in to change notification settings - Fork 14
DEPRECATED Usage Guide
Synopsys Operator makes it easy to deploy and manage Synopsys software like Black Duck, OpsSight Connector, and Black Duck Alert.
These are the major functions provided by Synopsys Operator:
- Software Deployment and Management Using kubectl and oc
- Synopsys Operator Console UI
- Better Coordination Between Black Duck and OpsSight Connector
- Improved Fault Tolerance
Each is described, below.
Kubernetes and OpenShift provide utilities called kubectl and oc, respectively, that allow for manipulation of cluster objects like nodes, pods, and namespaces. Synopsys Operator uses Custom Resource Definitions to create Synopsys-specific extensions to these utilities. For example, once Synopsys Operator is installed, you can use these utilities to create Black Duck instances, or, to check on their status.
A number of uses cases are given, below.
Note: In the examples, below, OpenShift users should replace "kubectl" with "oc".
You can deploy Synopsys software using kubectl/oc. Currently, the following products are supported:
- Black Duck
- OpsSight Connector
- Black Duck Alert
Support for other Synopsys products may be added in the future.
To deploy Synopsys software, you call "kubectl create -f" and pass in a JSON or YAML file containing the initial configuration of the product you wish to install. For example:
kubectl create -f ./examples/opssight.json
To see samples of initial configuration files, go into the Synopsys Operator installation bundle (see Synopsys Operator Installation Guide for details) and cd into the "examples" directory.
cd synopsys-operator-2019.1.0/examples
You can also view these example files in Git Hub here. Note that you may wish to change the branch to match the version of Synopsys Operator that you installed.
Important note: The sample files contain placeholders that must be replaced/customized to match your operational environment and your particular needs. For a full discussion of all the possible initial configuration parameters for a particular product, please see that product's Installation Guide (e.g., OpsSight Connector Installation Guide, Black Duck Installation Guide).
Synopsys Operator allows you to view and delete software deployments that were made with Synopsys Operator.
Viewing
To view Black Duck installations, type:
kubectl get blackducks
To view OpsSight Connector installations, type:
kubectl get opssights
To view Black Duck Alert installations, type:
kubectl get alerts
Deleting
To delete a Black Duck instance, type:
kubectl delete blackduck <Black Duck instance name>
In the above command, "Black Duck instance name" is the value for the "name" field specified in the YAML/JSON file you used to create the Black Duck instance initially.
Important Note: Deleting the Black Duck instance this way will also delete the namespace that was created for that Black Duck instance.
Note: It may take the Console UI several minutes to reflect the change.
As stated above, Synopsys Operator allows you to use the kubectl and oc commands to create Black Duck instances. Synopsys Operator also contains a web-based user interface that allows you to create and manage Black Duck instances with a few clicks of the mouse. This UI is called the Synopsys Operator console UI.
With the Synopsys Operator console UI, you can:
- create Black Duck instances
- delete Black Duck instances
- view status of your Black Duck instances
The console UI eliminates the need to edit YAML or JSON files to create Black Duck instances.
The console UI's web service starts automatically when Synopsys Operator is installed. To launch the console UI, all you must do is point your web browser to the IP address of the console UI service.
On OpenShift
To find the Console UI address, use the following command:
oc get routes -n synopsys-operator
The console UI's address will appear in the returned list. For example, see the HOST/PORT field in the following sample output:
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
synopsys-operator synopsys-operator-myns.192.168.99.100.nip.io synopsys-operator synopsys-operator-ui None
On Kubernetes
If you have a load balancer configured in the cluster, then you can run the following command:
kubectl get service synopsys-operator-tcp -n synopsys-operator
This will give the external IP address of the Console UI.
If you don't have a load balancer configured in the cluster, then you must expose it through a Port Forward. To do this, first, get the Operator's pod name using the following command:
kubectl get pods -n synopsys-operator
Once you have the pod name, create the port forward with the following command:
kubectl port-forward <OPERATOR_POD_NAME> 3001:3000 -n synopsys-operator
The Console UI can then be accessed at "http://localhost:3001".
To create a Black Duck Instance with the Console UI, see Installing Black Duck with the Console UI.
When software is deployed using Synopsys Operator, information about each deployment is stored in CRD metadata in the cluster. One advantage of this is that this data can be used to facilitate communication/co-operation across Synopsys products.
For example, if you install both OpsSight Connector and Black Duck in the same cluster using Synopsys Operator, then Connector will immediately discover the Black Duck instance and start communicating with it. Furthermore, if you install multiple instances of Black Duck, Connector will distribute its scanning load across the multiple Black Duck instances.
As stated above, Kubernetes operators have a desired state of the system and seek to move the system into that state. Likewise, the Synopsys Operator helps maintain Black Duck deployments in a healthy state. For example, while Kubernetes itself will attempt to restart the Postgres database container if it fails, the Synopsys Operator will ensure that the database is properly initialized as well.