Skip to content

Commit f96be91

Browse files
authored
Merge pull request #328 from aws/bump/0.26.0
chore(release): 0.26.0
2 parents 9041dd9 + bc110bd commit f96be91

File tree

78 files changed

+9702
-1344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+9702
-1344
lines changed

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [0.26.0](https://github.com/aws/aws-rfdk/compare/v0.25.0...v0.26.0) (2021-03-01)
6+
7+
8+
### Supported CDK Version
9+
10+
* [1.91.0](https://github.com/aws/aws-cdk/releases/tag/v1.91.0)
11+
12+
13+
### Officially Supported Deadline Versions
14+
15+
* [10.1.9.2 to 10.1.13.2](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/release-notes.html)
16+
17+
18+
### Features
19+
20+
* **core:** add vpcSubnets prop to HealthMonitor ([#310](https://github.com/aws/aws-rfdk/issues/310)) ([12b6d89](https://github.com/aws/aws-rfdk/commit/12b6d89503fafdb645c5721d3b07d301fcd72521)), closes [#305](https://github.com/aws/aws-rfdk/issues/305)
21+
* **deadline:** add ConfigureSpotEventPlugin and SpotEventPluginFleet constructs ([#279](https://github.com/aws/aws-rfdk/issues/279)) ([b418e8a](https://github.com/aws/aws-rfdk/commit/b418e8a6857b7ee46a2fd984acb3f642231b6273))
22+
* **deadline:** add security group configuration for Repository and RenderQueue ([#319](https://github.com/aws/aws-rfdk/issues/319)) ([b7a43d6](https://github.com/aws/aws-rfdk/commit/b7a43d679be00ff4fc228ae0ee5bc3c6685a6025))
23+
24+
25+
### Bug Fixes
26+
27+
* **deadline:** VersionQuery cross-stack issue ([#306](https://github.com/aws/aws-rfdk/issues/306)) ([e6bb60d](https://github.com/aws/aws-rfdk/commit/e6bb60dc5cb186dca16b70daf4990e845b2825e1))
28+
* **examples:** Fix errors in MongoDB Python example ([#322](https://github.com/aws/aws-rfdk/issues/322)) ([e1bfc79](https://github.com/aws/aws-rfdk/commit/e1bfc79b11c685d140057b7f58adcf49bfad23ab))
29+
* **integ:** Ignore unbound RUN_TESTS_IN_PARALLEL variable ([#326](https://github.com/aws/aws-rfdk/issues/326)) ([76edf55](https://github.com/aws/aws-rfdk/commit/76edf559be8c4873403fe0938319f11612bb078a))
30+
531
## [0.25.0](https://github.com/aws/aws-rfdk/compare/v0.24.0...v0.25.0) (2021-01-28)
632

733

examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self):
3232
# to pin to. Some examples of pinned version values are "10", "10.1", or "10.1.12"
3333
self.deadline_version: Optional[str] = None
3434

35-
# A map of regions to Deadline Client Linux AMIs.As an example, the Linux Deadline 10.1.12.1 AMI ID
35+
# A map of regions to Deadline Client Linux AMIs. As an example, the Linux Deadline 10.1.12.1 AMI ID
3636
# from us-west-2 is filled in. It can be used as-is, added to, or replaced. Ideally the version here
3737
# should match the one used for staging the render queue and usage based licensing recipes.
3838
self.deadline_client_linux_ami_map: Mapping[str, str] = {'us-west-2': 'ami-039f0c1faba28b015'}

examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/lib/storage_tier.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def __init__(self, scope: Construct, stack_id: str, *, props: StorageTierMongoDB
213213
mongo_vpc_subnet = SubnetSelection(
214214
subnet_type=SubnetType.PRIVATE,
215215
availability_zones=[availability_zone]
216-
),
216+
)
217217

218218
mongo_db = MongoDbInstance(
219219
self,
@@ -240,7 +240,7 @@ def __init__(self, scope: Construct, stack_id: str, *, props: StorageTierMongoDB
240240
users=MongoDbUsers(
241241
x509_auth_users=[
242242
MongoDbX509User(
243-
certificate=client_cert,
243+
certificate=client_cert.cert,
244244
roles=json.dumps([
245245
{
246246
'role': 'readWriteAnyDatabase',

examples/deadline/All-In-AWS-Infrastructure-Basic/python/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
packages=setuptools.find_packages(where="package"),
1818

1919
install_requires=[
20-
"aws-cdk.core==1.86.0",
21-
"aws-rfdk==0.25.0"
20+
"aws-cdk.core==1.91.0",
21+
"aws-rfdk==0.26.0"
2222
],
2323

2424
python_requires=">=3.7",
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "all-in-farm-basic",
3-
"version": "0.25.0",
3+
"version": "0.26.0",
44
"bin": {
55
"app": "bin/app.js"
66
},
@@ -14,14 +14,14 @@
1414
"watch": "tsc -w"
1515
},
1616
"devDependencies": {
17-
"@types/node": "^14.14.22",
18-
"aws-cdk": "1.86.0",
17+
"@types/node": "^14.14.31",
18+
"aws-cdk": "1.91.0",
1919
"ts-node": "^9.1.1",
20-
"typescript": "~4.1.3"
20+
"typescript": "~4.2.2"
2121
},
2222
"dependencies": {
23-
"@aws-cdk/core": "1.86.0",
24-
"aws-rfdk": "0.25.0",
23+
"@aws-cdk/core": "1.91.0",
24+
"aws-rfdk": "0.26.0",
2525
"source-map-support": "^0.5.19"
2626
}
2727
}

examples/deadline/All-In-AWS-Infrastructure-SEP/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _**Note:** This application is an illustrative example to showcase some of the c
1010

1111
## Architecture
1212

13-
This sample application deploys a basic Deadline Render farm that is configured to use Deadlines [Spot Event Plugin](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/event-spot.html).
13+
This sample application deploys a basic Deadline Render farm that is configured to use Deadline's [Spot Event Plugin](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/event-spot.html).
1414

1515
### Components
1616

@@ -22,15 +22,15 @@ The Repository component contains the database and file system that store persis
2222

2323
#### Render Queue
2424

25-
The Render Queue component contains the fleet of [Deadline Remote Connection Server](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/remote-connection-server.html) instances behind an [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html). This acts as the central service for Deadline applications and is the only component that interacts with the Repository. When comparing this component to the "All in AWS Infrastructure - Basic" example it has been granted additional permissions in order to use the Spot Event Plugin.
25+
The Render Queue component contains the fleet of [Deadline Remote Connection Server](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/remote-connection-server.html) instances behind an [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html). This acts as the central service for Deadline applications and is the only component that interacts with the Repository. When comparing this component to the "All in AWS Infrastructure - Basic" example, it has been granted additional permissions in order to use the Spot Event Plugin.
2626

2727
#### Spot Event Plugin Configurations
2828

29-
The Spot Event plugin requires additional Roles for both Deadline's Resource Tracker and the Spot Workers that are created and a Security Group to allow your Spot workers the ability to access the Render Queue.
29+
Spot Event Plugin Configuration Setup component generates and saves the [Spot Fleet Request Configurations](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/event-spot.html#spot-fleet-request-configurations). The Spot Workers that are created will be configured to connect to the Render Queue. The Spot Event Plugin requires additional Role for Deadline's Resource Tracker.
3030

3131
## Prerequisites
3232

33-
- The Spot Fleet Configuration requires an [Amazon Machine Image (AMI)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) with the Deadline Worker application installed. This AMI must have Deadline Installed and should be configured to connect to your repository. For additional information on setting up your AMI please see the [Spot Event Plugin Documentation](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/event-spot.html).
33+
- The Spot Fleet Configuration requires an [Amazon Machine Image (AMI)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) with the Deadline Worker application installed. This AMI must have Deadline Installed and should be configured to connect to your repository. For additional information on setting up your AMI please see the [Spot Event Plugin Documentation](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/event-spot.html).
3434
- You have setup and configured the AWS CLI
3535
- Your AWS account already has CDK bootstrapped in the desired region by running `cdk bootstrap`
3636
- You must have NodeJS installed on your system

examples/deadline/All-In-AWS-Infrastructure-SEP/python/README.md

+34-11
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ These instructions assume that your working directory is `examples/deadline/All-
1313
---
1414

1515
1. This sample app on the `mainline` branch may contain features that have not yet been officially released, and may not be available in the `aws-rfdk` package installed through pip from PyPI. To work from an example of the latest release, please switch to the `release` branch. If you would like to try out unreleased features, you can stay on `mainline` and follow the instructions for building, packing, and installing the `aws-rfdk` from your local repository.
16+
1617
2. Install the dependencies of the sample app:
1718

1819
```bash
1920
pip install -r requirements.txt
2021
```
22+
2123
3. If working on the `release` branch, this step can be skipped. If working on `mainline`, navigate to the base directory where the build and packaging scripts are, then run them and install the result over top of the `aws-rfdk` version that was installed in the previous step:
2224
```bash
2325
# Navigate to the root directory of the RFDK repository
@@ -32,33 +34,54 @@ These instructions assume that your working directory is `examples/deadline/All-
3234
popd
3335
pip install ../../../../dist/python/aws-rfdk-<version>.tar.gz
3436
```
35-
3. Stage the Docker recipes for `RenderQueue`:
37+
38+
4. Change the value in the `deadline_client_linux_ami_map` variable in `package/config.py` to include the region + AMI ID mapping of your EC2 AMI(s) with Deadline Worker. You can use the following AWS CLI query to find AMI ID's:
39+
```bash
40+
aws --region <region> ec2 describe-images \
41+
--owners 357466774442 \
42+
--filters "Name=name,Values=*Worker*" "Name=name,Values=*<version>*" \
43+
--query 'Images[*].[ImageId, Name]' \
44+
--output text
45+
```
46+
47+
And enter it into this section of `package/config.py`:
48+
```python
49+
# For example, in the us-west-2 region
50+
self.deadline_client_linux_ami_map: Mapping[str, str] = {
51+
'us-west-2': '<your ami id>'
52+
}
53+
```
54+
55+
5. Stage the Docker recipes for `RenderQueue`:
3656
3757
```bash
3858
# Set this value to the version of RFDK your application targets
3959
RFDK_VERSION=<version_of_RFDK>
4060
41-
# Set this value to the version of AWS Thinkbox Deadline you'd like to deploy to your farm. Deadline 10.1.9 and up are supported.
61+
# Set this value to the version of AWS Thinkbox Deadline you'd like to deploy to your farm. Deadline 10.1.12 and up are supported.
4262
RFDK_DEADLINE_VERSION=<version_of_deadline>
4363

4464
npx --package=aws-rfdk@${RFDK_VERSION} stage-deadline --output stage ${RFDK_DEADLINE_VERSION}
4565
```
46-
4. Deploy all the stacks in the sample app:
66+
67+
6. Deploy all the stacks in the sample app:
4768

4869
```bash
4970
cdk deploy "*"
5071
```
5172

52-
5. Connect to your Render Farm and open up the Deadline Monitor.
73+
7. You can now [connect to the farm](https://docs.aws.amazon.com/rfdk/latest/guide/connecting-to-render-farm.html) and [submit rendering jobs](https://docs.aws.amazon.com/rfdk/latest/guide/first-rfdk-app.html#_optional_submit_a_job_to_the_render_farm).
74+
75+
**Note:** In order for the Spot Event Plugin to create a Spot Fleet Request you need to:
76+
* Create the Deadline Group associated with the Spot Fleet Request Configuration. See [Deadline Documentation](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/pools-and-groups.html).
77+
* Create the Deadline Pools to which the fleet Workers are added. See [Deadline Documentation](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/pools-and-groups.html).
78+
* Submit the job with the assigned Deadline Group and Deadline Pool. See [Deadline Documentation](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/job-submitting.html#submitting-jobs).
79+
80+
**Note:** Disable 'Allow Workers to Perform House Cleaning If Pulse is not Running' in the 'Configure Repository Options' when using Spot Event Plugin. See [Deadline Documentation](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/event-spot.html#prerequisites).
5381

54-
6. Configure the Spot event plugin by following the directions in the [Spot Event Plugin documentation](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/event-spot.html) with the following considerations:
82+
8. Once you are finished with the sample app, you can tear it down by running:
5583

56-
Use the default security credentials by using turning "Use Local Credentials" to False and leaving both "Access Key ID" and "Secret Access Key" blank.
57-
Ensure that the Region your Spot workers will be launched in is the same region as your CDK application.
58-
When Creating your Spot Fleet Requests, set the IAM instance profile to "DeadlineSpotWorkerRole" and set the security group to "DeadlineSpotSecurityGroup".
59-
Configure your instances to connect to the Render Queue by either creating your AMI after launching your app and preconfiguring the AMI or by setting up a userdata in the Spot Fleet Request. (see the Spot Event Plugin documentation for additional information on configuring this connection.)
60-
61-
7. Once you are finished with the sample app, you can tear it down by running:
84+
**Note:** Any resources created by the Spot Event Plugin will not be deleted with `cdk destroy`. Make sure that all such resources (e.g. Spot Fleet Request or Fleet Instances) are cleaned up, before destroying the stacks. Disable the Spot Event Plugin by setting 'state' property to 'SpotEventPluginState.DISABLED' or via Deadline Monitor, ensure you shutdown all Pulse instances and then terminate any Spot Fleet Requests in the AWS EC2 Instance Console.
6285

6386
```bash
6487
cdk destroy "*"

examples/deadline/All-In-AWS-Infrastructure-SEP/python/package/app.py

+16-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,27 @@
77

88
from aws_cdk.core import (
99
App,
10-
Environment
10+
Environment,
11+
)
12+
13+
from aws_cdk.aws_ec2 import (
14+
MachineImage,
1115
)
1216

1317
from .lib import (
1418
sep_stack,
1519
)
1620

21+
from .config import config
22+
1723
def main():
24+
# ------------------------------
25+
# Validate Config Values
26+
# ------------------------------
27+
28+
if 'region' in config.deadline_client_linux_ami_map:
29+
raise ValueError('Deadline Client Linux AMI map is required but was not specified.')
30+
1831
# ------------------------------
1932
# Application
2033
# ------------------------------
@@ -28,11 +41,10 @@ def main():
2841
account=os.environ.get('CDK_DEPLOY_ACCOUNT', os.environ.get('CDK_DEFAULT_ACCOUNT')),
2942
region=os.environ.get('CDK_DEPLOY_REGION', os.environ.get('CDK_DEFAULT_REGION'))
3043
)
31-
# ------------------------------
32-
# Service Tier
33-
# ------------------------------
44+
3445
sep_props = sep_stack.SEPStackProps(
3546
docker_recipes_stage_path=os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir, 'stage'),
47+
worker_machine_image=MachineImage.generic_linux(config.deadline_client_linux_ami_map),
3648
)
3749
service = sep_stack.SEPStack(app, 'SEPStack', props=sep_props, env=env)
3850

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
from typing import (
5+
List,
6+
Mapping,
7+
Optional,
8+
)
9+
10+
class AppConfig:
11+
"""
12+
Configuration values for the sample app.
13+
14+
TODO: Fill these in with your own values.
15+
"""
16+
def __init__(self):
17+
# A map of regions to Deadline Client Linux AMIs. As an example, the Linux Deadline 10.1.12.1 AMI ID
18+
# from us-west-2 is filled in. It can be used as-is, added to, or replaced. Ideally the version here
19+
# should match the one used for staging the render queue and usage based licensing recipes.
20+
self.deadline_client_linux_ami_map: Mapping[str, str] = {'us-west-2': 'ami-039f0c1faba28b015'}
21+
22+
23+
config: AppConfig = AppConfig()

0 commit comments

Comments
 (0)