...
Code Block |
---|
language | yml |
---|
title | soavirt-secret.yaml |
---|
|
apiVersion: v1
kind: Secret
metadata:
name: soavirt-secret
namespace: parasoft-sv-namespace
type: Opaque
# Data must base64 encoded!
data:
# Specifies username for CTP authentication
#env.manager.username: [CTP Server Username]
# Specifies password for CTP authentication
#env.manager.password: [CTP Server Password]
It is recommended to encrypt password values using the -encodepass CLI option or the encodepass.sh script.
# After encryption, both username and password values must be base64 encoded.
# Example: echo -n "[string]" | base64
# For additional security, see https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/.
data:
# Specifies username for license serverCTP authentication
#license#env.networkmanager.userusername: [LicenseCTP Server Username]
# Specifies password for licenseCTP server authentication
#license#env.networkmanager.password: [LicenseCTP Server Password]
# Specifies username for DTPlicense server authentication
#dtp#license.network.user: [License Server Username]
# Specifies password for license server authentication
#license.network.password: [License Server Password]
# Specifies username for DTP authentication
#dtp.user: [DTP Server Username]
# Specifies password for DTP authentication
#dtp.password: [DTP Server Password] |
Use the yaml file to create the secret for the SOAVirt server:
Code Block |
---|
|
kubectl create -f soavirt-secret.yaml |
Info |
---|
title | Encrypting Your Password |
---|
|
To encrypt a password, run the following command to create a pod that has the parasoft/soavirt-server image without starting the server. Code Block |
---|
kubectl run soavirt-encodepass -n parasoft-sv-namespace --image parasoft/soavirt-server --command -- tail -f /dev/null |
Once the pod is created, run the following command to execute the encodepass.sh script inside the pod. Make sure to substitute the desired password. Code Block |
---|
kubectl exec -n parasoft-sv-namespace --stdin --tty soavirt-encodepass | #dtp.password: [DTP Server Password] |
Use the yaml file to create the secret for the SOAVirt server:
-- /usr/local/parasoft/soavirt/webapps/ROOT/scripts/encodepass.sh <YOUR_PASSWORD> |
After the password is encrypted, delete the pod. Code Block |
---|
kubectl delete pod soavirt-encodepass -n parasoft-sv-namespace |
|
Code Block |
---|
|
kubectl create -f soavirt-secret.yaml |
Once you have set up the configuration map and the secret for the server, you need to create the service account and required permissions.
...
Code Block |
---|
|
kubectl create -f soavirt-pod.yaml |
Anchor |
---|
| UsingALocalLicense |
---|
| UsingALocalLicense |
---|
|
Using a Local License: To use a node-lock license, you will need to retrieve the machine ID from the deployed server in order to procure your license from Parasoft.
Open a shell to the running container:
Code Block |
---|
kubectl exec --stdin --tty soavirt-0 -n parasoft-sv-namespace -- /bin/bash |
Make a curl call to the SOAVirt REST API to retrieve the machine ID:
Code Block |
---|
curl http://localhost:9080/soavirt/api/v6/status?fields=machineId |
- Note the machine ID in the response and provide it to your Parasoft representative, who will send you a license password.
- Once you've received your license password, apply it in the soavirt-config.yaml.
Apply the updated soavirt-config.yaml to the running container:
Code Block |
---|
kubectl apply -f soavirt-config.yaml |
The license will be applied when the pod is restarted automatically. Alternatively, you can delete and recreate the pod for the changes to take effect.
Code Block |
---|
kubectl delete -f soavirt-pod.yaml
kubectl create -f soavirt-pod.yaml |
Volume Mount Security Policies (Optional)
...