Skip to main content

Deployment

Architecture

Architecture

Qalita platform architecture diagram

Prerequisites

Platform

Computing power

The platform includes the Webapp with its backend. It requires little computing power.

CPUMemoryUsage
At rest500 Mo0.5
In use2 Go1
Optimal4 Go2

Storage

Storage includes :

  • The relational database contains platform management data, metrics and user activity logs.
  • S3 storage includes job logs and assets (pack archives).
UsagePostgresqlS3
Minimal1 Go1 Go
Depends on volume of metrics and frequency of analysis10+ Go10+ Go

Agents

Agent characteristics depend largely on the typology and volume of the source(s) for which it performs quality analyses.

UtilizationMemoryCPU
Minimal50 Mo0.2
Depends on source volume and analysis frequency..

I Cloud SaaS deployment

Qalita SAS offers a fully managed solution hosted on the European HDS and SecNumCloud cloud.

Architecture

Architecture diagram of the Qalita platform in SaaS mode.

Contact us for more information.

II Localhost deployment

Prerequisites

To deploy locally on your computer, you will need:

info

The license key allows you to connect to the docker registry and pull docker images, as well as adding information for the platform.

  1. Connect to the docker image repository :
docker login qalita.azurecr.io
  1. Create these two files:
docker-compose.yaml
version: '3'
services:
frontend:
image: qalita.azurecr.io/qalita/frontend:1.7.1
container_name: frontend
environment:
- QALITA_PUBLIC_DOC_URL=http://localhost:3001
- QALITA_PUBLIC_API_URL=http://localhost:3080
- QALITA_API_URL=http://backend:3080/api/v1
- NODE_ENV=production
- NEXT_TELEMETRY_DISABLED=1
- NEXT_WEBPACK_USEPOLLING=false
ports:
- "3002:3000"
depends_on:
- backend
- doc
backend:
image: qalita.azurecr.io/qalita/backend:1.7.1
container_name: backend
ports:
- "3080:3080"
tty: true
environment:
- POSTGRESQL_PASSWORD=*****************
- POSTGRESQL_USERNAME=qalita
- POSTGRESQL_SERVER=db
- POSTGRESQL_PORT=5432
- POSTGRESQL_DATABASE=qalitadb
- REDIS_SERVER=cache
- REDIS_PORT=6379
- REDIS_PASSWORD=
- QALITA_INIT_SLEEP=3
- QALITA_ADMIN_USERNAME=admin
- QALITA_ADMIN_PASSWORD=*****************
- QALITA_SECRET_KEY=*****************
- QALITA_ALGORITHM=HS256
- QALITA_ACCESS_TOKEN_EXPIRE_MINUTES=240
- QALITA_ENV=PROD
- QALITA_API_PORT=3080
- QALITA_API_HOST=0.0.0.0
- QALITA_FRONTEND_URL=http://localhost:3000
- QALITA_ORGANIZATION_NAME=Qalita Localhost
- QALITA_API_WORKER=4
- QALITA_S3_URL=http://s3:8333
- QALITA_S3_KEY_ID=*****************
- QALITA_S3_KEY_SECRET=*****************
depends_on:
- db
- cache
- s3
doc:
image: qalita.azurecr.io/qalita/doc:1.6.0
container_name: doc
ports:
- 3001:80
db:
image: bitnami/postgresql:15.4.0
tty: true
ports:
- "5432:5432"
container_name: db2
environment:
- POSTGRESQL_PASSWORD=*****************
- POSTGRESQL_USERNAME=qalita
- POSTGRESQL_DATABASE=qalitadb
- POSTGRESQL_PORT=5432
volumes:
- data:/bitnami/postgresql
cache:
image: redis:alpine
hostname: redis-cache
container_name: cache
ports:
- '6379:6379'
command: redis-server
volumes:
- cache:/data
s3:
image: chrislusf/seaweedfs:3.62
container_name: s3
ports:
- "8333:8333"
- "8080:8080"
- "9333:9333"
volumes:
- datas3:/data
- ./s3_config.json:/s3_config.json
command: server -dir=/data -s3 -s3.port 8333 -s3.config "/s3_config.json"
volumes:
data:
cache:
datas3:
s3_config.json
{
"identities": [
{
"name": "admin",
"credentials": [
{
"accessKey": "****************",
"secretKey": "****************"
}
],
"actions": [
"read",
"Write",
"List",
"Tagging",
"Admin"
]
},
{
"name": "reader",
"credentials": [
{
"accessKey": "****************",
"secretKey": "****************"
}
],
"actions": [
"read",
"List"
]
}
]
}
  1. Run docker-compose:
docker-compose up -d

III Deployment on Kubernetes

kubernetes-deployment

Architecture diagram of the Qalita platform deployed on Kubernetes.

Possible configurations Agents <-> Sources

Same namespace :

  1. Deployment with agent in same namespace agent.enabled=true
  2. Deployment of data sources in the same namespace

