Upgrade from 4.25 to 4.26
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, their environment variables 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.26.0
AC_VERSION=v5_1.11.0
SFS_VERSION=v5_1.25.1
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.26.0
container_name: SFBase
command: --serviceName SFBase
ports:
- 2406:2406
restart: unless-stopped
environment:
- RabbitMQ__Hostname
- RabbitMQ__Username
...
Update docker containers definition
In your docker-compose.yml
or corresponding container definition file update the container SFAccessController
and remove the container SFBodyPartsDetectCpu
. Make sure the SFAccessController
container has environment variables forwarded.
Add new lines into the SFAccessController
:
- MQTT__Hostname
- MQTT__Username
- MQTT__Password
- MQTT__Port
- MQTT__UseSsl
So the final configuration looks like this, if using the default configuration:
access-controller:
image: ${REGISTRY}sf-access-controller:${AC_VERSION}
container_name: SFAccessController
ports:
# we forward the configured ports to default SF ports
- 5050:${Hosting__Port}
restart: unless-stopped
environment:
- RabbitMq__HostName=${RabbitMQ__Hostname}
- RabbitMq__UserName=${RabbitMQ__Username}
- RabbitMq__Password=${RabbitMQ__Password}
- RabbitMq__Port=${RabbitMQ__Port}
- RabbitMq__VirtualHost=${RabbitMQ__VirtualHost}
- RabbitMq__UseSsl=${RabbitMQ__UseSsl}
- MQTT__Hostname
- MQTT__Username
- MQTT__Password
- MQTT__Port
- MQTT__UseSsl
- Kestrel__EndPoints__Http__Url=${Hosting__Host}:${Hosting__Port}
env_file: .env.sfac
Remove the code below corresponding to the Body Parts Detector:
body-parts-detector:
image: ${REGISTRY}sf-body-parts-detector:${SF_VERSION}
container_name: SFBodyPartsDetectCpu
restart: unless-stopped
environment:
- RabbitMQ__Hostname
- RabbitMQ__Username
- RabbitMQ__Password
- RabbitMQ__Port
- RabbitMQ__VirtualHost
- RabbitMQ__UseSsl
- AppSettings__Log_RollingFile_Enabled=false
- AppSettings__USE_JAEGER_APP_SETTINGS
- JAEGER_AGENT_HOST
volumes:
- "./iengine.lic:/etc/innovatrics/iengine.lic"
Add Environment Variable
Add new Environmental Variable lines into the .env.sfac
environmental variable file for the Access Controller:
MQTT__Enabled=false
MQTT__Topic=edge-stream/{sourceId}/access-notifications/{notificationType}
MQTT__SendImageData=false
Update run.sh
Replace your version of run.sh with latest version on our GitHub as there have been several changes.
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 "$(getvalue CameraServicesCount)" \
-c "$(getvalue ConnectionStrings__CoreDbContext)" -dbe $DB_ENGINE \
--tenant-id default \
--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-streams-port "$(getvalue RabbitMQ__StreamsPort)" --rmq-use-ssl "$(getvalue RabbitMQ__UseSsl)" \
--dependencies-availability-timeout 120
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 "$(getvalue CameraServicesCount)" \
-c "$(getvalue ConnectionStrings__CoreDbContext)" -dbe $DB_ENGINE \
--tenant-id default \
--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-streams-port "$(getvalue RabbitMQ__StreamsPort)" --rmq-use-ssl "$(getvalue RabbitMQ__UseSsl)" \
--dependencies-availability-timeout 120