Data Observability platform Help

Deploying SelectZero

Prerequisites

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

Deployment

Download the latest version of JAR from https://selectzero.io/downloads/

To run JAR application, use command:

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

-Xmx4g – Specifies the amount of memory that can be used by Java – in this case 4GB

-Dserver.port=8090 – Defining SelectZero application port (8090 is also default port if not provided)

It is recommended to run the Java file as a service.

Link to Java Service on Ubuntu

Link to Java Service on Windows

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

You can find latest versions here

Deploy with docker

  1. Pull docker image

    docker pull selectzero/selectzero:2025.1
  2. Run container

    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}/reports:/usr/app/reports -v {local_path}/keys:/usr/app/keys -p 8090:8090 -e JAVA_OPTIONS='-Xmx4g' selectzero/selectzero:2025.1

    -v {local_path}/logs:/usr/app/logs

    Logs storage

    -v {local_path}/database:/usr/app/database

    DQM local database

    -v {local_path}/drivers:/usr/app/drivers

    JAR connectors storage

    -v {local_path}/reports:/usr/app/reports

    Reports and results

    -v {local_path}/keys:/usr/app/keys

    Key files storage such as BigQuery JSON keys and application certificate keystore

    -p 8090:8090

    Port mapping for exposing DQM application at port 8090

    selectzero/selectzero:2025.1

    Image from dockerhub, latest tag is also available

  3. Validate that DQM container is running

    docker ps

Docker compose is the easiest way to deploy/manage DQM with docker containers

Deploy with docker compose

  1. Create docker-compose.yml

    services: selectzero: container_name: selectzero image: selectzero/selectzero:2025.1 ports: - 8090:8090 volumes: - ./logs:/usr/app/logs - ./database:/usr/app/database - ./drivers:/usr/app/drivers - ./reports:/usr/app/reports - ./keys:/usr/app/keys environment: JAVA_OPTIONS: -Xmx4g
  2. Run docker compose

    docker compose up -d

Deploying on kubernetes

  1. Create resource file selectzero.yaml

    apiVersion: v1 kind: PersistentVolume metadata: name: selectzero-storage labels: type: local spec: storageClassName: hostpath capacity: storage: 20Gi accessModes: - ReadWriteOnce hostPath: path: /tmp --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: selectzero-storage-claim spec: storageClassName: hostpath accessModes: - ReadWriteOnce resources: requests: storage: 20Gi --- apiVersion: apps/v1 kind: Deployment metadata: name: selectzero-deployment spec: selector: matchLabels: app: selectzero replicas: 1 # SelectZero is limited to one replica due to sessions strategy: type: RollingUpdate template: metadata: labels: app: selectzero spec: volumes: - name: selectzero-storage persistentVolumeClaim: claimName: selectzero-storage-claim containers: - name: selectzero image: selectzero/selectzero:2025.1 -- Modify version tag 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: selectzero-storage subPath: database - mountPath: "/usr/app/logs" name: selectzero-storage subPath: logs - mountPath: "/usr/app/drivers" name: selectzero-storage subPath: drivers - mountPath: "/usr/app/reports" name: selectzero-storage subPath: reports - mountPath: "/usr/app/keys" name: selectzero-storage subPath: keys - mountPath: "/usr/app/tempFiles" name: selectzero-storage subPath: tempFiles --- apiVersion: v1 kind: Service metadata: name: selectzero labels: app: selectzero spec: type: NodePort ports: - port: 80 targetPort: 8090 selector: app: selectzero
  2. Apply using kubectl

    kubectl apply -f selectzero.yaml

Updating SelectZero version

Update JAR

  1. Download the latest version of JAR from https://selectzero.io/downloads/

  2. Stop the old JAR service

    systemctl stop {service-name}
  3. Run new JAR

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

Update docker container

  1. Pull new docker image

    docker pull selectzero/selectzero:2025.1
  2. Look for old container name

    docker ps
  3. Stop old container

    docker stop {container-name}
  4. Run container with new version

    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}/reports:/usr/app/reports -v {local_path}/keys:/usr/app/keys -p 8090:8090 -e JAVA_OPTIONS='-Xmx4g' selectzero/selectzero:2025.1
  5. Validate that SelectZero container is running with new version

    docker ps

