Spot

The Spot Event Plugin can scale cloud-based EC2 Spot instances dynamically based on the queued Jobs and Tasks in the Deadline Database.

It associates a Spot Fleet Request JSON dictionary with named Deadline Worker Groups, allowing multiple Spot Fleets with different hardware and software specifications to be launched for different types of Jobs based on their Group assignment.

Overview

What Is Amazon EC2 Spot?

Amazon EC2 Spot Instances let you take advantage of unused EC2 capacity in the Amazon Web Services cloud at steep discounts.

EC2 Spot instances are identical to On-Demand EC2 instances of the same type and size, except for the following details:

  • The cost can be up to 90% lower than On-Demand instances.
    • The cost varies slightly between AWS Regions, Availability Zones (AZ), instance families and sizes, and time of day based on supply and demand.

    • The cost can never exceed the On-Demand price.

    • Take a look at the AWS Spot pricing page for current pricing.

  • If capacity is insufficient to provide On-Demand instances to customers, AWS can terminate Spot instances.
    • If an instance is reclaimed by AWS within the first hour, you will not be charged for that hour.

    • After the first hour, you won’t be charged for a partial hour of a reclaimed Windows instance, while a Linux instance will be charged for the usage in seconds.

    • Another Spot Instance from a different capacity pool (different AZ, different instance size or instance type) specified in the Spot Fleet Request may replace the reclaimed instance, maintaining the requested target capacity.

See also

You can learn more about Spot Instances on the AWS Spot Instance Website.

Lifecycle

The Spot event plugin controls the lifecycle of multiple spot fleet requests by scaling up and down the target capacity of the spot fleets.

In order to maintain the spot fleet requests the Spot event plugin triggers after House Cleaning. When the event triggers we determine the number of Workers that could be actively working at the same time for each group. Next, for each configured group we will create or modify a Spot Fleet Request so they will contain a number of instances equal to the available work up to the maximum capacity set by the user.

Once the Spot Fleet Requests have been fulfilled and the Workers have started, they will automatically assign themselves to the Group they were created for and optionally 1 or more pools.

Finally, when either the Workers are no longer rendering or the Spot instance is going to be interrupted the Worker will mark itself as offline, remove itself from the Worker List and finally terminate itself.

Determining Targets

For every Group you have configured, the Spot Event Plugin will scale the target number of instances based on the state of your farm during House Cleaning. Here are some of the factors it takes into account:

  • State: Only Queued Tasks are considered eligible to work on.

  • Allow Lists: If a job has an allow list then no spot instances will be started for it.

  • Limits: The number of available Limit stubs you have will constrain the number of instances to start.

  • Machine Limits: The machine limits for individual jobs are taken into account for determining the available work for that job.

  • Concurrent Tasks: If Concurrent Tasks are enabled on a Job and on its Plugin, then they will be taken into account.

Note

The Spot event plugin assumes that each AMI is configured to only start 1 Worker. Due to this, we treat Worker Level limits the same as Machine Level Limits.

Warning

If you select an instance type with fewer CPU’s then the number of concurrent tasks for your jobs, you may not receive the number of instances you are expecting. This is done because Deadline caps the number concurrent tasks to the number of CPU’s on your machine.

Resource Tracker

The Resource Tracker is an optional, but highly recommended, service that monitors the health of instances started by Deadline in your AWS account. It monitors a heartbeat reported by each render node and reboots any instances that are in an unhealthy state. If enough instances are failing the Resource Tracker will cancel the spot fleet.

Prerequisites

Before you can use the Spot Event Plugin you will need the following:

Warning

Ensure “House Cleaning Interval” in Configure Repository Options -> “House Cleaning” is NOT set below 30 seconds (default=60 seconds) and the setting: “Allow Workers to Perform House Cleaning If Pulse is not Running” is disabled as shown below in Configure Repository Options. Consider running at least one other instance of Pulse on another machine for redundancy.

Setup

In order to use the Spot event plugin the following set up is required:

AWS Permissions

