Upgrade from 4.23 to 4.24
Windows migration
For Windows deployment migration, simply run the standard SmartFace Platform installer. The wizard run re-creates all required services, updates binaries and executables and executes the database updates as well.
Linux migration
For Linux deployment you need to update docker containers and execute database migration.
Update container version.
When using pre-configured SmartFace deployment from our github, open .env
file and the SF_VERSION
, so the versions match:
SF_VERSION=v5_4.24.0
AC_VERSION=v5_1.9.1
SFS_VERSION=v5_1.21.0
When directly referencing image, update every path to match version above:
version: "3.4"
services:
sf-base:
image: registry.gitlab.com/innovatrics/smartface/sf-base:v5_4.24.0
container_name: SFBase
command: --serviceName SFBase
ports:
- 2406:2406
restart: unless-stopped
environment:
- RabbitMQ__Hostname
- RabbitMQ__Username
...
Add NoSqlDataStorageDisabled environment variables
Please add environmental variable NoSqlDataStorageDisabled in the docker-compose.yml
file to camera services (and to the Edge Stream Processor service if you do not have it yet). This is for turning on/off saving of crop images by using the existing the configuration option NoSqlDataStorageDisabled.
Add new line for each camera service and the edge-stream-processor service:
- NoSqlDataStorageDisabled
This configuration option can be set in the .env
file:
# Using NoSql database
NoSqlDataStorageDisabled=false
A sample camera in the docker-compose.yml
would look like this:
sf-cam-1:
image: ${REGISTRY}sf-cam:${SF_VERSION}
container_name: SFCam1
command: --serviceName SFCam1
ports:
- 30001:${CameraDefaults__PreviewPort}
restart: unless-stopped
environment:
- RabbitMQ__Hostname
- RabbitMQ__Username
- RabbitMQ__Password
- RabbitMQ__Port
- RabbitMQ__VirtualHost
- RabbitMQ__UseSsl
- ConnectionStrings__CoreDbContext
- Database__DbEngine
- AppSettings__Log_RollingFile_Enabled=false
- AppSettings__USE_JAEGER_APP_SETTINGS
- JAEGER_AGENT_HOST
- S3Bucket__Endpoint
- S3Bucket__BucketName
- S3Bucket__AccessKey
- S3Bucket__SecretKey
- NoSqlDataStorageDisabled
# - GstPipelineTemplate
# - Gpu__GpuNeuralRuntime=Tensor
volumes:
- "./iengine.lic:/etc/innovatrics/iengine.lic"
# - "/var/tmp/innovatrics/tensor-rt:/var/tmp/innovatrics/tensor-rt"
#runtime: nvidia
A sample edge-stream-processor service the docker-compose.yml
would look like this:
edge-stream-processor:
image: ${REGISTRY}sf-edge-stream-processor:${SF_VERSION}
container_name: SFEdgeStreamProcessor
restart: unless-stopped
environment:
- RabbitMQ__Hostname
- RabbitMQ__Username
- RabbitMQ__Password
- RabbitMQ__Port
- RabbitMQ__VirtualHost
- RabbitMQ__UseSsl
- ConnectionStrings__CoreDbContext
- Database__DbEngine
- AppSettings__Log_RollingFile_Enabled=false
- AppSettings__Log_RabbitMq_Enabled
- OperationMode__MatchingDataStrategy
- OperationMode__LivenessDataStrategy
- NoSqlDataStorageDisabled
volumes:
- "./iengine.lic:/etc/innovatrics/iengine.lic"
Updating of the RabbitMQ Dependency
As a part of the upgrade to version 5.4.24, please update the RabbitMQ to the latest stable version. For this version of the SmartFace Platform it is rabbitmq:3.12.11-management
.
Please ensure the your Docker and Docker Compose supports the RabbitMQ version you are using. In this case, the RabbitMQ might need to have partial updates as jumping from rabbitmq:3.10.2-management
to rabbitmq:3.12.11-management
directly, you might encounter issues. RabbitMQ uses feature flags and for successful update to version 3.12.x all features must be enabled via management UI.
Before updating the RabbitMQ ensure all the current events are processed.
Steps needed:
Update RabbitMQ version in the
docker-compose.yml
file in thesf_dependencies
directory torabbitmq:3.11.2-management
, recreate the container runningdocker-compose up -d
in thesf_dependencies
folder. Open the server’s ip/hostname on port15672
, log in using your credentials or by the defaultguest
,guest
. Click on Admin and in the right menu choose Feature Flags. Ensure all the flags are enabled.A sample configuration of the RabbitMQ would look like below:
rabbitmq: image: "rabbitmq:3.11.2-management" container_name: rmq ports: - "15672:15672" - "5672:5672" - "1883:1883" - "5552:5552/tcp" environment: RABBITMQ_NODENAME: rabbit@rmq RABBITMQ_CONFIG_FILE: /etc/rabbitmq/external/rabbitmq.conf RABBITMQ_ENABLED_PLUGINS_FILE: /etc/rabbitmq/external/enabled_plugins RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: -rabbitmq_stream advertised_host rmq volumes: - ./etc_rmq/:/etc/rabbitmq/external - rmqdata:/var/lib/rabbitmq restart: unless-stopped
Update RabbitMQ version in the
docker-compose.yml
file in thesf_dependencies
directory torabbitmq:3.12.11-management
, recreate the container runningdocker-compose up -d
in thesf_dependencies
folder. Open the server’s ip/hostname on port15672
, log in using your credentials or by the defaultguest
,guest
. Click on Admin and in the right menu choose Feature Flags. Ensure all the flags are enabled.A sample configuration of the RabbitMQ would look like below:
rabbitmq: image: "rabbitmq:3.12.11-management" container_name: rmq ports: - "15672:15672" - "5672:5672" - "1883:1883" - "5552:5552/tcp" environment: RABBITMQ_NODENAME: rabbit@rmq RABBITMQ_CONFIG_FILE: /etc/rabbitmq/external/rabbitmq.conf RABBITMQ_ENABLED_PLUGINS_FILE: /etc/rabbitmq/external/enabled_plugins RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: -rabbitmq_stream advertised_host rmq volumes: - ./etc_rmq/:/etc/rabbitmq/external - rmqdata:/var/lib/rabbitmq restart: unless-stopped
For more technical information about upgrading the RabbitMQ, please read the official RabbitMQ documentation.
Run upgrade scripts
Simply execute run.sh
script shipped in our default deployment. In case you have custom deployment where you cannot use our pre-build script, call database upgrade manually. Please replace variables --rmq-*
with your current configuration.
For MSSQL execute
docker run --rm --name admin_migration --volume $(pwd)/iengine.lic:/etc/innovatrics/iengine.lic --network sf-network ${SF_ADMIN_IMAGE} \
run-migration \
-p 5 -c "$(getvalue ConnectionStrings__CoreDbContext)" -dbe $DB_ENGINE \
--rmq-host "$(getvalue RabbitMQ__Hostname)" --rmq-user "$(getvalue RabbitMQ__Username)" --rmq-pass "$(getvalue RabbitMQ__Password)" \
--rmq-virtual-host "$(getvalue RabbitMQ__VirtualHost)" --rmq-port "$(getvalue RabbitMQ__Port)" --rmq-use-ssl "$(getvalue RabbitMQ__UseSsl)"
For PostgreSQL execute
docker run --rm --name admin_migration --volume $(pwd)/iengine.lic:/etc/innovatrics/iengine.lic --network sf-network ${SF_ADMIN_IMAGE} \
run-migration \
-p 5 -c "$(getvalue ConnectionStrings__CoreDbContext)" -dbe $DB_ENGINE \
--rmq-host "$(getvalue RabbitMQ__Hostname)" --rmq-user "$(getvalue RabbitMQ__Username)" --rmq-pass "$(getvalue RabbitMQ__Password)" \
--rmq-virtual-host "$(getvalue RabbitMQ__VirtualHost)" --rmq-port "$(getvalue RabbitMQ__Port)" --rmq-use-ssl "$(getvalue RabbitMQ__UseSsl)"