Skip to content

Commit

Permalink
Merge pull request #654 from aws/bump/0.40.0
Browse files Browse the repository at this point in the history
chore(release): 0.40.0
  • Loading branch information
horsmand authored Jan 6, 2022
2 parents 96d60b7 + b451134 commit 6d319f6
Show file tree
Hide file tree
Showing 85 changed files with 3,386 additions and 4,361 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,36 @@

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.

## [0.40.0](https://github.com/aws/aws-rfdk/compare/v0.39.0...v0.40.0) (2022-01-06)


### Supported CDK Version

* [1.137.0](https://github.com/aws/aws-cdk/releases/tag/v1.137.0)


### Officially Supported Deadline Versions

* [10.1.9.2 to 10.1.20.2](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/release-notes.html)


### ⚠ BREAKING CHANGES

See the
[RFDK 0.40.x upgrade documentation](https://github.com/aws/aws-rfdk/blob/v0.40.0/packages/aws-rfdk/docs/upgrade/upgrading-0.40.md)
for more details and guidance on addressing these breaking changes.

* The IHealthMonitor and IWorkerFleet interfaces now
extend IConstruct rather than IResource and the stack and env properties
on the HealthMonitor and WorkerInstanceFleet constructs were removed.
* **deadline:** SpotEventPluginFleet now uses EC2 Launch Templates instead of Launch Specifications.


### Features

* **deadline:** change SEP construct to use launch templates instead of launch specifications ([#513](https://github.com/aws/aws-rfdk/issues/513)) ([7c61c18](https://github.com/aws/aws-rfdk/commit/7c61c18be213d42a9ff08a227688c759b843a7d8))


## [0.39.0](https://github.com/aws/aws-rfdk/compare/v0.38.0...v0.39.0) (2021-11-20)


Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Render Farm Deployment Kit on AWS (RFDK)
Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
{
"app": "python -m package.app"
"app": "python -m package.app",
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:enableStackNameDuplicates": true,
"aws-cdk:enableDiffNoFail": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": true,
"@aws-cdk/aws-secretsmanager:parseOwnedSecretName": true,
"@aws-cdk/aws-kms:defaultKeyPolicies": true,
"@aws-cdk/aws-s3:grantWriteWithoutAcl": true,
"@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-efs:defaultEncryptionAtRest": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def __init__(self, scope: Construct, stack_id: str, *, props: StorageTierProps,
# render farm may become unstable.
# 2) Uses RFDK's PadEfsStorage construct to add data to the EFS for the purpose of increasing the amount
# of stored data to increase the baseline throughput.
#
#
# See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html
# for more information on AWS CloudWatch Alarms.
# See: https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes
Expand Down Expand Up @@ -227,7 +227,7 @@ def add_low_efs_burst_credit_alarms(self, filesystem: FileSystem, email_address:
# ====================
# 1) KMS key to use to encrypt events within the SNS Topic. The Key is optional
key = Key(
self,
self,
'SNSEncryptionKey',
description='Used to encrypt the SNS Topic for sending EFS Burst Credit alerts',
enable_key_rotation=True,
Expand All @@ -252,14 +252,14 @@ def add_low_efs_burst_credit_alarms(self, filesystem: FileSystem, email_address:
burst_credits_metric = Metric(
metric_name='BurstCreditBalance',
namespace='AWS/EFS',
dimensions={
dimensions_map={
"FileSystemId": filesystem.file_system_id
},
# One 99-th percentile data point sample every hour
period=Duration.hours(1),
statistic='p99'
)

# 2) Create the alarms
thresholds = [
{
Expand Down Expand Up @@ -342,7 +342,7 @@ def __init__(self, scope: Construct, stack_id: str, *, props: StorageTierDocDBPr
subnet_group_name=subnets.INFRASTRUCTURE.name
),
instance_type=props.database_instance_type,
# TODO - For cost considerations this example only uses 1 Database instance.
# TODO - For cost considerations this example only uses 1 Database instance.
# It is recommended that when creating your render farm you use at least 2 instances for redundancy.
instances=1,
master_user=Login(username='adminuser'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
packages=setuptools.find_packages(where="package"),

install_requires=[
"aws-cdk.core==1.129.0",
"aws-rfdk==0.39.0"
"aws-cdk.core==1.137.0",
"aws-rfdk==0.40.0"
],

python_requires=">=3.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ class AppConfig {
public readonly deadlineVersion?: string;

/**
* A map of regions to Deadline Client Linux AMIs. As an example, the base Linux Deadline 10.1.19.4 AMI ID from us-west-2
* A map of regions to Deadline Client Linux AMIs. As an example, the base Linux Deadline 10.1.20.2 AMI ID from us-west-2
* is filled in. It can be used as-is, added to, or replaced. Ideally the version here should match the version of
* Deadline used in any connected Deadline constructs.
*/
public readonly deadlineClientLinuxAmiMap: Record<string, string> = {['us-west-2']: 'ami-04ae356533dc07fb5'};
public readonly deadlineClientLinuxAmiMap: Record<string, string> = {['us-west-2']: 'ami-0814954855da0e4c3'};

/**
* (Optional) A secret (in binary form) in SecretsManager that stores the UBL certificates in a .zip file.
Expand Down
15 changes: 13 additions & 2 deletions examples/deadline/All-In-AWS-Infrastructure-Basic/ts/cdk.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{
"app": "npx ts-node bin/app.ts",
"context": {
"@aws-cdk/core:enableStackNameDuplicates": "true",
"aws-cdk:enableDiffNoFail": "true"
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:enableStackNameDuplicates": true,
"aws-cdk:enableDiffNoFail": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": true,
"@aws-cdk/aws-secretsmanager:parseOwnedSecretName": true,
"@aws-cdk/aws-kms:defaultKeyPolicies": true,
"@aws-cdk/aws-s3:grantWriteWithoutAcl": true,
"@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-efs:defaultEncryptionAtRest": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export abstract class StorageTier extends cdk.Stack {
// render farm may become unstable.
// 2) Uses RFDK's PadEfsStorage construct to add data to the EFS for the purpose of increasing the amount
// of stored data to increase the baseline throughput.
//
//
// See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html
// for more information on AWS CloudWatch Alarms.
// See: https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes
Expand Down Expand Up @@ -227,14 +227,14 @@ export abstract class StorageTier extends cdk.Stack {
const burstCreditsMetric = new Metric({
metricName: 'BurstCreditBalance',
namespace: 'AWS/EFS',
dimensions: {
dimensionsMap: {
FileSystemId: filesystem.fileSystemId,
},
// One 99-th percentile data point hour
period: Duration.hours(1),
statistic: 'p99',
});

// 2) Create the alarms
const thresholds = [
{
Expand Down Expand Up @@ -319,7 +319,7 @@ export class StorageTierDocDB extends StorageTier {
subnetGroupName: Subnets.INFRASTRUCTURE.name,
},
instanceType: props.databaseInstanceType,
// TODO - For cost considerations this example only uses 1 Database instance.
// TODO - For cost considerations this example only uses 1 Database instance.
// It is recommended that when creating your render farm you use at least 2 instances for redundancy.
instances: 1,
masterUser: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "all-in-farm-basic",
"version": "0.39.0",
"version": "0.40.0",
"bin": {
"app": "bin/app.js"
},
Expand All @@ -13,14 +13,14 @@
"watch": "tsc -w"
},
"devDependencies": {
"@types/node": "^16.11.3",
"aws-cdk": "1.129.0",
"ts-node": "^10.3.1",
"typescript": "~4.4.4"
"@types/node": "^17.0.2",
"aws-cdk": "1.137.0",
"ts-node": "^10.4.0",
"typescript": "~4.5.4"
},
"dependencies": {
"@aws-cdk/core": "1.129.0",
"aws-rfdk": "0.39.0",
"source-map-support": "^0.5.20"
"@aws-cdk/core": "1.137.0",
"aws-rfdk": "0.40.0",
"source-map-support": "^0.5.21"
}
}
17 changes: 16 additions & 1 deletion examples/deadline/All-In-AWS-Infrastructure-SEP/python/cdk.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
{
"app": "python -m package.app"
"app": "python -m package.app",
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:enableStackNameDuplicates": true,
"aws-cdk:enableDiffNoFail": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": true,
"@aws-cdk/aws-secretsmanager:parseOwnedSecretName": true,
"@aws-cdk/aws-kms:defaultKeyPolicies": true,
"@aws-cdk/aws-s3:grantWriteWithoutAcl": true,
"@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-efs:defaultEncryptionAtRest": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def main():
sep_props = sep_stack.SEPStackProps(
docker_recipes_stage_path=os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir, 'stage'),
worker_machine_image=MachineImage.generic_linux(config.deadline_client_linux_ami_map),
create_resource_tracker_role=config.create_resource_tracker_role,
)
service = sep_stack.SEPStack(app, 'SEPStack', props=sep_props, env=env)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,13 @@ def __init__(self):
# should match the one used for staging the render queue and usage based licensing recipes.
self.deadline_client_linux_ami_map: Mapping[str, str] = {'us-west-2': 'ami-04ae356533dc07fb5'}

# Whether the DeadlineResourceTrackerAccessRole IAM role required by Deadline's Resource Tracker should be created in this CDK app.
#
# If you have previously used this same AWS account with either Deadline's AWS Portal feature or Spot Event Plugin and had used the
# Deadline Resource Tracker, then you likely have this IAM role in your account already unless you have removed it.
#
# Note: Deadline's Resource Tracker only supports being used by a single Deadline Repository per AWS account.
self.create_resource_tracker_role: bool = True


config: AppConfig = AppConfig()
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class SEPStackProps(StackProps):
docker_recipes_stage_path: str
# The IMachineImage to use for Workers (needs Deadline Client installed).
worker_machine_image: IMachineImage
# Whether the DeadlineResourceTrackerAccessRole IAM role required by Deadline's Resource Tracker should be created in this CDK app.
create_resource_tracker_role: bool


class SEPStack(Stack):
Expand Down Expand Up @@ -159,15 +161,15 @@ def __init__(self, scope: Construct, stack_id: str, *, props: SEPStackProps, **k
),
)

# Creates the Resource Tracker Access role. This role is required to exist in your account so the resource tracker will work properly
# Note: If you already have a Resource Tracker IAM role in your account you can remove this code.
Role(
self,
'ResourceTrackerRole',
assumed_by=ServicePrincipal('lambda.amazonaws.com'),
managed_policies= [ManagedPolicy.from_aws_managed_policy_name('AWSThinkboxDeadlineResourceTrackerAccessPolicy')],
role_name= 'DeadlineResourceTrackerAccessRole',
)
if props.create_resource_tracker_role:
# Creates the Resource Tracker Access role. This role is required to exist in your account so the resource tracker will work properly
Role(
self,
'ResourceTrackerRole',
assumed_by=ServicePrincipal('lambda.amazonaws.com'),
managed_policies= [ManagedPolicy.from_aws_managed_policy_name('AWSThinkboxDeadlineResourceTrackerAccessPolicy')],
role_name= 'DeadlineResourceTrackerAccessRole',
)

fleet = SpotEventPluginFleet(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
packages=setuptools.find_packages(where="package"),

install_requires=[
"aws-cdk.core==1.129.0",
"aws-rfdk==0.39.0"
"aws-cdk.core==1.137.0",
"aws-rfdk==0.40.0"
],

python_requires=">=3.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ new SEPStack(app, 'SEPStack', {
env,
dockerRecipesStagePath: path.join(__dirname, '..', pkg.config.stage_path), // Stage directory in config is relative, make it absolute
workerMachineImage: MachineImage.genericLinux(config.deadlineClientLinuxAmiMap),
createResourceTrackerRole: config.createResourceTrackerRole,
});
14 changes: 12 additions & 2 deletions examples/deadline/All-In-AWS-Infrastructure-SEP/ts/bin/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,20 @@ import 'source-map-support/register';
*/
class AppConfig {
/**
* A map of regions to Deadline Client Linux AMIs. As an example, the base Linux Deadline 10.1.19.4 AMI ID from us-west-2
* A map of regions to Deadline Client Linux AMIs. As an example, the base Linux Deadline 10.1.20.2 AMI ID from us-west-2
* is filled in. It can be used as-is, added to, or replaced.
*/
public readonly deadlineClientLinuxAmiMap: Record<string, string> = {['us-west-2']: 'ami-04ae356533dc07fb5'};
public readonly deadlineClientLinuxAmiMap: Record<string, string> = {['us-west-2']: 'ami-0814954855da0e4c3'};

/**
* Whether the DeadlineResourceTrackerAccessRole IAM role required by Deadline's Resource Tracker should be created in this CDK app.
*
* If you have previously used this same AWS account with either Deadline's AWS Portal feature or Spot Event Plugin and had used the
* Deadline Resource Tracker, then you likely have this IAM role in your account already unless you have removed it.
*
* Note: Deadline's Resource Tracker only supports being used by a single Deadline Repository per AWS account.
*/
public readonly createResourceTrackerRole: boolean = true;
}

export const config = new AppConfig();
15 changes: 13 additions & 2 deletions examples/deadline/All-In-AWS-Infrastructure-SEP/ts/cdk.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{
"app": "npx ts-node bin/app.ts",
"context": {
"@aws-cdk/core:enableStackNameDuplicates": "true",
"aws-cdk:enableDiffNoFail": "true"
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:enableStackNameDuplicates": true,
"aws-cdk:enableDiffNoFail": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": true,
"@aws-cdk/aws-secretsmanager:parseOwnedSecretName": true,
"@aws-cdk/aws-kms:defaultKeyPolicies": true,
"@aws-cdk/aws-s3:grantWriteWithoutAcl": true,
"@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-efs:defaultEncryptionAtRest": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true
}
}
Loading

0 comments on commit 6d319f6

Please sign in to comment.