When working with AWS you can manage access by creating policies and attaching them to IAM identities or AWS resources. Within the Spot event plugin we require the following roles:

See also

You can learn more about IAM Permissions on the AWS IAM Website.

Spot Credentials

This IAM User or IAM Role is used by the RCS or Pulse when they execute the Spot event Plugin. These spot credentials are used by the Main event plugin and contain the permissions necessary to create, maintain and modify the spot fleets and optionally those necessary to deploy the Resource Tracker.

You can grant the required permissions by attaching the following AWS managed IAM policies to your IAM user:

These credentials will be used when configuring Deadline.

Creating the Spot Credentials IAM User

To create the Spot Credentials IAM user:

  1. Sign in to the AWS Console.

  2. Click on Services at the top of the AWS Console, and then click on IAM under “Security, Identity and Compliance”.

  3. On the “IAM” panel that appears, select Users, and then click the Add user button.

    ../_images/events_spot_iam_user_creation_1.png
  4. In the “Add user” panel that appears:

    • For the User name, enter DeadlineSpotEventPluginAdmin (or any name of your choosing).

    • For Access type, choose Programmatic access.

  5. Click the Next: Permissions button to continue.

    ../_images/events_spot_iam_user_creation_2.png
  6. Search for the AWSThinkboxDeadlineSpotEventPluginAdminPolicy and AWSThinkboxDeadlineResourceTrackerAdminPolicy policies in the search box, and check both of them in the list below.

  7. Click the Next: Tags button to continue.

    ../_images/events_spot_iam_user_creation_3.png
  8. You can add tags with additional data to the user, but they are not required.

  9. Click the Next: Review button to continue.

    ../_images/events_spot_iam_user_creation_4.png
  10. Verify that the information is correct, and click Create user.

    ../_images/events_spot_iam_user_creation_5.png
  11. Once the user is created you’ll see a confirmation screen. Here you can get your Access key and Secret access key, which you’ll need to enter in the “Security Credentials” field of the Configure Event Plugin dialog.

Warning

Once you navigate away from the confirmation screen, you will be unable to access the Secret Key.

Warning

This secret access key can be used to access your AWS account. It’s important that you keep it stored securely. Please refer AWS Guidelines for standard best practices for management of AWS access keys.

Note

For further security, consider modifying these IAM policies with an IP address condition on each policy statement. The IP addresses for this connection should be for any machines that will run the Spot Event Plugin, either the RCS or Pulse instances. Place this text after the “Resource” entry in each of the statements in the policies.

"Condition": {
    "IpAddress" : {
        "aws:SourceIp" : ["<public_ip_address>"]
    }
}

This way, only API calls from the specified IP address will be accepted by AWS.

Spot Fleet IAM Instance Profile

This IAM role is used by the Workers that are started by the spot fleet requests. This role is used to give the Workers permissions to Terminate themselves, determine what group they are part of, and report their status to the Resource Tracker (if in use).

You can assign the required permissions by attaching the following AWS-managed IAM policy to an IAM role. We require that the name of this role begins with “DeadlineSpot”:

Warning

As of Deadline 10.1.8, our default Spot Credentials IAM policy only allows IAM instance profiles with IAM role names that begin with DeadlineSpot.

Creating the IAM Instance Profile

To create the IAM role for your IAM instance profile:

  1. Sign in to the AWS Console

  2. Click on Services at the top of the AWS Console, and then click on IAM under “Security, Identity and Compliance”.

  3. On the “IAM” panel that appears, click Roles, and then click the Create role button.

    ../_images/events_spot_instance_role_creation_1.png
  4. In the “Create role” panel that appears, choose the following:

    • Under Select type of trusted entity, choose AWS service.

    • Under Choose a use case, choose EC2.

  5. Click the Next: Permissions button to continue.

    ../_images/events_spot_instance_role_creation_2.png
  6. Search for AWSThinkboxDeadlineSpotEventPluginWorkerPolicy in the search box, and check it in the list below.

  7. Click the Next: Tags button to continue.

    ../_images/events_spot_instance_role_creation_3.png
  8. You can add tags with additional data to the role, but they are not required.

  9. Click the Next: Review button to continue.

    ../_images/events_spot_instance_role_creation_4.png
  10. In the Role name field, enter DeadlineSpotWorker. You can choose a different name for this role, however, the name must begin with “DeadlineSpot” in order to work with our default Spot Credentials IAM policies.

  11. Verify that the information is correct, and click Create role.

  12. Choose this role as the “IAM instance profile” in your Spot Fleet Request.