Update docker compose

  1. Modify existing docker-compose.yml

    services: selectzero: container_name: selectzero image: selectzero/selectzero:2025.1 -- Change version ports: - 8090:8090 volumes: - ./logs:/usr/app/logs - ./database:/usr/app/database - ./drivers:/usr/app/drivers - ./reports:/usr/app/reports - ./keys:/usr/app/keys environment: JAVA_OPTIONS: -Xmx4g
  2. Run docker compose

    docker compose up -d

Update kubernetes

  1. Modify resource file selectzero.yaml

    ... containers: - name: selectzero image: selectzero/selectzero:2025.1 -- Modify version tag resources: limits: memory: 4Gi requests: memory: 4Gi ...
  2. Apply using kubectl

    kubectl apply -f selectzero.yaml

Fixing folder rights for non-root user

From version 2023.10 SelectZero container is running on non-root user "dqm". This is due to security reasons. "dqm" user uses default groups UID:1000 GID:1000. In case SelectZero container startup should give folder access rights, we have prepared a few fix scripts for assigning correct user rights to folders. This is a one time action and will work as expected in the future. It won't affect new installs, unless using direct docker bind mount to host system.

Fix folder rights

  1. Stop existing container

    docker stop {container_name}
  2. Run busybox container to fix folder permissions

    docker run --rm -v {local_path}/logs:/usr/app/logs -v {local_path}/database:/usr/app/database -v {local_path}/drivers:/usr/app/drivers -v {local_path}/reports:/usr/app/reports -v {local_path}/keys:/usr/app/keys busybox:latest sh -c "chown -R 1000:1000 /usr/app"
  3. Run the original container with fixed folder permissions

    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}/reports:/usr/app/reports -v {local_path}/keys:/usr/app/keys -p 8090:8090 -e JAVA_OPTIONS='-Xmx4g' {image_id}

Fix folder rights

  1. Modify existing docker-compose.yml to include startup service

    version: "3.7" services: busybox: container_name: busybox-folders image: busybox volumes: - ./logs:/usr/app/logs - ./database:/usr/app/database - ./drivers:/usr/app/drivers - ./reports:/usr/app/reports - ./keys:/usr/app/keys command: ["chown", "-R", "1000:1000", "/usr/app/"] selectzero: container_name: selectzero-non-root image: "selectzero/selectzero:2025.1" ports: - "8090:8090" volumes: - ./logs:/usr/app/logs - ./database:/usr/app/database - ./drivers:/usr/app/drivers - ./reports:/usr/app/reports - ./keys:/usr/app/keys environment: JAVA_OPTIONS: "-Xmx2g -Djava.security.egd=:/dev/urandom" depends_on: busybox: condition: service_completed_successfully
  2. Re-apply docker compose

    docker compose up -d

Fix folder rights

  1. Modify deployment resource to include init container

    ... spec: volumes: - name: selectzero-storage persistentVolumeClaim: claimName: selectzero-storage-claim initContainers: - name: folder-rights-fix image: busybox:latest securityContext: runAsUser: 0 imagePullPolicy: Always command: ["chown", "-R", "1000:1000", "/usr/app/"] volumeMounts: - mountPath: "/usr/app/database" name: {storage-name} subPath: database - mountPath: "/usr/app/logs" name: {storage-name} subPath: logs - mountPath: "/usr/app/drivers" name: {storage-name} subPath: drivers - mountPath: "/usr/app/reports" name: {storage-name} subPath: reports - mountPath: "/usr/app/keys" name: {storage-name} subPath: keys containers: - name: selectzero ...
  2. Add security context to main deployment spec

    ... apiVersion: apps/v1 kind: Deployment metadata: name: selectzero-deployment spec: securityContext: runAsUser: 1000 fsGroup: 1000 ...
  3. Re-apply kubernetes resource

    kubectl apply -f selectzero.yaml
Last modified: 04 February 2025