Skip to main content

The AWS Deadline Cloud worker agent can be used to run a worker in an AWS Deadline Cloud fleet

Project description

AWS Deadline Cloud Worker Agent

pypi python license

The AWS Deadline Cloud worker agent can be used to run a worker in an AWS Deadline Cloud fleet. This includes managing the life-cycle of a worker and its assigned work both in the service and on the worker's host.

Deadline Cloud schedules work as worker sessions which are an extension of Open Description (OpenJD) sessions specific to AWS Deadline Cloud. The worker agent initiates session actions, monitors them, and reports the status of running and completed session actions to the service including progress, logs, process exit code, and indicates if the work was canceled or interrupted.

The worker agent behavior follows the AWS Deadline Cloud worker API protocol that specifies the expectation of how the service and workers behave and collaborate through Deadline Cloud's worker APIs.

For guidance on setting up the worker agent for use in a customer-managed fleet, see the "Manage Deadline Cloud customer-managed fleets" topic in the AWS Deadline Cloud User Guide

Compatibility

The worker agent requires Python 3.9 or higher. There are additional platform-specific requirements listed below:

Linux:

  • Amazon Linux 2 and 2023 are recommended and tested
  • sudo must be installed

Windows:

  • Windows Server 2022 is recommended and tested
  • Requires CPython implementation of Python
  • Python must be installed for all users (e.g. in C:\Program Files)

MacOS is intended to be used for testing only and is subject to change.

Versioning

This package's version follows Semantic Versioning 2.0, but is still considered to be in its initial development, thus backwards incompatible versions are denoted by minor version bumps. To help illustrate how versions will increment during this initial development stage, they are described below:

  1. The MAJOR version is currently 0, indicating initial development
  2. The MINOR version is currently incremented when backwards incompatible changes are introduced to the public API.
  3. The PATCH version is currently incremented when bug fixes or backwards compatible changes are introduced to the public API.

Installing program files

Linux

We recommend installing the agent in a Python virtual environment (e.g. using venv). For this, run:

# Create venv
python -m venv /opt/deadline/worker

# Activate the virtual environment - you can later type "deactivate" to exit the environment
source /opt/deadline/worker/bin/activate

# Install worker agent program files into the virtual environment
pip install deadline-cloud-worker-agent

Windows

The worker agent runs as a Windows Service which leads to a few installation constraints:

  • Python virtual environments are not supported
  • Python must be installed for all users

To obtain the program files, run this command in an administrator command-prompt:

pip install deadline-cloud-worker-agent

Setup worker host

The worker host can be prepared to be run using the provided install-deadline-worker command. This command performs certain functions to setup the worker host based on arguments provided. The command performs all worker host setup activities, such as:

  • creates an operating system user account (specified by the --user argument) on the worker host that the worker will run as. install-deadline-worker accepts a previously created user. The user defaults to deadline-worker-agent on Linux and deadline-worker on Windows.
  • creates a job user group (specified by --group, defaults to deadline-job-users) if required. The install-deadline-worker accepts an existing group.
  • creates cache, log, and config directories, and an example config file
  • [optionally] initializes the config file
  • modifies the config file using provided arguments
  • [optionally] install/update an operating system service
    • [optionally] start the operating system service

NOTE: The install-deadline-worker command does not support MacOS at this time.


To see the available command-line arguments, run:

On Linux:

Assuming you have installed the worker agent to a Python venv in /opt/deadline/worker, run:

/opt/deadline/worker/bin/install-deadline-worker --help

On Windows:

Run the following command in an administrator command-prompt:

install-deadline-worker --help

Configuration

See configuration

State

See state

Running

Setting up the worker host using the install-deadline-worker command (see "Setup worker host" above) installs an operating system service. On Linux, this is a systemd service and on Windows this is a Windows service.

The following commands demonstrate how to manually control the operating system service.

On Linux:

# Start the worker agent
systemctl start deadline-worker

# Stop the worker agent
systemctl stop deadline-worker

# Configure the worker agent to start on boot
systemctl enable deadline-worker

# Configure the worker agent to NOT start on boot
systemctl disable deadline-worker

On Windows:

Using an admin command-prompt:

REM start the service
sc.exe start DeadlineWorker

REM stop the service
sc.exe stop DeadlineWorker

Logging

See logging

Contributing

See CONTRIBUTING.md for information on reporting issues, requesting features, and developer information.

Security

See security issue notifications for more information.

Telemetry

See telemetry

License

This project is licensed under the Apache-2.0 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deadline_cloud_worker_agent-0.27.2.tar.gz (153.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file deadline_cloud_worker_agent-0.27.2.tar.gz.

File metadata

File hashes

Hashes for deadline_cloud_worker_agent-0.27.2.tar.gz
Algorithm Hash digest
SHA256 be672461a2a29ff82d46d11b0cb16eeeba96e94c379546d682a15cbf7e1f54e3
MD5 8262887c385f5f09f9c30f4cfdb1f7be
BLAKE2b-256 5c75301fc55d4f1b521ba786378f1bce4e8cefb0432bbe64030079fa10bfa9b2

See more details on using hashes here.

File details

Details for the file deadline_cloud_worker_agent-0.27.2-py3-none-any.whl.

File metadata

File hashes

Hashes for deadline_cloud_worker_agent-0.27.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ae4f74f39d1917f30c4243af17972979ff1da317cabb51f54a3db25b68a0d693
MD5 66066ca266ec5f668df347aa82a92173
BLAKE2b-256 86f4652dc953c7030c6136291b695ff654e26d7057f8acd41c4d1408d18caf77

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page