IAM Fleet Role

This IAM role is used directly by the Spot Fleet. It gives the spot fleet the permissions needed to start, stop, and tag instances.

By default, a role will automatically be created for your account called aws-ec2-spot-fleet-tagging-role which contains all of the permissions that are needed.

Resource Tracker Role

This IAM role is used by Deadline Resource Tracker so that it is able to access the AWS resources that it creates in your account.

This IAM role must have the following settings:

Creating the Resource Tracker IAM Role

To create the Resource Tracker IAM role:

  1. Sign in to the AWS Console.

  2. Click on Services at the top of the AWS Console, and then click on IAM under “Security, Identity and Compliance”.

  3. On the “IAM” panel that appears, click Roles, and then click the Create Role button.

    ../_images/resource_tracker_iam_role_creation_1.png
  4. In the “Create role” panel that appears, choose the following:

    • Under Select type of trusted entity, choose AWS service.

    • Under Choose a use case, choose Lambda.

  5. Click the Next: Permissions button to continue.

    ../_images/resource_tracker_iam_role_creation_2.png
  6. Search for AWSThinkboxDeadlineResourceTrackerAccessPolicy in the search box, and check it in the list below.

  7. Click the Next: Tags button to continue.

    ../_images/resource_tracker_iam_role_creation_3.png
  8. You can add tags with additional data to the role, but they are not required.

  9. Click the Next: Review button to continue.

    ../_images/resource_tracker_iam_role_creation_4.png
  10. In the Role name field, enter DeadlineResourceTrackerAccessRole.

  11. Verify that the information is correct, and click Create role.

Amazon Machine Images

As part of creating Spot Fleet Requests you will require an Amazon Machine Image (AMI) for each Spot Fleet you wish to start. The AMI’s represent the base state that each of you instances will start with.

When creating your AMIs we recommend the following setup:

  • Install the Deadline Client.

  • Install your render application of choice.

  • Configure your file system to automatically mount on start.

  • Configure Deadline to automatically start.

  • Configure Deadline connectivity.

See also

To see an example of creating an AMI please take a look at our Studio in the Cloud Tutorial.

Note

It is recommended that you NOT centrally install your Deadline Client or Render Software on your Linux render nodes. Centrally installing your software can cause slowdowns when starting Deadline or your renders.

Spot Fleet Requests

Spot Fleet Requests define a collection of spot instances and the parameters that they will be launched with. The Spot event Plugin uses a separate Spot Fleet Request for each Deadline Group.

Note

In order to work with Deadline, Spot Fleets Requests must be set to maintain and the “Target Capacity” of the Spot fleet Request is the maximum number of Workers that Deadline will start.

Creating the Spot Fleet Requests

