Docker

The Video Recognition Gateway (VIRGO) application runs as a Docker Container alongside all the other native services as part of the SAFR Linux Platform.

Initial Configuration

The VIRGO container starts for the first time with no factory configuration file. It will remain in this state until a new configuration has been generated and activated.

Configuration

The factory configuration file is generated when the following configuration script is called by CoVi during licensing (kickoff):

/opt/RealNetworks/SAFR/virgo/app/virgo/app/virgo_configure.sh

The script requires both a username and a hashed password to be passed in.

NOTE: If either of these are missing the script will not generate the configuration.

The script requires a template file /opt/RealNetworks/SAFR/virgo/app/virgo/config/virgo-factory.template in order to generate a new configuration.

Once executed the script will generate a working configuration and will store it in the following file.

NOTE: The existing configuration will be overwritten!

/opt/RealNetworks/SAFR/virgo/app/virgo/config/virgo-factory.conf

After the configuration is generated the VIRGO container will be restarted to activate the newly generated configuration.

Service Status

There are two ways to confirm that VIRGO is running and to confirm how long it has been operational.

  1. Use the check utility located in /opt/RealNetworks/SAFR/bin
  2. Use the Docker command to show active running containers:
    • # sudo docker ps

      CONTAINER ID  IMAGE               COMMAND                  CREATED        STATUS        PORTS   NAMES
      cf2a2dd33875  safr_virgo:1.1.38   "/bin/sh -c $VIRGO_A…"   18 hours ago   Up 18 hours              safr_virgo

If there is no output check the following:

Execution

VIRGO container will remain operational both after a failure has occurred as well as if the OS is restarted.

The container is automatically started by the SAFR Platform Installer and stopped by the SAFR Platform Uninstaller.

Logging

Execute the following command to provide logging output.

sudo docker exec -it safr_virgo /opt/RealNetworks/virgo/virgo service log <log options>

NOTE: Refer to the VIRGO Logging documentation for more information on logging options.

Service Monitor

Live view

sudo docker exec -it safr_virgo /opt/RealNetworks/virgo/virgo service monitor

Active Feeds to CSV

sudo docker exec -i safr_virgo /opt/RealNetworks/virgo/virgo service monitor > {CSV File} --active-only

NOTE: The stats are added to the CSV file every second so the usable data can be large depending on the number of active feeds.

Add Volume Mount to Existing Container

  1. Update the compose file to add the additional volume instructions.

    • The format is <local folder>:<docker folder>

    • The <docker folder> will be created if not already existing.

      Example: (Your folder names might be different.)

      version: "3.6"
      services:
      virgo:
      image: safr_virgo:1.2.12
      container_name: safr_virgo
      restart: on-failure
      pid: "host"
      volumes:
      - /opt/RealNetworks/SAFR/virgo/config/:/etc/virgo
      - /opt/RealNetworks/SAFR/virgo/files:/opt/RealNetworks/virgo/files
  2. Create the local folder to mount into the container.

    # mkdir -p /opt/RealNetworks/SAFR/virgo/files
  3. Stop and delete the container.

    # docker-compose -f /opt/RealNetworks/SAFR/virgo/app/docker-compose.yml down
  4. Create a container instance with new volume mount.

    # docker-compose -f /opt/RealNetworks/SAFR/virgo/app/docker-compose.yml up -d
  5. Create a test file in local mount point.

    # touch /opt/RealNetworks/SAFR/virgo/files/testfile
  6. Check that the test file exists inside the container's mount location.

    # docker exec -it safr_virgo ls -l /opt/RealNetworks/virgo/files

See Also