Upgrade from 4.18 to 4.20

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 update all versions:

SF_VERSION=v5_4.20.1
AC_VERSION=v5_1.9.1
SFS_VERSION=v5_1.18.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.20.1
        container_name: SFBase
        command: --serviceName SFBase
        ports:
        - 2406:2406
        restart: unless-stopped
        environment:
        - RabbitMQ__Hostname
        - RabbitMQ__Username
        ...
Update container configuration

Add containers sf-streamdatadbworker, object-detector and pedestrian-extractor into the docker-compose.yml


    ...
      - 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
    volumes:
      - "./iengine.lic:/etc/innovatrics/iengine.lic"
sf-streamdatadbworker: image: ${REGISTRY}sf-streamdatadbworker:${SF_VERSION} container_name: SFStreamDataDbWorker restart: unless-stopped environment: - RabbitMQ__Hostname - RabbitMQ__Username - RabbitMQ__Password - RabbitMQ__Port - 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 object-detector: image: ${REGISTRY}sf-object-detector:${SF_VERSION} container_name: SFObjectDetectorCpu restart: unless-stopped environment: - RabbitMQ__Hostname - RabbitMQ__Username - RabbitMQ__Password - RabbitMQ__Port - AppSettings__Log_RollingFile_Enabled=false - AppSettings__USE_JAEGER_APP_SETTINGS - JAEGER_AGENT_HOST volumes: - "./iengine.lic:/etc/innovatrics/iengine.lic" pedestrian-extractor: image: ${REGISTRY}sf-pedestrian-extractor:${SF_VERSION} container_name: SFPedestrianExtractorCpu restart: unless-stopped environment: - RabbitMQ__Hostname - RabbitMQ__Username - RabbitMQ__Password - RabbitMQ__Port - AppSettings__Log_RollingFile_Enabled=false - AppSettings__USE_JAEGER_APP_SETTINGS - JAEGER_AGENT_HOST volumes: - "./iengine.lic:/etc/innovatrics/iengine.lic"
extractor: image: ${REGISTRY}sf-extractor:${SF_VERSION} container_name: SFExtractCpu ...
Update upgrade script

Update run.sh script and change.


docker run --rm --name admin_migration --volume $(pwd)/iengine.lic:/etc/innovatrics/iengine.lic --network sf-network ${REGISTRY}sf-admin:${VERSION} run-migration -p 5 -c "Server=mssql;Database=SmartFace;User ID=sa;Password=Test1234;" -dbe $DB_ENGINE --rmq-host ${RMQ_HOST} --rmq-user ${RMQ_USER} --rmq-pass ${RMQ_PASS} --rmq-virtual-host ${RMQ_VHOST} --rmq-port ${RMQ_PORT} --rmq-use-ssl ${RMQ_SSL}
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 ${REGISTRY}sf-admin:${VERSION} run-migration -p 5 -c "Server=mssql;Database=SmartFace;User ID=sa;Password=Test1234;" -dbe $DB_ENGINE --rmq-host ${RMQ_HOST} --rmq-user ${RMQ_USER} --rmq-pass ${RMQ_PASS} --rmq-virtual-host ${RMQ_VHOST} --rmq-port ${RMQ_PORT} --rmq-use-ssl ${RMQ_SSL}

For PostgreSQL execute

docker run --rm --name admin_migration --volume $(pwd)/iengine.lic:/etc/innovatrics/iengine.lic --network sf-network ${REGISTRY}sf-admin:${VERSION} run-migration -p 5 -c "Server=pgsql;Database=smartface;Username=postgres;Password=Test1234;Trust Server Certificate=true;" -dbe $DB_ENGINE --rmq-host ${RMQ_HOST} --rmq-user ${RMQ_USER} --rmq-pass ${RMQ_PASS} --rmq-virtual-host ${RMQ_VHOST} --rmq-port ${RMQ_PORT} --rmq-use-ssl ${RMQ_SSL}