Skip to content

Instantly share code, notes, and snippets.

@maxschramp
Last active July 12, 2024 21:52
Show Gist options
  • Save maxschramp/19dfb880fffe9b3f089520ca83c17537 to your computer and use it in GitHub Desktop.
Save maxschramp/19dfb880fffe9b3f089520ca83c17537 to your computer and use it in GitHub Desktop.
How to Setup a Windows 3dsMax Image for Deadline Cloud

Creating a Windows 3dsMax Image for Deadline Cloud

I had a few problems setting up an image for use with a Customer Managed Fleet in Deadline Cloud and wanted to document the workflow I used for my own reference and others.

Be warned that this doesn't follow the best practices when it comes to security but let me know any changes to make it better.

These steps assume you've followed the rest of the steps in the User Guide, up to Fleets > Customer-managed fleets > Worker host setup

You will need the following details from your Deadline Cloud Farm: FARM_ID:farm-aabbccddeeff11223344556677889900 FLEET_ID:fleet-aabbccddeeff11223344556677889900 REGION:us-east-2

Windows Setup

  1. Start with a fresh Windows/Windows Server install with at least 64gb of storage. (if using EC2 I like the c7a.2xlarge instance)
  2. Log in with the Administrator account (if there isn't one, just create a local user called deadline-worker)
  3. ⊞ Win + R and run lusrmgr.msc (Local Users and Groups)
  4. Create two users, deadline-job and deadline-worker and add the passwords to your password manager.
  5. Create a group called deadline-job-users and add the two users to both it and Administrators groups
  6. Download the latest version of Python from python.org
  7. Install it, make sure to check Use admin privileges when installing py.exe and Customize installation
  8. Ensure that it is installed for all users, but don't add it to PATH or environment variables.

Deadline Worker Agent Setup

  1. Log into the machine as the deadline-worker user
  2. ⊞ Win + R and run sysdm.cpl
  3. Open tab Advanced and click Environment Variables
  4. Add the following entries to Path in User variables for deadline-worker C:\Program Files\Python312 C:\Program Files\Python312\Scripts
  5. Open an administrative command prompt and type where python to confirm it is on the PATH.
  6. In the same command prompt, run python -m pip install deadline-cloud-worker-agent
  7. Run install-deadline-worker --farm-id FARM_ID --fleet-id FLEET_ID --region REGION --user deadline-worker --password DEADLINE-WORKER_PASSWORD --group deadline-job-users --grant-required-access
  8. Confirm the install by pressing y and Enter
  9. Close the command prompt, and return to the Environment Variables.
  10. Set the following as System variables: AWS_ACCESS_KEY_ID:VALUE AWS_SECRET_ACCESS_KEY:VALUE AWS_DEFAULT_REGION:REGION DEADLINE_WORKER_FARM_ID:FARM_ID DEADLINE_WORKER_FLEET_ID:FLEET_ID DEADLINE_WORKER_RUN_JOBS_AS_AGENT_USER:false
  11. Append C:\Program Files\Autodesk\3ds Max 2024 to the System Path Variable.
  12. Open command prompt and run deadline-worker-agent
  13. Confirm the worker shows up as Idle in your fleet in AWS Deadline Cloud monitor.
  14. Close the command prompt.
  15. ⊞ Win + R and run services.msc and Right Click > Start AWS Deadline Cloud Worker service.
  16. Once it shows up as Idle in your fleet monitor Right Click > Stop the service to cleanly turn it off. (If you don't do this you get Zombie workers that say "Not Responding" in the fleet monitor, it would be cool if there was a way to purge these)

Queue setup

  1. In AWS Console access AWS Deadline Cloud > Farms > Farm > Queues > Queue > Edit queue
  2. Change Run as user to Queue-configured user
  3. Change Run as user configuration to Add Windows credentials
  4. Set User name to deadline-job
  5. Setup the password following these instructions

Deadline Job User Setup

  1. Log into the machine as the deadline-job user
  2. Install Autodesk 3dsMax 2024
  3. If you are using Windows Server you may have to open Server Manager > Local Server > Properties and disable IE Enhanced Security Configuration to see the activation screen on first run.
  4. Open an administrative command prompt and cd "C:\Program Files\Autodesk\3ds Max 2024\Python"
  5. Run .\python.exe -m ensurepip --upgrade --user to install pip to the 3dsMax Python distribution
  6. Run .\python.exe -m pip install --user deadline-cloud-for-3ds-max
  7. Open services and run the Worker Agent Service, then submit a job to render.

Cleanup and Image Preparation

  1. Open an administrative command prompt
  2. Run sc.exe stop DeadlineWorker
  3. Run sc.exe config DeadlineWorker start= delayed-auto
  4. Run del /Q /S %PROGRAMDATA%\Amazon\Deadline\Cache\*
  5. Run del /Q /S %PROGRAMDATA%\Amazon\Deadline\Logs\*
  6. Run del /Q /S del /Q /S %PROGRAMDATA%\Amazon\OpenJD\*
  7. Run setx /m DEADLINE_WORKER_NO_SHUTDOWN false
  8. Open Amazon EC2Launch Settings and Shutdown without Sysprep
  9. Follow these steps to create an image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment