Simple Face API migrator from v2 to v3

The sf-api-migrate-v2-v3 utility is used for galleries migration from different API versions. The utility will rename all old gallery names to the new format. All v3 gallery names will be saved.

To get the information about command line parameters for sf-api-migrate-v2-v3 utility, run the following command:

docker run --rm -ti --entrypoint "/sf-api-migrate-v2-v3" docker.int.ntl/ntech/universe/sf-api:ffserver-11.240325 --help

The most important command line flags are the following:

Command line flags

Type

Description

-config

string

Path to the config file.

-config-template

Output config template and exit.

To run the sf-api-migrate-v2-v3 utility, do the following:

  1. Create a default sf-api-migrate-v2-v3 configuration file.

    docker run --rm -ti --entrypoint "/sf-api-migrate-v2-v3" docker.int.ntl/ntech/universe/sf-api:ffserver-11.240325 \
        --config-template > /opt/ffserver/configs/storage-api-migrate-v2-v3.yaml
    
    • /opt/ffserver/configs/: the directory on the host to store the configuration file.

  2. Modify section storage-api -> shards and setup actual values of shards:

    ...
    storage-api:
        timeouts:
          connect: 5s
          response_header: 30s
          overall: 35s
          idle_connection: 10s
        max-idle-conns-per-host: 20
        keepalive: 24h0m0s
        trace: false
        shards:
        - master: http://tnt-1-1:8001/v2/
          slaves: []
        - master: http://tnt-1-2:8002/v2/
          slaves: []
    ...
    
  3. Run sf-api-migrate-v2-v3 utility with the configuration file.

    docker run --rm -ti --network server --entrypoint "/sf-api-migrate-v2-v3" \
        --volume /opt/ffserver/configs/storage-api-migrate-v2-v3.yaml:/storage-api-migrate-v2-v3.yaml \
        docker.int.ntl/ntech/universe/sf-api:ffserver-11.240325 \
        --config /storage-api-migrate-v2-v3.yaml
    

Console output:

INFO[0000] FindFace Simple Face API migrator from v2 to v3 (version 11.240325+158.gbfdcdab578) starting up
INFO[0000] Starting "face:test" gallery migration
INFO[0000] Gallery "face:test" doesn't need to be renamed
INFO[0000] Starting "default_0" gallery migration
INFO[0000] Renamed "default_0" gallery to "face:default_0"
INFO[0000] Starting "default_1" gallery migration
INFO[0000] Renamed "default_1" gallery to "face:default_1"