Setup

Deploying the DQM

Prerequisites

The DQM is a web based application hosted on a local server or cloud. 
There a multiple deployment options:


Docker container
kubernetes-icon
Kubernetes
java-jar-icon
Java JAR file

The minimum requirements for the server or cloud instance hosting the application are as follows:
CPU: 2 core
RAM: 4GB
HDD: A minimum of 10GB of free space

Note: When hosting application from JAR file, Java 17 is required

Deploying/updating the DQM using JAR file

Download the latest version of JAR from https://litech.app/downloads/
To run JAR application, use command:

java -XX:TieredStopAtLevel=1 -Dspring.jmx.enabled=false -Xmx4g -Dserver.port=8090 -jar LiTech_DQM_2023.4.jar

-Xmx4g – Specifies the amount of memory that can be used by Java – in this case 4GB
-Dserver.port=8090 – Defining DQM’s machine port (8090 is also default port if not provided)

It is recommended to run the Java file as a service.
Java application as a service on Ubuntu
Java application as a service on Windows

Deploying the DQM using docker image

For hosting your application on your cloud instance, make sure you have a connection to docker hub.

NB! When running in container mode, it is important to run one node per instance. In current state DQM does not support multiple nodes per instance (for example when running in kubernetes cluster)

1. Docker pull LiTech DQM image:

docker pull litech/tester:latest

Note: Please check https://hub.docker.com/repository/docker/litech/tester for available versions

2. Run DQM container:

Note: “-e JAVA_OPTIONS=’-Xmx4g’” is optional. It is recommended to specify maximum heap size (4GB recommended)

docker run -d   
-v {local_path}/logs:/usr/app/logs        
-v {local_path}/database:/usr/app/database
-v {local_path}/drivers:/usr/app/drivers
-v {local_path}/keys:/usr/app/keys
-v {local_path}/tempFiles:/usr/app/tempFiles            
-p 8090:8090 
-e --server.port=8090 
-e JAVA_OPTIONS='-Xmx4g'
{image_id}

-v {local_path}/logs:/usr/app/logs
Mapping of logs folder for DQM user and SQL log files. Needed for persisting logs.

-v {local_path}/database:/usr/app/database
Mapping of database folder for local database files. Needed for persisting local database.

-v {local_path}/drivers:/usr/app/drivers  
Mapping of drivers folder for JDBC driver files. Needed for persisting JDBC drivers uploaded to DQM.

-v {local_path}/keys:/usr/app/keys  
Mapping of keys folder for certificates. Needed for persisting all certificates uploaded to DQM.

-v {local_path}/tempFiles:/usr/app/tempFiles  
CSV files of persisted test results.

-p 8090:8090
Mapping of DQM port 8090 to machine port 8090

-e –server.port=8090
Defining DQM machine port (By default container port will be 8090, this wont be needed)

{image_id}
Image id for “litech/tester” image. You can also directly use image name “litech/tester:2023.4”

3. Validate that DQM container is running:

docker ps

4. If the container is now up and running, you have successfully started the DQM

Deploying the DQM using docker compose

Easiest way is to deploy via docker compose file

docker-compose.yml:

version: "3.7"
services:
  dqm:
    container_name: litech-tester
    image: litech/tester:latest
    ports:
      - 8090:8090
    volumes:
      - ./logs:/usr/app/logs
      - ./database:/usr/app/database
      - ./drivers:/usr/app/drivers
      - ./keys:/usr/app/keys
      - ./tempFiles:/usr/app/tempFiles
    environment:
      JAVA_OPTIONS: -Xmx4g

Updating from older image

Please create and download a backup of your database before proceeding. (see chapter Database settings)

1. Pull the new docker image

docker pull litech/tester:latest

2. Kill the older docker container (data is kept because you have already mapped your volumes).

docker kill {container_id}

Note: You can get container id with “docker container ps –all”

3. (Optional) Remove the old container.  You might want to keep it as a backup if the newer version has some unexpected errors.

docker rm {container_id}

4. Run the new pulled container. See chapter Deploying the DQM using docker image

Updating from older image via docker compose

1. Change image in your docker-compose.yml

image: litech/tester:XXXX.XX

2. Pull new image via docker compose

docker compose pull

3. Launch new image via docker compose

docker compose up -d

Deploying DQM using Kubernetes

In kubernetes context we have to deploy the application with a single replica, because DQM session is persisted on server side.

Sample deployment.yaml:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: dqm-storage
  labels: 
    type: local
spec:
  storageClassName: hostpath
  capacity:
    storage: 20Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: /tmp
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: dqm-storage-claim
spec:
  storageClassName: hostpath
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: dqm-deployment
spec:
  selector:
    matchLabels:
      app: dqm
  replicas: 1 # DQM is limited to one replica due to sessions
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: dqm
    spec:
      volumes:
        - name: dqm-storage
          persistentVolumeClaim:
            claimName: dqm-storage-claim 
      containers:
        - name: dqm
          image: litech/tester:latest
          resources:
            limits:
              memory: 4Gi
            requests:
              memory: 4Gi
          env:
            - name: JAVA_OPTIONS
              value: -XX:MaxRAMPercentage=80.0
          ports:
            - containerPort: 8090
          volumeMounts:
            - mountPath: "/usr/app/database"
              name: dqm-storage
              subPath: database
            - mountPath: "/usr/app/logs"
              name: dqm-storage
              subPath: logs
            - mountPath: "/usr/app/drivers"
              name: dqm-storage
              subPath: drivers
            - mountPath: "/usr/app/keys"
              name: dqm-storage
              subPath: keys
            - mountPath: "/usr/app/tempFiles"
              name: dqm-storage
              subPath: tempFiles
---
apiVersion: v1
kind: Service
metadata:
  name: dqm
  labels:
    app: dqm
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 8090
  selector:
    app: dqm

Configuration

Logging in for the first time

The DQM is available from your machine address with specified port:
http://localhost:8090

Please use Chrome web browser to access the DQM.

Use default credentials to log in for the first time (NB! after DQM version 2022.4 default credentials are randomly generated on initial run and can be found in the logs):

Username: admin
Password: [generated password can be found in logs]
  1. Log in using provided credentials (you will be redirected to the License page. Enter the license key provided)
  2. After logging in, change admin password in Settings -> Users:
  1. Click “Save changes”