Setting up the Server Environment
For setup and deployment of the SafeNet IDPrime Virtual Server, you need to setup a containerized based software (Docker/Podman).
The following instructions explain the usage of Docker/Podman as the container technology, and Kubernetes as the orchestration technology.
Docker/Podman
SafeNet IDPrime Virtual Server is provided as a Docker image. To install and run the latest release of the Docker software you can follow the documentation on the Docker website.
The values in <angle brackets> must also be updated. After the update, remove the angle brackets.
-
Unzip the provided image file as a TAR by executing the following command:
gzip -d <image-name.tar.gz> -
After unzipping, load the image in the Docker registry by executing the following command:
docker load -i <image-name.tar>For RHEL 8 or 9 with podman environment, the command is:
podman load -i <image-name.tar> -
After the above command is successfully executed, it returns an output in the following format:
Loaded image: idprimevirtual_server: 2.x -
Create a
/var/thales/configdirectory and copy the files downloaded from the delivery package provided with the IDPV package.appsettings.ymlpolicy-configuration.jsonidp-configuration.jsonlog4net.configIngrianNAE.properties.pfxsws-configuration.json
This document uses
/var/thales/config/and/var/thales/hsm/directories for placing configuration files. However, based on requirements, you can use different directory names. If you choose different names, use them with discretion in relation to the names mentioned in this document.
Kubernetes
The following steps are used to deploy IDPrime Virtual Server in Kubernetes:
-
Create a Kubernetes namespace for your project in Kubernetes.
-
Create a
namespacefor your project in Kubernetes using the following configuration of the YAML file:apiVersion: v1kind: Namespacemetadata:name: idpv-staging
The namespace created in the above case is
idpv-staging.Alternatively, you can use the following command to create a namespace:
kubectl create namespace idpv-stagingThe namespace (
idpv-staging) can be any name but once defined, the same name must be used in all of the subsequent deployment procedures.-
Create a
/var/thales/configdirectory, and copy the files downloaded from the delivery package provided with the IDPV package.appsettings.ymlpolicy-configuration.jsonidp-configuration.jsonlog4net.configsws-configuration.jsonIngrianNAE.properties
This document uses
/var/thales/config/and/var/thales/hsm/directories for placing configuration files. However, based on requirements, you can use different directory names. If you choose different names, use them with discretion in relation to the names mentioned in this document.Refer to step 2 of Installing SafeNet IDPrime Virtual Server to configure the IDPV Server files.
-
-
Create
SecretandConfigMapfor IDPV server and HSM client configuration respectively.-
Create a
secretusing the application-related configuration files prepared in the above step 1. -
Copy
kustomization.yamlin/var/thales/directory from the delivery package, and follow the steps provided in thekubectl apply -kfile.The dot character at the end of the command above represents the current directory.
The directory must contain the above mentioned files.
-
Create a
ConfigMapfor the HSM client related files. For more information, refer to Configuring Luna Client on Host Machine.For DPoD and KeySecure, refer to Configuring Data Protection on Demand and Configuring KeySecure respectively.
kubectl create configmap idpv-config-hsm --from-file=/var/thales/hsm/ -n idpv-staging
-
-
Update the deployment
yamllocated at/var/thales/directory given in the deployment package.-
Update the deployment
Kubernetes-Service.yamlfile in the package.Update the values in
<angle brackets>(after the update, remove the angle brackets) for the following parameters:volumes: - name: vol1name secret: secretName: <idpv-configuration-secret> - name: vol2name configMap: name: idpv-config-hsm- Volumes
vol1nameandvol2namecan be any names. But once defined, the same name must be used for all the further references.
*SecretandConfigMapmust be defined as created in step 2 and step 3 above.
- Volumes
-
If you are having the server Docker image in a Docker registry go to Step-e below. Otherwise, unzip the provided image file as a TAR by executing the following command:
gzip -d <image-name.tar.gz> -
After unzipping the file, load the image in the Docker registry by executing the following command:
docker load –i <image-name.tar>For RHEL 9 or 8 with podman environment, the command is:
podman load -i <image-name.tar> -
Configure a private Docker registry. For setting up the private registry, refer to Official Docker documentation.
Tag and push the image in the private Docker registry by executing the following commands:
docker tag <image-name> <docker-registry/repository/image-name:tag> docker push <docker-registry/repository/image-name:tag>In podman environment, use the respective commands for tagging and pushing the image.
-
In the
Kubernetes-Deployment.yamldeployment file, update the value in<angle brackets>(after the update, remove the angle brackets) for the following parameter:
containers:- name: idpv-serverimage: <docker-registry/repository/image-name:tag> -
Update the following value fields in the deployment file:
-
The values,
vol1nameandvol2name, must be updated for name fields under the volumeMounts section:volumeMounts:- name: <vol1name>mountPath: /publish/Config- name: <vol2name>mountPath: /usr/local/hsm -
The value field, docker-reg-creds-secret-name, must be updated in the deployment file:
imagePullSecrets:- name: <docker-reg-creds-secret-name>
-
-
Once the above changes are complete, create a deployment in the Kubernetes namespace. This deploys the server in a container pod.
-
-
Create a service to expose server outside of Kubernetes cluster.
-
Create a service using the
Kubernetes-Service.yamlfile (provided in the package). -
Update the
nodePortvalue as per the availability.nodePort: <nodePort-value>
-
• When Docker is deployed, manually restart the container after updating the configurations using the following command: docker restart <container-name or id>
• When Kubernetes is deployed, the server automatically restarts after Secret and ConfigMap are updated.
• Instead of Docker, if RHEL 8 or 9 with podman environment is used, run the following command:
podman restart <container-name or id>
• Where Kubernetes is deployed, the server automatically restarts after Secret and ConfigMap are updated.