Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Synopsysctl

Michael Hammer edited this page Apr 26, 2019 · 17 revisions

Overview

synopsysctl is a command line tool that leverages the synopsys-operator to manage Synopsys Resources in Kubernetes and/or Openshift.

Most users will work with the synopsys-operator using the synopsysctl CLI tool. That tool is downloaded from the GitHub Releases page for the synopsys-operator.

The synopsysctl client is provided in Mac, Windows, and Linux binary formats, download the appropriate client to your local laptop or workstation to work with a remote Operator.

Main Functionality

  • Deploy and destroy the synosys-operator in your cluster
  • Update the synosys-operator
  • Create and delete Synopsys Resources
  • Update Synopsys Resources
  • Get information about Synopsys Resources

Contents


Basic Syntax

Use the following syntax to run synopsysctl commands from your terminal window:

./synopsysctl [COMMAND] [RESOURCE] [sub_command] [NAMESPACE] [flags]
  • COMMAND : main command you want synopsysctl to execute
    • commands: create, delete, deploy, describe, destroy, edit, get, help, update
  • RESOURCE : type of Synopsys Resource to apply the command to
    • resources: blackduck, alert, opssight
  • sub_command : additional commands specific to a Synopsys Resource
  • NAMESPACE : namespace of the Synopsys Resource
  • flags : optional flags to configure a command

To get detailed help information and command flag descriptions on each synopsysctl command, enter:

./synopsysctl [command] -h

Downloading the synopsysctl binary

Get the latest release from this repo's GitHub Releases


Quick Start

1. Download the synopsysctl binary

Refer to the documentation above.

2. Log into your cluster

Make sure your kubeconfig is pointing to your cluster by logging in. (by default, located at: ~/.kube/config)

3. Deploy the synopsys-operator

Exposing UI:

./synopsysctl deploy -e=LOADBALANCER

Without exposing UI

./synopsysctl deploy

Other options

# This will show all the flags you can deploy with.
./synopsysctl deploy --help 

4. Create a Resource

./synopsysctl create blackduck myBlackDuck

Examples: Common Operations

Useful Commands for the synospys-operator

# Deploying the synopsys-operator
./synopsysctl deploy

# Removing the synopsys-operator
./synopsysctl destroy

# Updating the synopsys-operator
./synopsysctl update operator -i=NEW_IMAGE

Useful Commands for BlackDuck

# Creating a BlackDuck
./synopsysctl create blackduck myBlackDuck

# Mock creation of BlackDuck - prints config to terminal (doesn't deploy)
./synopsysctl create blackduck myBlackDuck --mock=json

# Configuring BlackDuck when deploying
./synopsysctl create blackduck myBlackDuck --version="2019.2.2"

# Removing a BlackDuck
./synopsysctl delete blackduck myBlackDuck

# Listing BlackDucks in your cluster
./syopsysctl get blackducks

# Updating a BlackDuck
./synopsysctl update blackduck myBlackDuck --size="large"

# Editing a BlackDuck (Caution: Similar to root privileges, can harm your resource)
./synopsysctl edit blackduck myBlackDuck --external-postgres-admin="admin"

# Get information about a BlackDuck
./synopsysctl describe blackduck myBlackDuck

Useful Commands for OpsSight

# Creating an OpsSight
./synopsysctl create opssight myOpsSight

# Mock creation of OpsSight - prints config to terminal (doesn't deploy)
./synopsysctl create opssight myOpsSight --mock=json

# Configuring OpsSight when deploying
./synopsysctl create opssight myOpsSight --blackduck-max-count=1

# Removing an OpsSight
./synopsysctl delete opssight myOpsSight

# Listing OpsSights in your cluster
./syopsysctl get opssights

# Updating an OpsSight
./synopsysctl update opssight myOpsSight --defaultcpu="5M"

# Editing an OpsSight (Caution: similar to root privileges, can harm your resource)
./synopsysctl edit opssight myOpsSight --perceptor-name="myPerceptor"

# Get information about an OpsSight
./synopsysctl describe opssight myOpsSight

Useful Commands for Alert

# Creating an Alert
./synopsysctl create alert myAlert

# Mock creation of Alert - prints config to terminal (doesn't deploy)
./synopsysctl create alert myAlert --mock=json

# Configuring Alert when deploying
./synopsysctl create alert myAlert --port=8443

# Removing an Alert
./synopsysctl delete alert myAlert

# Listing alerts in Your cluster
./syopsysctl get alerts

# Updating an Alert
./synopsysctl update alert myAlert --persistent-storage=true

# Editing an Alert (Caution: similar to root privileges, can harm your resource)
./synopsysctl edit alert myAlert --expose-service="OPENSHIFT"

# Get information about an Alert
./synopsysctl describe alert myAlert

Troubleshooting

Wrong Kubectl Version

Error Message: fork/exec /usr/local/bin/kubectl: exec format error

Synopsysctl uses kubectl or oc for some functionality. If the wrong version of kubectl or oc is being used then this can lead to issues executing commands. A common situation that this occurs is when using kipp's kubectl.

Clone this wiki locally