View a markdown version of this page

Enforce fixed license limits with a Deadline Cloud submission hook - Deadline Cloud

Enforce fixed license limits with a Deadline Cloud submission hook

The license_limits sample shows how to combine the Deadline Cloud Limits feature with a submission hook to enforce a fixed number of concurrent licenses (for example, V-Ray licenses) across all job submissions, without requiring artists to configure anything manually.

The Deadline Cloud Limits feature throttles task scheduling so that no more than N tasks requiring a license run concurrently. For the limit to take effect, each job must declare the license as a host requirement in its template. This sample provides a pre-submission hook that automatically injects the license host requirement into every job template at submission time. As a result:

  • Artists submit jobs normally with no extra steps.

  • The hook ensures every job declares its need for the license.

  • The Deadline Cloud scheduler enforces the concurrency limit.

To set up the license limits hook
  1. Create a Limit on your farm with the AWS CLI:

    aws deadline create-limit \ --farm-id farm-id \ --display-name "VRay License" \ --amount-requirement-name "amount.vray" \ --max-count 5
  2. Associate the Limit with your queue using aws deadline create-queue-limit-association.

  3. Copy the license_limits/ directory to a shared location accessible by all artist workstations.

  4. On each artist workstation, enable environment hooks:

    deadline config set settings.allow_environment_hooks true
  5. Set the DEADLINE_HOOKS_DIR environment variable in your application launcher scripts to point to the shared directory.

Important

Don't add amount.vray as a customAmounts entry in your fleet's capabilities. If the fleet declares the amount as a capability, the fleet treats it as a per-worker resource and bypasses the queue-level limit. The limit association alone provides compatibility.

To extend the sample to other licenses (Houdini, Nuke, and so on), add entries to license_limits.json and create corresponding Limits and queue associations.