Other namespace:

  1. Agent deployment in another namespace
  2. To connect to a source in another namespace

Delocalized:

  1. Deploying an agent in any other environment (vm, localhost etc...)
  2. To connect to a source located in the same environment

Prerequisites

To deploy on a managed Kubernetes cluster, you'll need :

Dependencies

Qalita helm chart installation

tip

For the most up-to-date helm chart documentation: Go directly to the Artifacthub site

1. Create a namespace

Create a qalita namespace in your Kubernetes cluster.

2. Create a secret

Create a qalita-license secret in your qalita namespace, containing your license key.

3. Adding the chart Repository

helm repo add qalita https://helm.qalita.io/
helm repo update

4. Resolve dependencies

helm dependency update

5. Install

tip

You'll need to modify the values to best suit your organization. See an example values file

helm install qalita qalita/qalita -f values.yaml

6. Use it

The chart will deploy the following resources:

  • QALITA App
  • QALITA API
  • QALITA Doc
  • QALITA Postgresql Database
  • QALITA Redis Cache Database
  • QALITA Seaweedfs S3 Storage

With cluster.domain=example.com Creates the following endpoints:

Values

tip

You'll need to modify the values to best suit your organization. See a sample values file

Common
KeyTypeDefaultDescription
cluster.issuerstringletsencrypt-prodCluster Issuer for Cert-Manager, you can get your cluster issuer name by running kubectl get clusterissuer
cluster.domainstringexample.comDNS Domain or Sub domain for QALITA app and api endpoints
cluster.namestringlocalCluster name for QALITA app and api endpoints, it is concatenated with cluster.domain
dockerregistry.enabledbooltrueEnable Private Docker Registry, qalita's container images are private, you need to setup the registry in order to pull the images
dockerregistry.dataSecretstring{"auths":{"<registry-url>":{"password":"<password>", "username":"<username>"}}}Docker Registry Secret, you need to configure it to pull the private registry images
Frontend
KeyTypeDefaultDescription
frontend.telemetryDisabledstring1Prevent NextJS framework to send telemetry data to Vercel Servers
frontend.webPackPollingboolfalsePrevent webpack to update its compiled content, used only in dev mode
frontend.modestringproductionThe running mode of the platform, can be <DEV/PROD/DEMO>
frontend.image.repositorystringqalita.azurecr.io/qalita/frontendQALITA Frontend Image Repository
frontend.image.tagstring1.5.0QALITA Frontend Image Tag
frontend.image.pullPolicystringAlwaysQALITA Frontend Image Pull Policy
frontend.replicaCountint1QALITA Frontend Replica Count
frontend.service.typestringClusterIPQALITA Frontend Service Type
frontend.service.targetPortint3000QALITA Frontend Service Port
frontend.service.protocolstringTCPQALITA Frontend Service Protocol
frontend.ingress.enabledbooltrueQALITA Frontend Ingress Enabled
frontend.ingress.tls.enabledbooltrueQALITA Frontend Ingress TLS Enabled
frontend.deployment.resources.requests.cpustring500mQALITA Frontend Deployment CPU Request
frontend.deployment.resources.requests.memorystring256MiQALITA Frontend Deployment Memory Request
frontend.deployment.extraEnvlist[]QALITA Frontend Deployment Environment Variables, format : - name: QALITA_ENV value: "PROD"
Backend
KeyTypeDefaultDescription
backend.organization.namestringlocalSet the organization Name
backend.tokenExpireMinutesint240Set the user session timeout, it is configured in the JWT exp value
backend.modestringPRODThe running mode of the platform, can be <DEV/PROD/DEMO>
backend.iniSleepint3The amount of seconds the backend waits to connect to the backend database (postgresql) before retrying
backend.adminUsernamestringadminThe admin user name
backend.adminPasswordstringrandAlphaNum 25 char long stringAdmin Account password
backend.secretKeystringrandAlphaNum 512 char long stringKey seed to generate JWT Tokens
backend.secretKeyAlgorithmstringHS256Algorithm Type used to issue JWT
backend.api.portint3080Backend API exposed Port
backend.api.hoststring0.0.0.0Ip address Backend is exposed to
backend.api.workerint4Number of process bootstrapped
backend.image.repositorystringqalita.azurecr.io/qalita/backendQALITA Backend Image Repository
backend.image.tagstring1.5.0QALITA Backend Image Tag
backend.image.pullPolicystringAlwaysQALITA Backend Image Pull Policy
backend.replicaCountint1QALITA Backend Replica Count
backend.service.typestringClusterIPQALITA Backend Service Type
backend.service.targetPortint3000QALITA Backend Service Port
backend.service.protocolstringTCPQALITA Backend Service Protocol
backend.ingress.enabledbooltrueQALITA Backend Ingress Enabled
backend.ingress.tls.enabledbooltrueQALITA Backend Ingress TLS Enabled
backend.deployment.resources.requests.cpustring500mQALITA Backend Deployment CPU Request
backend.deployment.resources.requests.memorystring256MiQALITA Backend Deployment Memory Request
backend.deployment.extraEnvlist[]QALITA Backend Deployment Environment Variables, format : - name: QALITA_ENV value: "PROD"
backend.s3.urlstringhttp://seaweedfs-s3:8333S3 Store Url Endpoint
backend.s3.secretNamestringseaweedfs-s3-secretSecret containing read / write credentials for the s3 store
backend.s3.admin_access_key_idstring``S3 Write user access key
backend.s3.admin_secret_access_keystring``S3 Write user secret key
backend.s3.read_access_key_idstring``S3 read user access key
backend.s3.read_secret_access_keystring``S3 read user secret key
Agent
KeyTypeDefaultDescription
agent.enabledboolfalseEnabling agent deployment
agent.namestringlocal-agentQalita Agent Name
agent.initscriptstringecho hello worldQalita Agent init script helps add custom instructions before launching agent, can be used to mount cifs remote path or other actions
agent.modestringworkerQalita Agent mode <job/worker>
agent.tokenstringchangemeQalita Agent API Token
agent.image.repositorystringqalita/agentQALITA Agent Image Repository
agent.image.tagstring1.5.0QALITA Agent Image Tag
agent.image.pullPolicystringAlwaysQALITA Agent Image Pull Policy
agent.replicaCountint1QALITA Agent Replica Count
agent.deployment.extraEnvlist[]QALITA Agent Deployment Environment Variables, format : - name: QALITA_ENV value: "PROD"
agent.deployment.resources.requests.memorystring256MiQALITA Agent Memory Request
agent.deployment.resources.requests.cpustring200mQALITA Agent CPU Request
agent.pvc.enabledboolfalseEnable persistence for agent data
agent.pvc.storageSizestring10GiPVC Size for persisting data
Documentation
KeyTypeDefaultDescription
doc.image.repositorystringqalita.azurecr.io/qalita/docQALITA Doc Image Repository
doc.image.tagstring1.5.0QALITA Doc Image Tag
doc.image.pullPolicystringAlwaysQALITA Doc Image Pull Policy
doc.replicaCountint1QALITA Doc Replica Count
doc.service.typestringClusterIPQALITA Doc Service Type
doc.service.targetPortint80QALITA Doc Service Port
doc.service.protocolstringTCPQALITA Doc Service Protocol
doc.ingress.enabledbooltrueQALITA Doc Ingress Enabled
doc.ingress.tls.enabledbooltrueQALITA Doc Ingress TLS Enabled
doc.deployment.resources.requests.cpustring50mQALITA Doc Deployment CPU Request
doc.deployment.resources.requests.memorystring50MiQALITA Doc Deployment Memory Request
Database (Postgresql)