To create a Spot Fleet Request:

  1. Sign in to the AWS Console.

  2. Click on Services at the top of the AWS Console, and then click on EC2 under “Compute”.

  3. On the “EC2” panel that appears, click Spot Request in the sidebar under “Instances”, and then click the Request Spot Instances Button button.

    ../_images/spot_fleet_request_creation_1.png
  4. Select “Flexible Workflows”.

    ../_images/spot_fleet_request_creation_2.png
  5. (OPTIONAL) If you have a launch template for your AMI then choose that otherwise select the AMI that you created.

    Warning

    Note that you will need to add the following key value pair as a tag in the launch template for it to work properly with the Resource Tracker: ‘DeadlineTrackedAWSResource’:’SpotEventPlugin’. Not adding this tag will cause the Resource Tracker to terminate your instances as unhealthy if the Resource Tracker is running.

    ../_images/spot_fleet_request_creation_3.png
  6. Set “Auto-assign IPv4 public IP” to “Enable”

    ../_images/spot_fleet_request_creation_4.png
  7. Set the “IAM Instance Profile” to the “DeadlineSpot*” IAM instance Profile you created earlier.

    ../_images/spot_fleet_request_creation_5.png
  8. Set the “Target Capacity” to the Maximum number of Workers you would like in your fleet, and enable “Maintain Target Capacity”.

    ../_images/spot_fleet_request_creation_6.png
  9. If you created a new “IAM Fleet Role” then set the “IAM Fleet Role” otherwise leave it as a default.

  10. If you would like to do any setup when your instance starts up, you can set up “User Data” scripting with the scripting. See Render Farm Connectivity.

  11. Download the fleet configuration by pressing the “JSON Config” button at the bottom of the page.

../_images/spot_fleet_request_creation_7.png

Event Plugin Configuration

After creating your IAM Policies and Creating your spot fleet you are now ready to configure the main Plugin. To perform this step, simply enter Super User mode and select Tools -> Configure Events form the Monitor’s menu. From there, select the Spot entry from the list on the left.

../_images/cep_spot.png

As part of configuring the Spot event plugin you will need to configure the following sections:

Security Credentials

Since the Spot event plugin makes requests to start and stop Spot Fleets it requires permissons to authenticate with AWS. To do this we will use the IAM Credentials you created in one of the following ways:

../_images/credentials.png
AWS Named Profile

AWS Named Profiles are collections of settings and credentials that are stored on a machine.

In order to use a Named Profile in the Spot Event Plugin you need to set “Use Local Credentials” to True and set the “AWS Named Profile” setting to the name of your profile.

For more information on AWS Named Profiles and how to create them, visit: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html

Note: The credential and config files (~/.aws/credentials and ~/.aws/config (Linux & Mac) or %USERPROFILE%\.aws\credentials and %USERPROFILE%\.aws\config (Windows)) must be on the machine that performs house cleaning (which is usually the machine running Pulse).

Access Key and Secret Key

The Access Key and Secret Key for the IAM User can be directly entered into Deadline.

In order to use the Access Key and Secret Key you need to set “Use Local Credentials” to False and set both the “Access Key ID” and “Secret Access Key” Fields

For more information on Access and Secret Keys visit: https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys

Default credentials

If neither Access Key and Secret Key nor the AWS Named Profile are configured the systems Default credentials will be used. If your RCS or Pulse is running on an EC2 instance this mode can be used to work with the EC2 Instance Role attached to that instance.

For more information on the default credential search path visit: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#configuring-credentials

Spot Fleet Request Configurations

The Spot Fleet Configuration setting is a JSON dictionary. It represents a one to one mapping between a Deadline Group and Spot Fleet Request Configurations.

In order to create the Spot fleet configuration you will need the Spot Fleet Request you created previously.

The spot fleet configuration will be of the form:

{
    "group_name": <Replace with Spot Fleet Request>,
    "2nd_group_name": <Replace with 2nd Spot Fleet Request>
}
Example Spot Fleet Request Configurations

Here’s an example with two Deadline Groups, called: group_name and 2nd_group_name:

