deadline-cloud-worker-agent 0.26.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. deadline_cloud_worker_agent-0.26.0/.gitignore +20 -0
  2. deadline_cloud_worker_agent-0.26.0/LICENSE +175 -0
  3. deadline_cloud_worker_agent-0.26.0/NOTICE +1 -0
  4. deadline_cloud_worker_agent-0.26.0/PKG-INFO +231 -0
  5. deadline_cloud_worker_agent-0.26.0/README.md +197 -0
  6. deadline_cloud_worker_agent-0.26.0/_version.py +16 -0
  7. deadline_cloud_worker_agent-0.26.0/hatch.toml +54 -0
  8. deadline_cloud_worker_agent-0.26.0/hatch_version_hook.py +156 -0
  9. deadline_cloud_worker_agent-0.26.0/pyproject.toml +256 -0
  10. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/__init__.py +11 -0
  11. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/__main__.py +19 -0
  12. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/_version.py +16 -0
  13. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/api_models.py +440 -0
  14. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/aws/__init__.py +1 -0
  15. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/aws/deadline/__init__.py +851 -0
  16. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/aws_credentials/__init__.py +8 -0
  17. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/aws_credentials/aws_configs.py +194 -0
  18. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/aws_credentials/boto3_sessions.py +169 -0
  19. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/aws_credentials/credentials_refresher.py +191 -0
  20. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/aws_credentials/queue_boto3_session.py +583 -0
  21. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/aws_credentials/temporary_credentials.py +247 -0
  22. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/aws_credentials/worker_boto3_session.py +132 -0
  23. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/boto/__init__.py +20 -0
  24. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/boto/config.py +25 -0
  25. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/boto/logger.py +5 -0
  26. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/boto/retries.py +50 -0
  27. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/boto/shim.py +467 -0
  28. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/errors.py +21 -0
  29. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/file_system_operations.py +161 -0
  30. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/installer/__init__.py +273 -0
  31. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/installer/install.sh +492 -0
  32. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/installer/win_installer.py +956 -0
  33. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/installer/worker.toml.example +305 -0
  34. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/log_messages.py +591 -0
  35. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/log_sync/__init__.py +3 -0
  36. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/log_sync/cloudwatch.py +684 -0
  37. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/log_sync/loggers.py +7 -0
  38. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/metrics.py +115 -0
  39. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/progress.py +34 -0
  40. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/scheduler/__init__.py +11 -0
  41. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/scheduler/log.py +8 -0
  42. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/scheduler/scheduler.py +1425 -0
  43. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/scheduler/session_action_status.py +21 -0
  44. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/scheduler/session_cleanup.py +179 -0
  45. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/scheduler/session_queue.py +480 -0
  46. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/session_events.py +548 -0
  47. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/__init__.py +9 -0
  48. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/actions/__init__.py +17 -0
  49. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/actions/action_definition.py +82 -0
  50. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/actions/enter_env.py +112 -0
  51. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/actions/exit_env.py +62 -0
  52. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/actions/openjd_action.py +33 -0
  53. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/actions/run_step_task.py +80 -0
  54. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/actions/sync_input_job_attachments.py +172 -0
  55. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/active_action.py +1 -0
  56. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/errors.py +62 -0
  57. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/job_entities/__init__.py +17 -0
  58. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/job_entities/environment_details.py +93 -0
  59. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/job_entities/job_attachment_details.py +161 -0
  60. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/job_entities/job_details.py +432 -0
  61. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/job_entities/job_entities.py +403 -0
  62. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/job_entities/job_entity_type.py +11 -0
  63. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/job_entities/step_details.py +118 -0
  64. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/job_entities/validation.py +47 -0
  65. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/log_config.py +302 -0
  66. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/sessions/session.py +1338 -0
  67. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/startup/__init__.py +3 -0
  68. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/startup/bootstrap.py +586 -0
  69. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/startup/capabilities.py +245 -0
  70. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/startup/cli_args.py +147 -0
  71. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/startup/config.py +265 -0
  72. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/startup/config_file.py +150 -0
  73. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/startup/entrypoint.py +422 -0
  74. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/startup/host_properties.py +80 -0
  75. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/startup/settings.py +189 -0
  76. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/utils.py +56 -0
  77. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/windows/__init__.py +1 -0
  78. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/windows/win_credentials_resolver.py +280 -0
  79. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/windows/win_service.py +84 -0
  80. deadline_cloud_worker_agent-0.26.0/src/deadline_worker_agent/worker.py +470 -0