For more detailed configuration, please refer to Bitnami Postgresql Chart

KeyTypeDefaultDescription
postgresql.enabledbooltrueEnable deploy local postgresql, disable if you use external Postgresql Database
postgresql.image.tagstring15.3.0Postgresql Image Tag
postgresql.global.potgresql.auth.databasestringqalitadbPostgresql Database Name
postgresql.global.potgresql.auth.usernamestringqalitaPostgresql Database Username
postgresql.global.potgresql.auth.passwordstringrandAlphaNum 25 char long stringPostgresql Database Password
postgresql.primary.persistence.sizestring8GiPVC Size for persisting data
S3 Object Storage (Seaweedfs)

For more detailed configuration, please refer to Seaweedfs Chart

KeyTypeDefaultDescription
seaweedfs.enabledbooltrueEnable deploy local s3 file storage, disable if you use external S3 storage System
seaweedfs.global.imageNamestringchrislusf/seaweedfsSeaweedfs Image Name
seaweedfs.global.createClusterRolebooltrueCreates Service Accounts and Role and Role Binding for seaweedfs
Cache (Redis)

For more detailed configuration, please refer to Truecharts Redis Chart

KeyTypeDefaultDescription
redis.enabledbooltrueEnable deploy local redis, disable if you use external Redis Database
redis.passwordstringrandAlphaNum 25 char long stringRedis Database Password
Helm Sync

For more detailed configuration, please refer to alpine/helm

KeyTypeDefaultDescription
helmSync.enabledboolfalseEnable Helm Sync
helmSync.image.repositorystringalpine/helmHelm Sync Image Repository
helmSync.kubeconfigyaml``Kubeconfig yaml formatted, see default values to have a template
helmSync.resources.requests.cpustring500mQALITA helmsync Deployment CPU Request
helmSync.resources.requests.memorystring256MiQALITA helmsync Deployment Memory Request
warning

For production use, it is strongly recommended to deploy the platform on a managed Kubernetes cluster.

QALITA offers a fully managed solution hosted on the European HDS cloud and SecNumCloud.

Contact us