AcademySoftwareFoundation / OpenCue

A render management system you can deploy for visual effects and animation productions.
https://www.opencue.io
Apache License 2.0
832 stars 202 forks source link

[cuebot/rqd] Add feature to run frames on a containerized environment using docker #1549

Closed DiegoTavares closed 1 week ago

DiegoTavares commented 1 month ago

Motivation

Running OpenCue In a multi operational system environment requires segregating the farm, which means hosts have to be assigned to one OS and cannot be shared between shows that have different OS requirements. This can be a challenge when sharing resources between shows is necessary.

Proposed solution

A new execution mode on rqd runDocker to live alongside runLinux, runWindows, and runDarwin (macOs). This mode will launch the frame command on a docker container based on the frame expected OS. With this, rqd is now able to run jobs from different OSs on the same host.

But to make this possible, a rqd host needs to advertise itself not with its own OS code (defined by SP_OS on rqd.conf), but with all the OSs of images it is capable of executing.

Configuration changes

The following sections were added to rqd.conf:

[docker.config]
# Setting this to True requires all the additional "docker.[]" sections to be filled
RUN_ON_DOCKER=True

# This section is only required if RUN_ON_DOCKER=True
# List of volume mounts following docker run's format, but replacing = with :
[docker.mounts]
TEMP=type:bind,source:/tmp,target:/tmp,bind-propagation:slave
NET=type:bind,source:/net,target:/net,bind-propagation:slave

# This section is only required if RUN_ON_DOCKER=True
#  - keys represent OSs this rqd is capable of executing jobs in
#  - values are docker image tags
[docker.images]
centos7=centos7.3:latest
rocky9=rocky9.3:latest

In this case, the rqd host would advertise itself with OS=centos7,rocky9, and the dispatch logic has been changed accordingly to account for dispatching frames to nodes that support multiple OSs.

DiegoTavares commented 3 weeks ago

This change has been rebased from https://github.com/AcademySoftwareFoundation/OpenCue/pull/1560 to allow running unit tests on rqd.

lithorus commented 1 week ago

Any idea on when this will get merged? I have a PR coming with the loki support which will have several merge conflicts with this branch PR :)

DiegoTavares commented 1 week ago

Any idea on when this will get merged? I have a PR coming with the loki support which will have several merge conflicts with this branch PR :)

Today