{
    "group_name":{
        "IamFleetRole": "arn:aws:iam::357432474442:role/aws-ec2-spot-fleet-tagging-role",
        "AllocationStrategy": "capacityOptimized",
        "TargetCapacity": 0,
        "SpotPrice": "0.105",
        "ValidFrom": "2016-12-13T16:48:12Z",
        "ValidUntil": "2017-12-13T16:48:12Z",
        "TerminateInstancesWithExpiration": true,
        "LaunchSpecifications": [
        {
            "ImageId": "ami-b04s92d0",
            "InstanceType": "c3.large",
            "KeyName": "key_pair",
            "SpotPrice": "0.105",
            "BlockDeviceMappings": [
            {
                "DeviceName": "/dev/xvda",
                "Ebs": {
                    "DeleteOnTermination": true,
                    "VolumeType": "gp2",
                    "VolumeSize": 8,
                    "SnapshotId": "snap-c87f35ec"
                }
            }
            ],
            "NetworkInterfaces": [
            {
                "DeviceIndex": 0,
                "SubnetId": "subnet-3efcba4b",
                "DeleteOnTermination": true,
                "Groups": [
                   "sg-2d623a54"
                ],
                "AssociatePublicIpAddress": true
            }
            ]
        }
        ],
        "Type": "maintain"
    },
    "2nd_group_name":{
        "IamFleetRole": "arn:aws:iam::357466224442:role/aws-ec2-spot-fleet-tagging-role",
        "AllocationStrategy": "capacityOptimized",
        "TargetCapacity": 0,
        "SpotPrice": "0.133",
        "ValidFrom": "2016-12-15T16:47:06Z",
        "ValidUntil": "2017-12-15T16:47:06Z",
        "TerminateInstancesWithExpiration": true,
        "LaunchSpecifications": [
        {
            "ImageId": "ami-d722f0b7",
            "InstanceType": "m3.medium",
            "SpotPrice": "0.067",
            "BlockDeviceMappings": [
            {
                "DeviceName": "/dev/sda1",
                "Ebs": {
                    "DeleteOnTermination": true,
                    "VolumeType": "gp2",
                    "VolumeSize": 8,
                    "SnapshotId": "snap-42713105"
                }
            }
            ],
            "SecurityGroups": [
            {
                "GroupId": "sg-06b82060"
            },
            {
                "GroupId": "sg-5058c026"
            }
            ],
            "SubnetId": "subnet-2040e466"
        },
        {
            "ImageId": "ami-d722f0b7",
            "InstanceType": "m4.large",
            "SpotPrice": "0.12",
            "BlockDeviceMappings": [
            {
                "DeviceName": "/dev/sda1",
                "Ebs": {
                    "DeleteOnTermination": true,
                    "VolumeType": "gp2",
                    "VolumeSize": 8,
                    "SnapshotId": "snap-47113105"
                }
            }
            ],
            "SecurityGroups": [
            {
                "GroupId": "sg-06b44060"
            },
            {
                "GroupId": "sg-5238c036"
            }
            ],
            "SubnetId": "subnet-1010e466"
        },
        {
            "ImageId": "ami-d722b0b7",
            "InstanceType": "m3.large",
            "SpotPrice": "0.133",
            "BlockDeviceMappings": [
            {
                "DeviceName": "/dev/sda1",
                "Ebs": {
                    "DeleteOnTermination": true,
                    "VolumeType": "gp2",
                    "VolumeSize": 8,
                    "SnapshotId": "snap-47743105"
                }
            }
            ],
            "SecurityGroups": [
            {
                "GroupId": "sg-06b84063"
            },
            {
                "GroupId": "sg-5058c016"
            }
            ],
            "SubnetId": "subnet-1042e466"
        }
        ],
    "Type": "maintain"
    }
}
Wildcards

The Spot Fleet configuration allows for the use of wildcards as part of the Group name, this allows you to associate multiple different groups to a single Spot Fleet Request.

For example, to use the same configuration for any group starting with “spot_”, you can set up a configuration like the one below:

