Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space LSDEV and version 2023.2

This section describes how to deploy License Server in Kubernetes. Topics include:

Table of Contents
maxLevel1

Deploying License Server in Kubernetes

...

with a Helm Chart

Parasoft has published an official Helm chart to Docker Hub for your convenience. Full installation instructions are included in the readme. See https://hub.docker.com/r/parasoft/lss-helm.

Deploying License Server in Kubernetes

...

Manually

Prerequisites

First, create a namespace for License Server to run in. For example:

...

To create the License Server environment, you will first need a yaml file that defines a Secret (optional), a volume, a Pod or StatefulSet, and a Service (optional). The Secret is used to pull the License Server image from the repository. The Pod or StatefulSet creates a pod set up to run a License Server container configured with a volume to persist data and a liveness probe for the container health. The Service makes License Server accessible via external clients by allocating ports in the node and mapping them to ports in the pod. Example yaml files for a Pod or StatefulSet (both called "parasoft-lss.yaml") are shown below. These examples use an NFS volume, but that is not required; use the volume type that fits your needs bestfits your needs best.

Note: kind: Deployment is not supported. Use either kind: Pod or kind: StatefulSet, which are supported.

Warning

Once License Server has been deployed using Pod or StatefulSet, switching the Kind will invalidate machine-locked licenses.

...

  1. Copy log4j.xml from the <INSTALL_DIR>/app/ directory to <INSTALL_DIR>/data/.
  2. Open the log4j.xml file in <INSTALL_DIR>/data/ and add the following logger in Loggers element:

    Code Block
    languagetext
    <Logger name="com.parasoft.xtest" level="ALL">
      <AppenderRef ref="CONSOLE" />
    </Logger>
  3. Find commented-out section for LSS_JAVA_OPTS in the yaml file, uncomment it, then add the following as the value for LSS_JAVA_OPTS:

    Code Block
    languageyml
    -Dparasoft.cloudvm.verbose=true -Dparasoft.logging.config.file=/usr/local/parasoft/license-server/data/log4j.xml
  4. Restart the application.
  5. Additional logging will go to catalina log file (stdout).  You can run this command to get the log file to local file system (replace "lss-pod1-nfs" with your pod name and "parasoft-lss-namespace" with the namespace you used):

    Code Block
    languagetext
    kubectl logs lss-pod1-nfs -n parasoft-lss-namespace > lss-debug.log

Deploying License Server in Kubernetes with a Helm Chart

Parasoft has published an official Helm chart to Docker Hub for your convenience. Full installation instructions are included in the readme. See https://hub.docker.com/r/parasoft/lss-helm.

Troubleshooting

...

  1. nfs -n parasoft-lss-namespace > lss-debug.log

Troubleshooting

machineId is LINUX2-0

This issue can occur when there is an underlying permission issue. To resolve it, try the following options:

  1. Search the tests.log file found in the <DATA_DIR>/logs/ directory for the error: "Kubernetes API call fails with status=403 error".
  2. Verify that you have created permissions required by License Server using parasoft-permissions.yaml.
    • Note: if you are upgrading, make sure to use the parasoft-permissions.yaml for the version to which you are upgrading.
  3. Confirm that all Parasoft-required resources are using the same namespace.

machineId changes when pod restarts

This issue can occur if you are using an unsupported Kubernetes object. Make sure you are not using kind: Deployment. Only kind: Pod and kind: StatefulSet are supported.