This section describes how to deploy License Server in Kubernetes. Topics include:
Table of Contents maxLevel 1
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. |
...
- Copy log4j.xml from the
<INSTALL_DIR>/app/
directory to<INSTALL_DIR>/data/
. Open the log4j.xml file in
<INSTALL_DIR>/data/
and add the following logger in Loggers element:Code Block language text <Logger name="com.parasoft.xtest" level="ALL"> <AppenderRef ref="CONSOLE" /> </Logger>
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 language yml -Dparasoft.cloudvm.verbose=true -Dparasoft.logging.config.file=/usr/local/parasoft/license-server/data/log4j.xml
- Restart the application.
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 language text 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
...
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:
- Search the tests.log file found in the <
DATA_DIR>/logs/
directory for the error: "Kubernetes API call fails with status=403 error". - 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.
- 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.