Upgrade from 4.27 to 4.28
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.28.2
AC_VERSION=v5_1.13.0
SFS_VERSION=v5_1.28.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.28.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 make the below mentioned updates:
Enable JSON format of logs for each service
Add the line below to each service
- AppSettings__Log_JsonConsole_Enabled
A sample service will 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_JsonConsole_Enabled
- AppSettings__Log_RabbitMq_Enabled
- NoSqlDataStorageDisabled
volumes:
- "./iengine.lic:/etc/innovatrics/iengine.lic"
Update the network setup
The previous way the network was setup is deprecated, we recommend to update it as below:
Instead of:
networks:
default:
external:
name: sf-network
Set it as:
networks:
default:
name: sf-network
external: true
Update Environment Variables
Open .env
file and add the JsonConsole_enabled variable, set it to true
# Structured logging
AppSettings__Log_JsonConsole_Enabled=true
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