Installation in Kubernetes
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.
Database Creation
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.
CREATE ROLE <<USERNAME>> WITH LOGIN PASSWORD '<<PASSWORD>>'
INHERIT
CONNECTION LIMIT -1
NOSUPERUSER
NOCREATEDB
NOCREATEROLE
NOREPLICATION ;
CREATE DATABASE <<DB_NAME>>
WITH OWNER = <<USERNAME>>
ENCODING = 'UTF8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1
LC_COLLATE='en_US.UTF-8'
LC_CTYPE='en_US.UTF-8'
TEMPLATE template0;
\c <<DB_NAME>>
CREATE EXTENSION IF NOT EXISTS pgcrypto;
To increase performance, consider using this list of indexes:
Chart Deployment
API and Web SDK charts require RWX SC (CephFS, EFS, NFS, Longhorn, etc.).
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.
API
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 tofalse
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 fromapiAdminLogin
.webUILocalAdminPass
: password forwebUILocalAdminLogin
.
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 totrue
on the first run, then, after successful deployment, change back tofalse
.
To adjust API behavior, you might want to change other parameters. Please refer to comments in the values.yaml
file.
TFSS (BIO)
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:
# We recommend using separate nodes for API and BIO pods,
# and separate node for each BIO pod.
## Default affinity is:
## Try to start API pods on nodes with "oz:api" label, BIO pods on nodes with "oz:bio" label
affinity:
API:
# You may add additional keys, or comment the whole section to disable affinity
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: oz
operator: In
values:
- api
# nodeName: "myNode" #Node name can be changed. Uncomment to use
# nodeSelector: ##NodeSelector can be changed. Uncomment to use
# oz: api
# fill tolerations according to node taints, uncomment to use
#tolerations:
#- key: nodegroup
# operator: Equal
# value: api
# effect: NoSchedule
BIO:
# You may add additional keys, or comment the whole section to disable affinity
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: oz
operator: In
values:
- bio
# nodeName: "myNode" ## Node name can be changed. Uncomment to use.
# nodeSelector: ## NodeSelector can be changed. Uncomment to use.
# oz: bio
# fill tolerations according to node taints, uncomment to use.
#tolerations:
#- key: nodegroup
# operator: Equal
# value: bio
# effect: NoSchedule
The example of chart deployment via Helm:
helm install oz-api https://chartmuseum.infra.ozforensics.ai/charts/oz-k8s-0.11.28.tgz --namespace oz-api --values custom-api-values.yaml
Web SDK
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.
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 totrue
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.
# Format:
# Remark: Indentations are critical for yaml.
license: |-
{
"payload_b64": "",
"signature": "",
"enc_public_key": ""
}
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:
helm install oz-websdk https://chartmuseum.infra.ozforensics.ai/charts/oz-k8s-sdk-1.5.1+onPremise.tgz --namespace oz-websdk --values custom-websdk-values.yaml
Last updated
Was this helpful?