Update instructions
Update the version
OMNI Platform update occurs in several stages:Migration of settings to configuration files of the new version
Uploading images for services
Taking a database dump
Stopping old version services
Starting new version services
All file and folder paths are relative to the setup directory. All commands are executed in the system console from this directory.
Copy the face_sdk.lic license file from the setup directory to the corresponding directory of the new distribution.
Migrate secrets from the file ./cfg/platform.secrets.json to a similar file in the new distribution. This is necessary to retain them locally and ensure their usage during deployment.
Migrate service configurations from the old distribution by comparing the contents of the following files in both versions:
- ./cfg/image-api.values.yaml
- ./cfg/matcher.values.yaml
- ./cfg/platform.values.yaml
- ./cfg/platform-ui.values.yaml
- ./cfg/license-server.settings.cfg
Transfer only the values of variables that have been modified. Please do not change variable values in the
image
fields, as they contain information about the images used for deployment, and are set automatically for each version.Update local images by running the following command:
./cli.sh generic load-images
Create a backup of the database:
./cli.sh platform db-backup - <postgres_root_user> <dump_path>
Replace
<postgres_root_user>
with the value of thepostgres-root-credentials.user
variable found in the ./cfg/platform.secrets.json file.Replace
<dump_path>
with the absolute path to the .sql dump file (can be created manually). It is also recommended to archive the /kv directory.Before starting the new version of OMNI Platform, stop the previous version by running the following commands:
./cli.sh image-api uninstall
./cli.sh matcher uninstall
./cli.sh platform uninstall
./cli.sh platform-ui uninstall
Proceed with the remaining commands from the new distribution's setup directory.
Recreate secrets:
./cli.sh platform install-secrets
Deploy platform modules:
./cli.sh image-api install
./cli.sh matcher install
./cli.sh platform install
./cli.sh platform-ui installFor convenient tracking of the deployment process, open another terminal tab and run the following command:
watch 'kubectl get pods'
When all pods have the status Running, it indicates that OMNI Platform has started successfully.
Delete the version
Move to
<distribution_folder>/setup
folder and stop OMNI Platform:./cli.sh platform uninstall
./cli.sh image-api uninstallMake sure that all service containers are stopped:
watch 'kubectl get pods'
Service statuses should change from Running to Terminating. As a result, all services are removed from the console output.
Delete the deployed Kubernetes cluster:
./cli.sh smc uninstall
Delete auxiliary files of Kubernetes cluster:
sudo rm -rf ~/.kube/
noteWhen OMNI Platform is deleted, the entire database is saved in the
/kv/pgdata
directory. For further use of this database you need to specify the same authorization data and database name when installing the new version of OMNI Platform. Otherwise, run the command below:./cli.sh platform db-reset