@@ -0,0 +1,20 @@
1
+ /.coverage
2
+ /.coverage.*
3
+ /.cache
4
+ /.pytest_cache
5
+ /.mypy_cache
6
+ /.venv
7
+ /.ruff_cache
8
+
9
+ /doc/_apidoc/
10
+ /build
11
+ /dist
12
+
13
+ __pycache__/
14
+
15
+ .DS_Store
16
+ /.attach_pid*
17
+ .vscode/
18
+ *_version.py
19
+ tmp.*
20
+ .deployed_resources.sh
@@ -0,0 +1,175 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
@@ -0,0 +1 @@
1
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -0,0 +1,231 @@
1
+ Metadata-Version: 2.3
2
+ Name: deadline-cloud-worker-agent
3
+ Version: 0.26.0
4
+ Summary: The AWS Deadline Cloud worker agent can be used to run a worker in an AWS Deadline Cloud fleet
5
+ Project-URL: Homepage, https://github.com/aws-deadline/deadline-cloud-worker-agent
6
+ Project-URL: Source, https://github.com/aws-deadline/deadline-cloud-worker-agent
7
+ Author: Amazon Web Services
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ License-File: NOTICE
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: End Users/Desktop
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Operating System :: Microsoft :: Windows
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Requires-Python: >=3.9
23
+ Requires-Dist: boto3>=1.34.75
24
+ Requires-Dist: deadline==0.47.*
25
+ Requires-Dist: openjd-sessions==0.7.*
26
+ Requires-Dist: psutil~=5.9
27
+ Requires-Dist: pydantic~=1.10.0
28
+ Requires-Dist: pywin32==306; platform_system == 'Windows'
29
+ Requires-Dist: requests==2.31.*
30
+ Requires-Dist: requests~=2.31
31
+ Requires-Dist: tomli==2.0.*; python_version < '3.11'
32
+ Requires-Dist: typing-extensions~=4.8
33
+ Description-Content-Type: text/markdown
34
+
35
+ # AWS Deadline Cloud Worker Agent
36
+
37
+ [![pypi](https://img.shields.io/pypi/v/deadline-cloud-worker-agent.svg)](https://pypi.python.org/pypi/deadline-cloud-worker-agent)
38
+ [![python](https://img.shields.io/pypi/pyversions/deadline-cloud-worker-agent.svg?style=flat)](https://pypi.python.org/pypi/deadline-cloud-worker-agent)
39
+ [![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)
40
+
41
+ The AWS Deadline Cloud worker agent can be used to run a worker in an
42
+ [AWS Deadline Cloud][deadline-cloud] fleet. This includes managing the life-cycle of a worker and
43
+ its assigned work both in the service and on the worker's host.
44
+
45
+ Deadline Cloud schedules work as worker sessions which are an extension of
46
+ [Open Description (OpenJD)][openjd] sessions specific to AWS Deadline Cloud. The worker agent
47
+ initiates session actions, monitors them, and reports the status of running and completed session
48
+ actions to the service including progress, logs, process exit code, and indicates if the work was
49
+ canceled or interrupted.
50
+
51
+ The worker agent behavior follows the AWS Deadline Cloud [worker API protocol][protocol] that
52
+ specifies the expectation of how the service and workers behave and collaborate through Deadline
53
+ Cloud's worker APIs.
54
+
55
+ For guidance on setting up the worker agent for use in a customer-managed fleet, see the
56
+ ["Manage Deadline Cloud customer-managed fleets"][manage-cmf-docs] topic in the AWS Deadline Cloud
57
+ User Guide
58
+
59
+ [deadline-cloud]: https://docs.aws.amazon.com/deadline-cloud/latest/userguide/what-is-deadline-cloud.html
60
+ [manage-cmf-docs]: https://docs.aws.amazon.com/deadline-cloud/latest/userguide/manage-cmf.html
61
+ [openjd]: https://github.com/OpenJobDescription/openjd-specifications/wiki
62
+ [protocol]: https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/worker_api_protocol.md
63
+
64
+ ## Compatibility
65
+
66
+ The worker agent requires Python 3.9 or higher. There are additional platform-specific requirements
67
+ listed below:
68
+
69
+ **Linux:**
70
+
71
+ * Amazon Linux 2 and 2023 are recommended and tested
72
+ * `sudo` must be installed
73
+
74
+ **Windows:**
75
+
76
+ * Windows Server 2022 is recommended and tested
77
+ * Requires CPython implementation of Python
78
+ * **Python must be installed for all users** (e.g. in `C:\Program Files`)
79
+
80
+ **MacOS is intended to be used for testing only and is subject to change.**
81
+
82
+ ## Versioning
83
+
84
+ This package's version follows [Semantic Versioning 2.0](https://semver.org/), but is still
85
+ considered to be in its initial development, thus backwards incompatible versions are denoted by
86
+ minor version bumps. To help illustrate how versions will increment during this initial development
87
+ stage, they are described below:
88
+
89
+ 1. The MAJOR version is currently 0, indicating initial development
90
+ 2. The MINOR version is currently incremented when backwards incompatible changes are introduced to the public API.
91
+ 3. The PATCH version is currently incremented when bug fixes or backwards compatible changes are introduced to the public API.
92
+
93
+ ## Installing program files
94
+
95
+ ### Linux
96
+
97
+ We recommend installing the agent in a Python virtual environment (e.g. using [`venv`][venv]). For
98
+ this, run:
99
+
100
+ ```sh
101
+ # Create venv
102
+ python -m venv /opt/deadline/worker
103
+
104
+ # Activate the virtual environment - you can later type "deactivate" to exit the environment
105
+ source /opt/deadline/worker/bin/activate
106
+
107
+ # Install worker agent program files into the virtual environment
108
+ pip install deadline-cloud-worker-agent
109
+ ```
110
+
111
+ [venv]: https://docs.python.org/3/library/venv.html
112
+
113
+ ### Windows
114
+
115
+ The worker agent runs as a Windows Service which leads to a few installation constraints:
116
+
117
+ * Python virtual environments are not supported
118
+ * Python must be installed for all users
119
+
120
+ To obtain the program files, run this command in an administrator command-prompt:
121
+
122
+ ```sh
123
+ pip install deadline-cloud-worker-agent
124
+ ```
125
+
126
+
127
+ ## Setup worker host
128
+
129
+ The worker host can be prepared to be run using the provided `install-deadline-worker` command. This
130
+ command performs certain functions to setup the worker host based on arguments provided. The
131
+ command performs all worker host setup activities, such as:
132
+
133
+ * creates an operating system user account (specified by the `--user` argument) on the worker
134
+ host that the worker will run as. `install-deadline-worker` accepts a previously created user.
135
+ The user defaults to `deadline-worker-agent` on Linux and `deadline-worker` on Windows.
136
+ * creates a job user group (specified by `--group`, defaults to `deadline-job-users`) if required. The
137
+ `install-deadline-worker` accepts an existing group.
138
+ * creates cache, log, and config directories, and an example config file
139
+ * [optionally] initializes the config file
140
+ * modifies the config file using provided arguments
141
+ * [optionally] install/update an operating system service
142
+ * [optionally] start the operating system service
143
+
144
+ ---
145
+
146
+ **NOTE:** The `install-deadline-worker` command does not support MacOS at this time.
147
+
148
+ ---
149
+
150
+ To see the available command-line arguments, run:
151
+
152
+ **On Linux:**
153
+
154
+ Assuming you have installed the worker agent to a Python venv in `/opt/deadline/worker`, run:
155
+
156
+ ```sh
157
+ /opt/deadline/worker/bin/install-deadline-worker --help
158
+ ```
159
+
160
+ **On Windows:**
161
+
162
+ Run the following command in an administrator command-prompt:
163
+
164
+ ```bat
165
+ install-deadline-worker --help
166
+ ```
167
+
168
+ ## Configuration
169
+
170
+ [See configuration](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/configuration.md)
171
+
172
+ ## State
173
+
174
+ [See state](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/state.md)
175
+
176
+ ## Running
177
+
178
+ Setting up the worker host using the `install-deadline-worker` command (see "Setup worker host"
179
+ above) installs an operating system service. On Linux, this is a systemd service and on Windows this
180
+ is a Windows service.
181
+
182
+ The following commands demonstrate how to manually control the operating system service.
183
+
184
+ **On Linux:**
185
+
186
+ ```sh
187
+ # Start the worker agent
188
+ systemctl start dealine-worker
189
+
190
+ # Stop the worker agent
191
+ systemctl stop dealine-worker
192
+
193
+ # Configure the worker agent to start on boot
194
+ systemctl enable dealine-worker
195
+
196
+ # Configure the worker agent to NOT start on boot
197
+ systemctl disable dealine-worker
198
+ ```
199
+
200
+ **On Windows:**
201
+
202
+ Using an admin command-prompt:
203
+
204
+ ```bat
205
+ REM start the service
206
+ sc.exe start DeadlineWorker
207
+
208
+ REM stop the service
209
+ sc.exe stop DeadlineWorker
210
+ ```
211
+
212
+ ## Logging
213
+
214
+ [See logging](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/logging.md)
215
+
216
+ ## Contributing
217
+
218
+ See [`CONTRIBUTING.md`](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/mainline/CONTRIBUTING.md)
219
+ for information on reporting issues, requesting features, and developer information.
220
+
221
+ ## Security
222
+
223
+ See [security issue notifications](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/CONTRIBUTING.md#security-issue-notifications) for more information.
224
+
225
+ ## Telemetry
226
+
227
+ [See telemetry](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/telemetry.md)
228
+
229
+ ## License
230
+
231
+ This project is licensed under the Apache-2.0 License.
@@ -0,0 +1,197 @@
1
+ # AWS Deadline Cloud Worker Agent
2
+
3
+ [![pypi](https://img.shields.io/pypi/v/deadline-cloud-worker-agent.svg)](https://pypi.python.org/pypi/deadline-cloud-worker-agent)
4
+ [![python](https://img.shields.io/pypi/pyversions/deadline-cloud-worker-agent.svg?style=flat)](https://pypi.python.org/pypi/deadline-cloud-worker-agent)
5
+ [![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)
6
+
7
+ The AWS Deadline Cloud worker agent can be used to run a worker in an
8
+ [AWS Deadline Cloud][deadline-cloud] fleet. This includes managing the life-cycle of a worker and
9
+ its assigned work both in the service and on the worker's host.
10
+
11
+ Deadline Cloud schedules work as worker sessions which are an extension of
12
+ [Open Description (OpenJD)][openjd] sessions specific to AWS Deadline Cloud. The worker agent
13
+ initiates session actions, monitors them, and reports the status of running and completed session
14
+ actions to the service including progress, logs, process exit code, and indicates if the work was
15
+ canceled or interrupted.
16
+
17
+ The worker agent behavior follows the AWS Deadline Cloud [worker API protocol][protocol] that
18
+ specifies the expectation of how the service and workers behave and collaborate through Deadline
19
+ Cloud's worker APIs.
20
+
21
+ For guidance on setting up the worker agent for use in a customer-managed fleet, see the
22
+ ["Manage Deadline Cloud customer-managed fleets"][manage-cmf-docs] topic in the AWS Deadline Cloud
23
+ User Guide
24
+
25
+ [deadline-cloud]: https://docs.aws.amazon.com/deadline-cloud/latest/userguide/what-is-deadline-cloud.html
26
+ [manage-cmf-docs]: https://docs.aws.amazon.com/deadline-cloud/latest/userguide/manage-cmf.html
27
+ [openjd]: https://github.com/OpenJobDescription/openjd-specifications/wiki
28
+ [protocol]: https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/worker_api_protocol.md
29
+
30
+ ## Compatibility
31
+
32
+ The worker agent requires Python 3.9 or higher. There are additional platform-specific requirements
33
+ listed below:
34
+
35
+ **Linux:**
36
+
37
+ * Amazon Linux 2 and 2023 are recommended and tested
38
+ * `sudo` must be installed
39
+
40
+ **Windows:**
41
+
42
+ * Windows Server 2022 is recommended and tested
43
+ * Requires CPython implementation of Python
44
+ * **Python must be installed for all users** (e.g. in `C:\Program Files`)
45
+
46
+ **MacOS is intended to be used for testing only and is subject to change.**
47
+
48
+ ## Versioning
49
+
50
+ This package's version follows [Semantic Versioning 2.0](https://semver.org/), but is still
51
+ considered to be in its initial development, thus backwards incompatible versions are denoted by
52
+ minor version bumps. To help illustrate how versions will increment during this initial development
53
+ stage, they are described below:
54
+
55
+ 1. The MAJOR version is currently 0, indicating initial development
56
+ 2. The MINOR version is currently incremented when backwards incompatible changes are introduced to the public API.
57
+ 3. The PATCH version is currently incremented when bug fixes or backwards compatible changes are introduced to the public API.
58
+
59
+ ## Installing program files
60
+
61
+ ### Linux
62
+
63
+ We recommend installing the agent in a Python virtual environment (e.g. using [`venv`][venv]). For
64
+ this, run:
65
+
66
+ ```sh
67
+ # Create venv
68
+ python -m venv /opt/deadline/worker
69
+
70
+ # Activate the virtual environment - you can later type "deactivate" to exit the environment
71
+ source /opt/deadline/worker/bin/activate
72
+
73
+ # Install worker agent program files into the virtual environment
74
+ pip install deadline-cloud-worker-agent
75
+ ```
76
+
77
+ [venv]: https://docs.python.org/3/library/venv.html
78
+
79
+ ### Windows
80
+
81
+ The worker agent runs as a Windows Service which leads to a few installation constraints:
82
+
83
+ * Python virtual environments are not supported
84
+ * Python must be installed for all users
85
+
86
+ To obtain the program files, run this command in an administrator command-prompt:
87
+
88
+ ```sh
89
+ pip install deadline-cloud-worker-agent
90
+ ```
91
+
92
+
93
+ ## Setup worker host
94
+
95
+ The worker host can be prepared to be run using the provided `install-deadline-worker` command. This
96
+ command performs certain functions to setup the worker host based on arguments provided. The
97
+ command performs all worker host setup activities, such as:
98
+
99
+ * creates an operating system user account (specified by the `--user` argument) on the worker
100
+ host that the worker will run as. `install-deadline-worker` accepts a previously created user.
101
+ The user defaults to `deadline-worker-agent` on Linux and `deadline-worker` on Windows.
102
+ * creates a job user group (specified by `--group`, defaults to `deadline-job-users`) if required. The
103
+ `install-deadline-worker` accepts an existing group.
104
+ * creates cache, log, and config directories, and an example config file
105
+ * [optionally] initializes the config file
106
+ * modifies the config file using provided arguments
107
+ * [optionally] install/update an operating system service
108
+ * [optionally] start the operating system service
109
+
110
+ ---
111
+
112
+ **NOTE:** The `install-deadline-worker` command does not support MacOS at this time.
113
+
114
+ ---
115
+
116
+ To see the available command-line arguments, run:
117
+
118
+ **On Linux:**
119
+
120
+ Assuming you have installed the worker agent to a Python venv in `/opt/deadline/worker`, run:
121
+
122
+ ```sh
123
+ /opt/deadline/worker/bin/install-deadline-worker --help
124
+ ```
125
+
126
+ **On Windows:**
127
+
128
+ Run the following command in an administrator command-prompt:
129
+
130
+ ```bat
131
+ install-deadline-worker --help
132
+ ```
133
+
134
+ ## Configuration
135
+
136
+ [See configuration](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/configuration.md)
137
+
138
+ ## State
139
+
140
+ [See state](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/state.md)
141
+
142
+ ## Running
143
+
144
+ Setting up the worker host using the `install-deadline-worker` command (see "Setup worker host"
145
+ above) installs an operating system service. On Linux, this is a systemd service and on Windows this
146
+ is a Windows service.
147
+
148
+ The following commands demonstrate how to manually control the operating system service.
149
+
150
+ **On Linux:**
151
+
152
+ ```sh
153
+ # Start the worker agent
154
+ systemctl start dealine-worker
155
+
156
+ # Stop the worker agent
157
+ systemctl stop dealine-worker
158
+
159
+ # Configure the worker agent to start on boot
160
+ systemctl enable dealine-worker
161
+
162
+ # Configure the worker agent to NOT start on boot
163
+ systemctl disable dealine-worker
164
+ ```
165
+
166
+ **On Windows:**
167
+
168
+ Using an admin command-prompt:
169
+
170
+ ```bat
171
+ REM start the service
172
+ sc.exe start DeadlineWorker
173
+
174
+ REM stop the service
175
+ sc.exe stop DeadlineWorker
176
+ ```
177
+
178
+ ## Logging
179
+
180
+ [See logging](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/logging.md)
181
+
182
+ ## Contributing
183
+
184
+ See [`CONTRIBUTING.md`](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/mainline/CONTRIBUTING.md)
185
+ for information on reporting issues, requesting features, and developer information.
186
+
187
+ ## Security
188
+
189
+ See [security issue notifications](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/CONTRIBUTING.md#security-issue-notifications) for more information.
190
+
191
+ ## Telemetry
192
+
193
+ [See telemetry](https://github.com/aws-deadline/deadline-cloud-worker-agent/blob/release/docs/telemetry.md)
194
+
195
+ ## License
196
+
197
+ This project is licensed under the Apache-2.0 License.
@@ -0,0 +1,16 @@
1
+ # file generated by setuptools_scm
2
+ # don't change, don't track in version control
3
+ TYPE_CHECKING = False
4
+ if TYPE_CHECKING:
5
+ from typing import Tuple, Union
6
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
7
+ else:
8
+ VERSION_TUPLE = object
9
+
10
+ version: str
11
+ __version__: str
12
+ __version_tuple__: VERSION_TUPLE
13
+ version_tuple: VERSION_TUPLE
14
+
15
+ __version__ = version = '0.26.0'
16
+ __version_tuple__ = version_tuple = (0, 26, 0)