deadline-cloud-worker-agent


Namedeadline-cloud-worker-agent JSON
Version 0.27.4 PyPI version JSON
download
home_pageNone
SummaryThe AWS Deadline Cloud worker agent can be used to run a worker in an AWS Deadline Cloud fleet
upload_time2024-10-30 22:25:18
maintainerNone
docs_urlNone
authorAmazon Web Services
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AWS Deadline Cloud Worker Agent

[![pypi](https://img.shields.io/pypi/v/deadline-cloud-worker-agent.svg)](https://pypi.python.org/pypi/deadline-cloud-worker-agent)
[![python](https://img.shields.io/pypi/pyversions/deadline-cloud-worker-agent.svg?style=flat)](https://pypi.python.org/pypi/deadline-cloud-worker-agent)
[![license](https://img.shields.io/pypi/l/deadline-cloud-worker-agent.svg?style=flat)](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/mainline/LICENSE)

The AWS Deadline Cloud worker agent can be used to run a worker in an
[AWS Deadline Cloud][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)][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][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"][manage-cmf-docs] topic in the AWS Deadline Cloud
User Guide 

[deadline-cloud]: https://docs.aws.amazon.com/deadline-cloud/latest/userguide/what-is-deadline-cloud.html
[manage-cmf-docs]: https://docs.aws.amazon.com/deadline-cloud/latest/userguide/manage-cmf.html
[openjd]: https://github.com/OpenJobDescription/openjd-specifications/wiki
[protocol]: https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/worker_api_protocol.md

## 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](https://semver.org/), 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`][venv]). For
this, run:

```sh
# 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
```

[venv]: https://docs.python.org/3/library/venv.html

### 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:

```sh
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:

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

**On Windows:**

Run the following command in an administrator command-prompt:

```bat
install-deadline-worker --help
``` 

## Configuration

[See configuration](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/configuration.md)

## State

[See state](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/state.md)

## 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:**

```sh
# 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:

```bat
REM start the service
sc.exe start DeadlineWorker

REM stop the service
sc.exe stop DeadlineWorker
```

### Running Outside of an Operating System Service

---
**NOTE:**
It is highly recommended to run the worker agent through an OS service in production environments. The OS service automatically handles:
- Restarting the worker agent process if the agent process crashes.
- Starting the worker agent when the host machine starts up.
- Attempting graceful shutdown when the host machine is shutting down.
----
The worker agent can also be started outside of a service context if required. Run `deadline-worker-agent --help` to see a list of supported command line arguments.

 **NOTE:** You must have an [AWS region](https://docs.aws.amazon.com/sdkref/latest/guide/feature-region.html) specified in order to run the worker agent from the command line. This can be configured through:
  - The `AWS_DEFAULT_REGION` [environment variable](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html#envvars-list).
  - The [AWS Configuration File](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where)
    - Configured [manually](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-format), or through the [command line](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-methods).


## Logging

[See logging](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/logging.md)

## Contributing

See [`CONTRIBUTING.md`](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/mainline/CONTRIBUTING.md)
for information on reporting issues, requesting features, and developer information.

## Security

See [security issue notifications](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/CONTRIBUTING.md#security-issue-notifications) for more information.

## Telemetry

[See telemetry](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/telemetry.md)

## License

This project is licensed under the Apache-2.0 License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "deadline-cloud-worker-agent",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Amazon Web Services",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/d1/71/fd454d2f423bf20fb486cf02f46473fdad538e0a390a5dc3b05c43d3135a/deadline_cloud_worker_agent-0.27.4.tar.gz",
    "platform": null,
    "description": "# AWS Deadline Cloud Worker Agent\n\n[![pypi](https://img.shields.io/pypi/v/deadline-cloud-worker-agent.svg)](https://pypi.python.org/pypi/deadline-cloud-worker-agent)\n[![python](https://img.shields.io/pypi/pyversions/deadline-cloud-worker-agent.svg?style=flat)](https://pypi.python.org/pypi/deadline-cloud-worker-agent)\n[![license](https://img.shields.io/pypi/l/deadline-cloud-worker-agent.svg?style=flat)](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/mainline/LICENSE)\n\nThe AWS Deadline Cloud worker agent can be used to run a worker in an\n[AWS Deadline Cloud][deadline-cloud] fleet. This includes managing the life-cycle of a worker and\nits assigned work both in the service and on the worker's host.\n\nDeadline Cloud schedules work as worker sessions which are an extension of\n[Open Description (OpenJD)][openjd] sessions specific to AWS Deadline Cloud. The worker agent\ninitiates session actions, monitors them, and reports the status of running and completed session\nactions to the service including progress, logs, process exit code, and indicates if the work was\ncanceled or interrupted.\n\nThe worker agent behavior follows the AWS Deadline Cloud [worker API protocol][protocol] that\nspecifies the expectation of how the service and workers behave and collaborate through Deadline\nCloud's worker APIs.\n\nFor guidance on setting up the worker agent for use in a customer-managed fleet, see the\n[\"Manage Deadline Cloud customer-managed fleets\"][manage-cmf-docs] topic in the AWS Deadline Cloud\nUser Guide \n\n[deadline-cloud]: https://docs.aws.amazon.com/deadline-cloud/latest/userguide/what-is-deadline-cloud.html\n[manage-cmf-docs]: https://docs.aws.amazon.com/deadline-cloud/latest/userguide/manage-cmf.html\n[openjd]: https://github.com/OpenJobDescription/openjd-specifications/wiki\n[protocol]: https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/worker_api_protocol.md\n\n## Compatibility\n\nThe worker agent requires Python 3.9 or higher. There are additional platform-specific requirements\nlisted below:\n\n**Linux:**\n\n*   Amazon Linux 2 and 2023 are recommended and tested\n*   `sudo` must be installed\n\n**Windows:**\n\n*   Windows Server 2022 is recommended and tested\n*   Requires CPython implementation of Python\n*   **Python must be installed for all users** (e.g. in `C:\\Program Files`)\n\n**MacOS is intended to be used for testing only and is subject to change.**\n\n## Versioning\n\nThis package's version follows [Semantic Versioning 2.0](https://semver.org/), but is still\nconsidered to be in its initial development, thus backwards incompatible versions are denoted by\nminor version bumps. To help illustrate how versions will increment during this initial development\nstage, they are described below:\n\n1. The MAJOR version is currently 0, indicating initial development\n2. The MINOR version is currently incremented when backwards incompatible changes are introduced to the public API.\n3. The PATCH version is currently incremented when bug fixes or backwards compatible changes are introduced to the public API.\n\n## Installing program files\n\n### Linux\n\nWe recommend installing the agent in a Python virtual environment (e.g. using [`venv`][venv]). For\nthis, run:\n\n```sh\n# Create venv\npython -m venv /opt/deadline/worker\n\n# Activate the virtual environment - you can later type \"deactivate\" to exit the environment\nsource /opt/deadline/worker/bin/activate\n\n# Install worker agent program files into the virtual environment\npip install deadline-cloud-worker-agent\n```\n\n[venv]: https://docs.python.org/3/library/venv.html\n\n### Windows\n\nThe worker agent runs as a Windows Service which leads to a few installation constraints:\n\n*   Python virtual environments are not supported\n*   Python must be installed for all users\n\nTo obtain the program files, run this command in an administrator command-prompt:\n\n```sh\npip install deadline-cloud-worker-agent\n```\n\n\n## Setup worker host\n\nThe worker host can be prepared to be run using the provided `install-deadline-worker` command. This\ncommand performs certain functions to setup the worker host based on arguments provided. The\ncommand performs all worker host setup activities, such as:\n\n*   creates an operating system user account (specified by the `--user` argument) on the worker\n    host that the worker will run as. `install-deadline-worker` accepts a previously created user.\n    The user defaults to `deadline-worker-agent` on Linux and `deadline-worker` on Windows.\n*   creates a job user group (specified by `--group`, defaults to `deadline-job-users`) if required. The\n    `install-deadline-worker` accepts an existing group.\n*   creates cache, log, and config directories, and an example config file\n*   [optionally] initializes the config file\n*   modifies the config file using provided arguments\n*   [optionally] install/update an operating system service\n    *   [optionally] start the operating system service\n\n---\n\n**NOTE:** The `install-deadline-worker` command does not support MacOS at this time.\n\n---\n\nTo see the available command-line arguments, run:\n\n**On Linux:**\n\nAssuming you have installed the worker agent to a Python venv in `/opt/deadline/worker`, run:\n\n```sh\n/opt/deadline/worker/bin/install-deadline-worker --help\n```\n\n**On Windows:**\n\nRun the following command in an administrator command-prompt:\n\n```bat\ninstall-deadline-worker --help\n``` \n\n## Configuration\n\n[See configuration](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/configuration.md)\n\n## State\n\n[See state](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/state.md)\n\n## Running\n\nSetting up the worker host using the `install-deadline-worker` command (see \"Setup worker host\"\nabove) installs an operating system service. On Linux, this is a systemd service and on Windows this\nis a Windows service.\n\nThe following commands demonstrate how to manually control the operating system service.\n\n**On Linux:**\n\n```sh\n# Start the worker agent\nsystemctl start deadline-worker\n\n# Stop the worker agent\nsystemctl stop deadline-worker\n\n# Configure the worker agent to start on boot\nsystemctl enable deadline-worker\n\n# Configure the worker agent to NOT start on boot\nsystemctl disable deadline-worker\n```\n\n**On Windows:**\n\nUsing an admin command-prompt:\n\n```bat\nREM start the service\nsc.exe start DeadlineWorker\n\nREM stop the service\nsc.exe stop DeadlineWorker\n```\n\n### Running Outside of an Operating System Service\n\n---\n**NOTE:**\nIt is highly recommended to run the worker agent through an OS service in production environments. The OS service automatically handles:\n- Restarting the worker agent process if the agent process crashes.\n- Starting the worker agent when the host machine starts up.\n- Attempting graceful shutdown when the host machine is shutting down.\n----\nThe worker agent can also be started outside of a service context if required. Run `deadline-worker-agent --help` to see a list of supported command line arguments.\n\n **NOTE:** You must have an [AWS region](https://docs.aws.amazon.com/sdkref/latest/guide/feature-region.html) specified in order to run the worker agent from the command line. This can be configured through:\n  - The `AWS_DEFAULT_REGION` [environment variable](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html#envvars-list).\n  - The [AWS Configuration File](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where)\n    - Configured [manually](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-format), or through the [command line](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-methods).\n\n\n## Logging\n\n[See logging](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/logging.md)\n\n## Contributing\n\nSee [`CONTRIBUTING.md`](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/mainline/CONTRIBUTING.md)\nfor information on reporting issues, requesting features, and developer information.\n\n## Security\n\nSee [security issue notifications](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/CONTRIBUTING.md#security-issue-notifications) for more information.\n\n## Telemetry\n\n[See telemetry](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/telemetry.md)\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The AWS Deadline Cloud worker agent can be used to run a worker in an AWS Deadline Cloud fleet",
    "version": "0.27.4",
    "project_urls": {
        "Homepage": "https://github.com/aws-deadline/deadline-cloud-worker-agent",
        "Source": "https://github.com/aws-deadline/deadline-cloud-worker-agent"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90e1f3d0bc329ba2f8ed710af28bfbf74d8021e0b2b8cda500730ccc55a73ece",
                "md5": "f1e90e4b250bb3262b5f0ee6356c7362",
                "sha256": "0a17ac02315aa52281eb222cf4448032459d818d45b08e14d5666b634045e135"
            },
            "downloads": -1,
            "filename": "deadline_cloud_worker_agent-0.27.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f1e90e4b250bb3262b5f0ee6356c7362",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 191158,
            "upload_time": "2024-10-30T22:25:16",
            "upload_time_iso_8601": "2024-10-30T22:25:16.583521Z",
            "url": "https://files.pythonhosted.org/packages/90/e1/f3d0bc329ba2f8ed710af28bfbf74d8021e0b2b8cda500730ccc55a73ece/deadline_cloud_worker_agent-0.27.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d171fd454d2f423bf20fb486cf02f46473fdad538e0a390a5dc3b05c43d3135a",
                "md5": "0a02bc197657b6d09404a8926e0cd87a",
                "sha256": "ccfd474d1d94a14ec60aef626b6d8acf86585022cfa73fa49faa073bc2c72cce"
            },
            "downloads": -1,
            "filename": "deadline_cloud_worker_agent-0.27.4.tar.gz",
            "has_sig": false,
            "md5_digest": "0a02bc197657b6d09404a8926e0cd87a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 154964,
            "upload_time": "2024-10-30T22:25:18",
            "upload_time_iso_8601": "2024-10-30T22:25:18.829275Z",
            "url": "https://files.pythonhosted.org/packages/d1/71/fd454d2f423bf20fb486cf02f46473fdad538e0a390a5dc3b05c43d3135a/deadline_cloud_worker_agent-0.27.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-30 22:25:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aws-deadline",
    "github_project": "deadline-cloud-worker-agent",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "deadline-cloud-worker-agent"
}
        
Elapsed time: 0.40461s