{
        "spot_*":{
                "IamFleetRole": "arn:aws:iam::357432474442:role/aws-ec2-spot-fleet-tagging-role",
                "AllocationStrategy": "capacityOptimized",
                "TargetCapacity": 0,
                "SpotPrice": "0.105",
                "ValidFrom": "2016-12-13T16:48:12Z",
                "ValidUntil": "2017-12-13T16:48:12Z",
                "TerminateInstancesWithExpiration": true,
                "LaunchSpecifications": [
                {
                        "ImageId": "ami-b04s92d0",
                        "InstanceType": "c3.large",
                        "KeyName": "key_pair",
                        "SpotPrice": "0.105",
                        "BlockDeviceMappings": [
                        {
                                "DeviceName": "/dev/xvda",
                                "Ebs": {
                                        "DeleteOnTermination": true,
                                        "VolumeType": "gp2",
                                        "VolumeSize": 8,
                                        "SnapshotId": "snap-c87f35ec"
                                }
                        }
                        ],
                        "NetworkInterfaces": [
                        {
                                "DeviceIndex": 0,
                                "SubnetId": "subnet-3efcba4b",
                                "DeleteOnTermination": true,
                                "Groups": [
                                   "sg-2d623a54"
                                ],
                                "AssociatePublicIpAddress": true
                        }
                        ]
                }
                ],
                "Type": "maintain"
        }
}

When using wildcards in group names, consider the following caveats:

  • If a Deadline group matches two wildcard groups, an error will be thrown. No Spot Fleets will be started for that group.

  • If a Deadline group is explicitly configured in the SEP configuration, but also matches a wildcard group, the Spot Event Plugin will use the Spot Fleet Request configuration for the group that is configured explicitly.

Spot Fleet Request Group Pools

If you would like the Spot event plugin to add the Workers to Deadline’s Pools you can add a configuration to Spot Fleet Request Group Pools in the form:

{
    "group_name":["pool1","pool2"],
    "2nd_group_name":["pool3"]
}
Spot Fleet Event Plugin Configuration Dialog

With the release of Deadline 10.1.14, an option for configuring the Spot Fleet Event Plugin was added to Deadline. It can be accessed through the scripts menu, under Configuration.

../_images/sepui_01.png

This configuration dialog uses the existing configurations as a starting point. If the Spot Event Plugin was already configured on your system, the dialog will use your existing credentials and configurations. Upon launching the dialog, you will see a list of the all configurations you’ve already setup and will have the option to edit or create new configurations.

../_images/sepui_02.png

To edit, simply double click on a row or right click and select an “Open In” Option.

There are three modes of configuration, all of which will allow you to pick a Deadline Group and Deadline Pools as defined in your Deadline setup:

  1. Quick Create - The quick create dialog will display a subset of the options visible in the AWS Console. Select the desired options and the dialog will automatically handle the correct JSON configuration.

    ../_images/sepui_03.png

    When using the quick create dialog you can search for AMIs by the AMI name, or the AMI id.

    ../_images/sepui_06.png
  2. Advanced Create - Allows you to directly copy a configuration from AWS console without needing to manually edit in the group name. The advanced create dialog will also validate the configuration to give you instant feedback on whether or not there are issues with it.

    ../_images/sepui_04.png
  3. Create From Launch Template - Allows you to select an existing EC2 Launch Template from your account.

    Warning

    Note that you will need to add the following key value pair as a tag in the launch template for it to work properly with the Resource Tracker: ‘DeadlineTrackedAWSResource’:’SpotEventPlugin’. Not adding this tag will cause the Resource Tracker to terminate your instances as unhealthy if the Resource Tracker is running.

    ../_images/sepui_05.png

Additonal Information

Event Plugin Configuration Options

To access these settings, simply enter Super User mode and select Tools -> Configure Events form the Monitor’s menu. From there, select the Spot entry from the list on the left.

../_images/cep_spot.png

The Spot event plugin settings are:

