APM
Analyses per minute. Please note:
Analysis is a request for Quality (Liveness) or Biometry analysis using a single media.
A single analysis with multiple media counts as separate analyses in terms of APM.
Multiple analysis types on single media (two media for Biometry) count as separate analyses in terms of APM.
PoC
Proof of Concept
Node
A Node is a worker machine. Can be either a virtual or a physical machine.
HA
High availability
K8s
Kubernetes
SC
StorageClass
RWX
ReadWriteMany
Oz API components:
APP is the API front app that receives REST requests, performs preprocessing, and creates tasks for other API components.
Celery is the asynchronous task queue. API has 6 celery queues:
Celery-default processes system-wide tasks.
Celery-maintenance processes maintenance tasks.
Celery-tfss processes analysis tasks.
Celery-resolution checks for completion of all nested analyses within a folder and changes folder status.
Celery-preview_convert creates a video preview for media.
Celery-beat is a CronJob for managing maintenance celery tasks.
Celery-Flower is a Celery metrics collector.
Celery-regula (optional) processes document analysis tasks.
Redis is a message broker and result backend for Celery.
RabbitMQ (optional) can be used as a message broker for Celery instead of Redis.
Nginx serves static media files for external HTTP(s) requests.
O2N (optional) processes the Blacklist analysis.
Statistic (optional) provides statistics' collection for Web UI.
Web UI provides the web interface.
BIO-Updater checks for models updates and downloads new models.
Oz BIO (TFSS) runs TensorFlow with AI models and makes decisions for incoming media.
The BIO-Updater and BIO components require access to the following external resources:
The deployment scenario depends on the workload you expect.
Use cases
Testing/Development purposes
Small installations with low number of APM
Typical usage with moderate load
High load with HA and autoscaling
Usage with cloud provider
Environment
Docker
Docker
Kubernetes
HA
No
Partially
Yes
Pros
Requires a minimal amount of computing resources
Low complexity, so no high-qualified engineers are needed on-site
Easy to manage and support
Partially supports HA
Can be scaled up to support higher workload
HA and autoscaling
Observability and manageability
Allows high workload and can be scaled up
Cons
Suitable only for low loads, no high APM
No scaling and high-availability
API HA requires precise balancing
Higher staff qualification requirements
High staff qualification requirements
Additional infrastructure requirements
External resource requirements
PostgreSQL
For Kubernetes deployments:
K8s v1.25+
ingress-nginx
clusterIssuer
kube-metrics
Prometheus
clusterAutoscaler
PostgreSQL
Autoscaling is implemented on the basis of ClusterAutoscaler and must be supported by your infrastructure.
Please find the installation guide here: Docker.
Type of containerization: Docker,
Type of installation: Docker compose,
Autoscaling/HA: none.
Software
Docker 19.03+,
Podman 4.4+,
Python 3.4+.
Storage
Depends on image quality and required archive depth.
May be count as: [average image size] * 2 * [analyses per day] * [archive depth in days].
Staff qualification:
Basic knowledge of Linux and Docker.
Single node.
Resources:
1 node,
16 CPU/32 RAM.
Two nodes.
Resources:
2 nodes,
16 CPU/32 RAM for the first node; 8 CPU/16 RAM for the second node.
Please find the installation guide here: Docker.
Type of containerization: Docker/Podman,
Type of installation: Docker compose,
Autoscaling/HA: manual scaling; HA is partially supported.
Computational resources
Depending on load, you can change the number of nodes. However, for 5+ nodes, we recommend that you proceed to the High Load section.
From 2 to 4 Docker nodes (see schemes):
2 Nodes:
24 CPU/32 RAM per node.
3 Nodes:
16 CPU/24 RAM per node.
4 Nodes:
8 CPU/16 RAM for two nodes (each),
16 CPU/24 RAM for two nodes (each).
We recommend using external self-managed PostgreSQL database and NFS share.
Software
Docker 19.03+,
Podman 4.4+,
Python 3.4+.
Storage
Depends on image quality and required archive depth.
May be count as: [average image size] * 2 * [analyses per day] * [archive depth in days].
Staff qualification:
Advanced knowledge of Linux, Docker, and Postgres.
2 nodes:
3 nodes:
4 nodes:
Please find the installation guide here: Kubernetes.
Type of containerization: Type of containerization: Docker containers with Kubernetes orchestration,
Type of installation: Helm charts,
Autoscaling/HA: supports autoscaling; HA for most components.
Computational resources
3-4 nodes. Depending on load, you can change the number of nodes.
16 CPU/32 RAM Nodes for the BIO pods,
8+ CPU/16+ RAM Nodes for all other workload.
We recommend using external self-managed PostgreSQL database.
Requires RWX (ReadWriteMany) StorageClass or NFS share.
Software
Docker 19.03+,
Python 3.4+.
Storage
Depends on image quality and required archive depth.
May be count as: [average image size] * 2 * [analyses per day] * [archive depth in days].
Staff qualification:
Advanced knowledge of Linux, Docker, Kubernetes, and Postgres.
By default, all API methods are published without restrictions, that may possess security threats. For accessing API methods from Internet, we recommend enabling limitations on WAF, border L7 balancer, etc.
If you use Web SDK only, you don't need to publish API methods on the Internet.
The information below is relevant for Oz API 5.2.
For Oz API with Mobile SDK, make sure these methods are accessible from the Internet:
You may need to extend this list depending on how Oz API has been integrated into your infrastructure.
For Web SDK, make sure these methods are accessible from the Internet. Your Web SDK URL
is the Web Adapter URL you have received from us.
To launch the services, you'll require:
CPU: 16 cores,
RAM: 32 GB,
Disk: 100 GB, SSD,
Linux-compatible OS,
Docker 19.03+ (or Podman 4.4+),
Docker Compose 1.27+ (or podman-compose 1.2.0+, if you use Podman).
The package you get consists of the following directories and files:
Put the license file in ./configs/tfss/license.key
.
Unzip the file that contains models into the ./data/tfss/models
directory.
Before starting system configuration, we recommend running the host readiness check scripts. Navigate to the checkers directory and run the pre-checker-all.sh
script.
Set the initial passwords and values:
For this configuration, run all services on a single host:
We recommend using PostgreSQL as a container only for testing purposes. For the production deployment, it is recommended to use a standalone database.
Create a directory and unzip the distribution package into it. The package contains Docker Compose manifests and directories with the configuration files required for operation.
Put the license file in ./configs/tfss/license.key
.
Unzip the file that contains models into the ./data/tfss/models
directory.
Before starting system configuration, we recommend running the host readiness check scripts. Navigate to the checkers directory and run the pre-checker-all.sh
script.
For this configuration, run TFSS service on a separate host:
Create a directory and unzip the distribution package into it. The package contains Docker Compose manifests and directories with the configuration files required for operation.
Before starting system configuration, we recommend running the host readiness check scripts. Navigate to the checkers directory and run the pre-checker-all.sh
script.
For this configuration, run all services on a single host:
~ APM
~ analyses per month
~ APM
analyses per month
APM
analyses per month
Set the initial passwords and values as described in .
To install Oz product via Kubernetes, consider using Helm charts.
Oz API and related components: Helm chart.
API 5.2: version 0.11.x,
API 5.3 (regulatory update for Kazakhstan): 0.12.x.
Web SDK: Helm chart. Please note: the version of the chart is not tied to the Web SDK version.
For testing purposes, the database installed and created automatically by the chart is sufficient. However, for production, we strongly recommend using a separate, self-managed database.
Recommended PostgreSQL version: 15.5.
Create a database using the script(s) below.
To increase performance, consider using this list of indexes:
API and Web SDK charts require RWX SC.
To deploy in Kubernetes, download the chart version you require and adjust the values.yaml
file. This file specifies parameters for deployment of Oz products.
This example is based on the 0.11.28 chart version.
Adjust the values.yaml
file, setting the following mandatory parameters before deployment:
ozDockerHubCreds
: you'll receive them from Oz Engineer.
UserParams
:
URLs
:
apiURL
: URL for API. May be internal, if you use Web SDK only. For Mobile SDKs, should be public. Please refer to this article for more information.
DB
: must be set, if you use an external PostgreSQL server. For details, please check Database Creation.
use_chart_postgres
: false by default. Enables internal PostgreSQL server (not recommended for production).
postgresUser
: same as <<USERNAME>>
.
postgresHost
: the hostname of your PostgreSQL server.
postgresDB
: same as <<DB_NAME>>
.
postgresUserPassword
: same as <<PASSWORD>>
.
postgresPort
: 5432 by default.
o2nDB
:
use_chart_o2nDB
: false by default. Enables internal PostgreSQL server (not recommended for production).
startinit
: true
by default. Enables database init scripts. Set to false
after chart is deployed.
creds
:
postgresHost
: the hostname of your PostgreSQL server with O2N database.
postgresPort
: 5432 by default.
postgresDB
: same as <<O2N_DB_NAME>>
.
postgresUser
: same as <<O2N_USERNAME>>
.
postgresUserPassword
: Same as <<O2N_PASSWORD>>
.
Creds
:
apiAdminLogin
: login for new (default) user for API. Will be created on the first run.
apiAdminPass
: password for the default user.
webUILocalAdminLogin
: local Admin for Web UI. Should differ from apiAdminLogin
.
webUILocalAdminPass
: password for webUILocalAdminLogin
.
BIO
:
licenseKey
: you'll receive it from Oz Engineer / Sales.
clientToken
: you'll receive it from Oz Engineer.
pvc
:
api
:
static
:
storageClassName
: RWX StorageClass.
size
: Expected size for PV.
Params
:
Global
:
startinits
: false
by default. Set to true
on the first run, then, after successful deployment, change back to false
.
To adjust API behavior, you might want to change other parameters. Please refer to comments in the values.yaml
file.
BIO is a part of the API chart. The BIO pods require separate nodes for each pod. To ensure BIO resides on dedicated nodes, you can use affinity and tolerations.
The BIO behavior can be customized via Params
-> global
-> affinity
in values.yaml
.
The default parameters are listed below:
The example of chart deployment via Helm:
Installation of Web SDK requires API pre-installed. Except specific cases, Web SDK cannot work without API.
For proper deployment, Web SDK requires an API service account. Pre-create a user for Web SDK with the CLIENT type and is_service
flag set. Please refer to User Roles for more details.
This example is based on the 1.5.1+onPremise chart version.
Adjust the values.yaml
file, setting the following mandatory parameters before deployment:
ozDockerHubCreds
: you'll receive them from Oz Engineer.
UserParams
:
URLs
:
apiURL
: API URL. Can be an internal API URL.
webSDKURL
: WebSDK url that will be used for public access.
Creds
:
AdminLogin
: login of the user that should be pre-created in API. Do not use the default admin login.
AdminPass
: password of the pre-created user.
PVC
:
persistentStorage
: false
be default. Set to true
if you use more than 1 Web SDK pod.
storageClassName
: RWX StorageClass.
Params
:
websdk
:
license
: should contain your Web SDK license. You'll receive it from Oz Engineer / Sales.
To adjust API behavior, you might want to change other parameters. Please refer to comments in the values.yaml
file.
The example of chart deployment via Helm: