Remoto - VFS: VFS in a Docker Container
Remoto - VFS
VFS in a Docker Container

VFS in a Docker container

What this provides

This repo provides the following registry images:

  • registry.eyelash.ai:5050/vfs/core/vfs_server:master (and tagged versions)
  • registry-ny.eyelash.ai:5050/vfs/core/vfs_server:master (and tagged versions)
  • registry-ny.eyelash.ai:5050/vfs/core/vfs_qtbase:[qtversion]
  • registry-ny.eyelash.ai:5050/vfs/core/vfs_server:dev

This repo provides the following web paths:

Building the images

The VFS container is built on the base container, which is built on https://gitlab.eyelash.ai/vfs/core/vfs_qtbase

It is separated in this way so that changes to VFS can be rebuilt into an image very quickly without needing to reinstall Qt or any of the other development tools.

Gitlab Continuous Integration Workflow

Gitlab will automatically build and tag VFS on merge to master, tag on master, or branches named 'dev, develop, or development'

Note that it will tag the image based on git commit hash, and then re-tag it with the appropriate tag or branch name.

All dev branches are containerized to tag :dev , meanwhile master image is :master, and tags are also tagged accordingly, eg. :v1.5.0

The internal registry-ny will contain all images necessary for building such as vfs_qtbase, but AWS registry.eyelash.ai will only contain images used in production, eg. vfs_server:master, vfs_server:[tags].

FIXME: following is out of date:

To deploy updates to VFS and VFS Documentation, simply make a pull request and when it is merged to master it will be built and deployed by Jenkins.

On merge to master, the following is always built by Jenkins:

  • registry.themolecule.com/vfs/vfs_server:prod (automatic jenkins deployment)
  • registry.themolecule.com/vfs/vfs_documentation:prod (automatic jenkins deployment)

On merge to master, if base/version.env version does not exist in the repo:

  • registry.themolecule.com/vfs/centos7_vfs_server_base (automatic tagged deployment based on base/version.env)

Manual Tagging (admins only)

Long-term supported, stable releases of vfs_server are generally tagged for use in projects. These tags are reflected both in the registry and in this git repo.. Check with someone before setting a new version number!

Simply go to https://gitlab.eyelash.ai/vfs/core/vfs_server/-/tags and apply your tag, it will then be built and pushed to the container registry with that tag.

Extras

A convenient registry browser can be run on a localhost:

docker run --name registry-browser -it --rm -p 8080:8080 -e DOCKER_REGISTRY_URL=http://registry.themolecule.com:5000 klausmeyer/docker-registry-browser:v2
# or
$VFS_DIR/../docker/utils/docker_front.sh

Then opened in a browser: http://localhost:8080

Also, a maintenance tool is available at docker/utils/docker-reg-tool, which allows repository images to be deleted and listed.

Docker Compose

You will always need to build another container on top of this one that contains the actual implementation of VFS that you want to use. The container built on top of vfs_server will contain the docker-compose.yml file.

To start docker-container using repo root dir as a work-dir

source ./docker/dev.env
docker-compose -f docker/docker-compose.yml up -d

To update new docker-compose env vars or port settings, etc...

docker-compose -f docker/docker-compose.yml up -d

To view logs of running docker container

docker-compose -f docker/docker-compose logs ${project_name}

To shell into the running container

docker-compose -f docker/docker-compose exec ${project_name} bash