Options

  • State: How this event plug-in should respond to events. If Global, all jobs and Workers will trigger the events for this plugin. If Disabled, no events are triggered for this plugin. Default: Disabled.

    Note

    To complete a clean shutdown of an already running Spot Event Plugin environment; disable the Spot Event Plugin via Deadline Monitor, ensure you shutdown all Pulse instances and then terminate any Spot Fleet Requests in the AWS EC2 Mgmt Console.

  • Enable Resource Tracker: (Only disable for AMIs with Deadline 10.0.26 or earlier). Use of the Deadline Resource Tracker requires that your custom AMIs have Deadline Client 10.0.27 or later installed on them. If enabled, the Deadline Resource Tracker will help optimize your resources by terminating instances and Spot Fleet requests that don’t appear to be behaving as expected. We recommend upgrading your AMIs and enabling the Deadline Resource Tracker. Default: True.

  • Use Local Credentials: Whether or not you wish to use your local AWS credentials (found in ~/.aws/credentials (Linux & Mac) or %USERPROFILE%\.aws\credentials (Windows)). If you are using local credentials, you may leave the Access Key ID and Secret Access Key fields blank. We recommend using local credentials.

  • AWS Named Profile: The AWS Named Profile that contains your Spot Credentials.
    • Note: The credential and config files (~/.aws/credentials and ~/.aws/config (Linux & Mac) or %USERPROFILE%\.aws\credentials and %USERPROFILE%\.aws\config (Windows)) must be on the machine that performs house cleaning (which is usually the machine running Pulse).

    • For more information on AWS Named Profiles and how to create them, visit: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html

  • Access Key ID: The AWS Access Key ID for your Spot Credentials.
  • Secret Access Key: The AWS Secret Access Key for your Spot Credentials. If using the Deadline Secrets Management feature, this parameter will be saved and retrieved based on the Event Plugin Secrets Access Level.

Configuration

  • Logging Level: Different logging levels. Select Verbose for detailed logging about the inner workings of the Spot Event Plugin. Select Debug for all Verbose logs plus additional information on AWS API calls that are used. Default: Standard.

  • Region: The AWS region in which to start the spot fleet requests. Default: eu-west-1.

  • Spot Fleet Request Group Pools: A mapping between your Groups and Pools. See here for an example on formatting multiple pools per group.

  • Spot Fleet Request Configurations: A mapping between your Groups and Spot Fleet Requests (SFRs). See here for an example. Spot Fleet Requests (SFRs) are JSON formatted and can be downloaded from the AWS console. Default: {}.

    Warning

    If you modify your JSON configuration after deployment, then ensure any active SFRs are terminated in the AWS console and Pulse is restarted. It is best to only modify the JSON configuration when you are not actively rendering on AWS.

  • Idle Shutdown: Number of minutes that a AWS Worker will wait in a non-rendering state before it is shutdown. Default: 10.

  • Delete SEP Terminated Workers: If enabled, Deadline Spot Event Plugin terminated AWS Workers will be deleted from the Workers Panel on the next House Cleaning cycle. Warning: The terminated Worker’s reports will also be deleted for each Worker, which may be undesired for future debugging a render job issue. Default: False.

  • Delete EC2 Spot Interrupted Workers: If enabled, EC2 Spot interrupted AWS Workers will be deleted from the Workers Panel on the next House Cleaning cycle. Warning: The terminated Worker’s reports will also be deleted for each Worker, which may be undesired for future debugging a render job issue. Default: False.

  • Strict Hard Cap: If enabled, any active instances greater than the target capacity for each group will be terminated. Workers may be terminated even while rendering. Default: False.

  • Maximum Instances Started Per Cycle: The Spot Plugin will request this maximum number of instances per House Cleaning cycle. Default: 50.

  • Pre Job Task Mode: How the Spot Event Plugin handles Pre Job Tasks. Conservative will only start 1 Spot instance for the pre job task and ignore any other tasks for that job until the pre job task is completed. Ignore will not take the pre job task into account when calculating target capacity. Normal will treat the pre job task like a regular job queued task. Default: Conservative.

  • AWS Instance Status: If enabled, the Worker Extra Info X column will be used to display AWS Instance Status if the instance has been marked to be stopped or terminated by EC2 or Spot Event Plugin. All timestamps are displayed in UTC format. Default: Disabled.

Configuring Deadline Connectivity

When configuring the Spot event plugin it is essential to determine how you are going to configure your spot Workers to connect to your render farm.

In order to configure your Deadline you have 2 main choices:

Configure Deadline at AMI Creation

When initially creating your AMI you are able to manually configure Deadline to be able to connect. This can be done either by modifying your deadline.ini or when you run the deadline installer.

Configure Deadline at Instance Launch

By using the Spot Fleet Requests user data you are able to use run shell scripts when the instances start. Using this scripting you are able to modify the deadline.ini script of your instances in order to have them connect.

An example userdata for connecting to an rcs:

source "/etc/profile.d/deadlineclient.sh"
DEADLINE_COMMAND="$DEADLINE_PATH/deadlinecommand"
"$DEADLINE_COMMAND" -SetIniFileSetting KeepWorkerRunning True
"$DEADLINE_COMMAND" -SetIniFileSetting LaunchSlaveAtStartup True
"$DEADLINE_COMMAND" -SetIniFileSetting ProxyUseSSL false
"$DEADLINE_COMMAND" -ChangeRepository Proxy my.render.farm:8080
service deadline10launcher restart

VPC Endpoints

If one or more of your EC2 instances are running inside a private subnet in your VPC, then you will need to provide a mechanism for those instances to be able to access the AWS web service endpoints used in the above IAM policies. A VPC endpoint enables you to privately connect your VPC to supported AWS services and VPC endpoint services powered by PrivateLink without requiring an internet gateway, NAT device, VPN connection, or AWS Direct Connect connection. Instances in your VPC do not require public IP addresses to communicate with resources in the service. Traffic between your VPC and the other service does not leave the Amazon network. AWS typically provides an endpoint per service/region.

To create a VPC endpoint for an AWS service, use the create an Interface or Gateway Endpoint procedure. Spot Event Plugin requires the following endpoints:

  • HouseCleaningStatement:

    com.amazonaws.<region>.cloudformation (interface)
    com.amazonaws.<region>.dynamodb (gateway)
    com.amazonaws.<region>.ec2 (interface)
    com.amazonaws.<region>.events (interface)
    com.amazonaws.<region>.s3 (gateway)
    com.amazonaws.<region>.sqs (interface)
    com.amazonaws.<region>.sts (interface)
    
  • WorkerStatement:

    com.amazonaws.<region>.ec2 (interface)
    com.amazonaws.<region>.sqs (interface)
    

where <region> represents the region identifier for an AWS region, such as eu-west-2 for the EU (London) Region.

Warning

The HouseCleaningStatement, which is run by the Remote Connection Server or Pulse, also depends on access to the following public facing AWS API endpoints:

  • iam.amazonaws.com, for which no VPC endpoint is available

  • sts.amazonaws.com

You can grant the required access by using a NAT gateway.

FAQ

Can the Spot Event Plugin be used in combination with the Deadline Balancer?

No. The Deadline Balancer and Spot Event plugin can technically be run at the same time but they do not complement each other. They will create Workers for the same tasks.

Does the AWS Portal work with this Spot Event Plugin?

No. Both components can technically be run at the same time but they do not complement each other.

Can the Spot Event Plugin be used in combination with the Amazon Cloud Plugin?

No. The Amazon Cloud Plugin starts EC2 On-Demand/Reserved instances whereas the Spot Event Plugin uses the heavily discounted EC2 Spot instances for compute.

Does the Spot Event Plugin take Deadline ‘Pools’ into account when calculating number of EC2 Spot Instances to request?

No. You should use Deadline Groups to configure which Deadline jobs are run on Spot instances in AWS EC2. However, you can configure an order based, comma-separated string of the Pool names you would like to be assigned to all the Deadline Workers which are started on EC2 Spot for the relevant Deadline Group that made the Spot request.

Can I use Limits to control the number of Spot instances provisioned by the Spot Event Plugin?

Yes. Deadline Resource and License Limits at the app plugin and job level are taken into account when calculating the number of Spot instances to be requested per Deadline Group configured in your Spot Fleet JSON configuration file.

Do I need Deadline licenses (floating or Usage-based) to render with Spot Event Plugin?

No! Deadline does not require any licenses for it to run while on AWS. You will still need licenses for your rendering software if they require one.