From b283e67a9976d2f3a66eac399d1e4baecf868c7a Mon Sep 17 00:00:00 2001 From: Daniel Neilson <53624638+ddneilson@users.noreply.github.com> Date: Fri, 28 Oct 2022 15:38:54 -0500 Subject: [PATCH] fix(deadline): Fix Python bindings of ThinkboxDockerImages (#880) --- .../All-In-AWS-Infrastructure-Basic/python/README.md | 4 ++-- .../python/package/lib/service_tier.py | 4 ++-- .../deadline/All-In-AWS-Infrastructure-Basic/ts/README.md | 3 --- .../All-In-AWS-Infrastructure-Basic/ts/package.json | 2 +- .../All-In-AWS-Infrastructure-SEP/python/README.md | 4 ++-- .../deadline/All-In-AWS-Infrastructure-SEP/ts/README.md | 3 --- .../All-In-AWS-Infrastructure-SEP/ts/package.json | 2 +- examples/deadline/EC2-Image-Builder/python/README.md | 4 ++-- .../python/package/lib/base_farm_stack.py | 2 +- examples/deadline/EC2-Image-Builder/ts/README.md | 3 --- examples/deadline/EC2-Image-Builder/ts/package.json | 2 +- examples/deadline/Local-Zone/python/README.md | 2 +- .../Local-Zone/python/package/lib/service_tier.py | 2 +- examples/deadline/Local-Zone/ts/README.md | 3 --- examples/deadline/Local-Zone/ts/package.json | 2 +- packages/aws-rfdk/lib/deadline/README.md | 2 +- .../aws-rfdk/lib/deadline/lib/thinkbox-docker-images.ts | 8 ++++++-- 17 files changed, 22 insertions(+), 30 deletions(-) diff --git a/examples/deadline/All-In-AWS-Infrastructure-Basic/python/README.md b/examples/deadline/All-In-AWS-Infrastructure-Basic/python/README.md index 8f5967cce..624fd5b53 100644 --- a/examples/deadline/All-In-AWS-Infrastructure-Basic/python/README.md +++ b/examples/deadline/All-In-AWS-Infrastructure-Basic/python/README.md @@ -22,9 +22,9 @@ These instructions assume that your working directory is `examples/deadline/All- ```bash # Navigate to the root directory of the RFDK repository pushd ../../../.. - # Enter the Docker container to run the build and pack scripts - ./scripts/rfdk_build_environment.sh ./build.sh + # Enter the Docker container to run the pack scripts + ./scripts/rfdk_build_environment.sh ./pack.sh # Exit the Docker container exit diff --git a/examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/lib/service_tier.py b/examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/lib/service_tier.py index 1e272f494..25f94824b 100644 --- a/examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/lib/service_tier.py +++ b/examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/lib/service_tier.py @@ -189,7 +189,7 @@ def __init__(self, scope: Construct, stack_id: str, *, props: ServiceTierProps, vpc_subnets_alb=SubnetSelection( subnet_group_name=subnets.RENDER_QUEUE_ALB.name ), - images=images, + images=images.for_render_queue(), repository=repository, hostname=RenderQueueHostNameProps( hostname='renderqueue', @@ -232,7 +232,7 @@ def __init__(self, scope: Construct, stack_id: str, *, props: ServiceTierProps, vpc_subnets=SubnetSelection( subnet_group_name=subnets.USAGE_BASED_LICENSING.name ), - images=images, + images=images.for_usage_based_licensing(), licenses=props.ubl_licenses, render_queue=self.render_queue, certificate_secret=ubl_cert_secret, diff --git a/examples/deadline/All-In-AWS-Infrastructure-Basic/ts/README.md b/examples/deadline/All-In-AWS-Infrastructure-Basic/ts/README.md index e7b5bdcc2..ce59d7066 100644 --- a/examples/deadline/All-In-AWS-Infrastructure-Basic/ts/README.md +++ b/examples/deadline/All-In-AWS-Infrastructure-Basic/ts/README.md @@ -144,10 +144,7 @@ These instructions assume that your working directory is `examples/deadline/All- ```bash # Navigate to the root directory of the RFDK repository (assumes you started in the example's directory) pushd ../../../.. - # Enter the Docker container, run the build, and then exit - ./scripts/rfdk_build_environment.sh ./build.sh - exit # Navigate back to the example directory popd # Run the example's build diff --git a/examples/deadline/All-In-AWS-Infrastructure-Basic/ts/package.json b/examples/deadline/All-In-AWS-Infrastructure-Basic/ts/package.json index bdb6a1156..e2e1074e3 100644 --- a/examples/deadline/All-In-AWS-Infrastructure-Basic/ts/package.json +++ b/examples/deadline/All-In-AWS-Infrastructure-Basic/ts/package.json @@ -19,7 +19,7 @@ "typescript": "~4.7.3" }, "dependencies": { - "aws-cdk-lib": "^2.33.0", + "aws-cdk-lib": "2.33.0", "aws-rfdk": "1.0.0", "source-map-support": "^0.5.21" } diff --git a/examples/deadline/All-In-AWS-Infrastructure-SEP/python/README.md b/examples/deadline/All-In-AWS-Infrastructure-SEP/python/README.md index f3c1220e2..8f26b8c97 100644 --- a/examples/deadline/All-In-AWS-Infrastructure-SEP/python/README.md +++ b/examples/deadline/All-In-AWS-Infrastructure-SEP/python/README.md @@ -24,9 +24,9 @@ These instructions assume that your working directory is `examples/deadline/All- ```bash # Navigate to the root directory of the RFDK repository pushd ../../../.. - # Enter the Docker container to run the build and pack scripts - ./scripts/rfdk_build_environment.sh ./build.sh + # Enter the Docker container to run thepack scripts + ./scripts/rfdk_build_environment.sh ./pack.sh # Exit the Docker container exit diff --git a/examples/deadline/All-In-AWS-Infrastructure-SEP/ts/README.md b/examples/deadline/All-In-AWS-Infrastructure-SEP/ts/README.md index 79bc805dc..138ac04f4 100644 --- a/examples/deadline/All-In-AWS-Infrastructure-SEP/ts/README.md +++ b/examples/deadline/All-In-AWS-Infrastructure-SEP/ts/README.md @@ -47,10 +47,7 @@ These instructions assume that your working directory is `examples/deadline/All- ```bash # Navigate to the root directory of the RFDK repository (assumes you started in the example's directory) pushd ../../../.. - # Enter the Docker container, run the build, and then exit - ./scripts/rfdk_build_environment.sh ./build.sh - exit # Navigate back to the example directory popd # Run the example's build diff --git a/examples/deadline/All-In-AWS-Infrastructure-SEP/ts/package.json b/examples/deadline/All-In-AWS-Infrastructure-SEP/ts/package.json index 1b03093b8..f64a87276 100644 --- a/examples/deadline/All-In-AWS-Infrastructure-SEP/ts/package.json +++ b/examples/deadline/All-In-AWS-Infrastructure-SEP/ts/package.json @@ -24,7 +24,7 @@ "typescript": "~4.7.3" }, "dependencies": { - "aws-cdk-lib": "^2.33.0", + "aws-cdk-lib": "2.33.0", "aws-rfdk": "1.0.0", "constructs": "^10.0.0", "source-map-support": "^0.5.21" diff --git a/examples/deadline/EC2-Image-Builder/python/README.md b/examples/deadline/EC2-Image-Builder/python/README.md index 227e45cb1..ff48c166e 100644 --- a/examples/deadline/EC2-Image-Builder/python/README.md +++ b/examples/deadline/EC2-Image-Builder/python/README.md @@ -24,9 +24,9 @@ These instructions assume that your working directory is `examples/deadline/EC2- ```bash # Navigate to the root directory of the RFDK repository pushd ../../../.. - # Enter the Docker container to run the build and pack scripts - ./scripts/rfdk_build_environment.sh ./build.sh + # Enter the Docker container to run the pack scripts + ./scripts/rfdk_build_environment.sh ./pack.sh # Exit the Docker container exit diff --git a/examples/deadline/EC2-Image-Builder/python/package/lib/base_farm_stack.py b/examples/deadline/EC2-Image-Builder/python/package/lib/base_farm_stack.py index 7b6ea6730..0d2a9a340 100644 --- a/examples/deadline/EC2-Image-Builder/python/package/lib/base_farm_stack.py +++ b/examples/deadline/EC2-Image-Builder/python/package/lib/base_farm_stack.py @@ -80,7 +80,7 @@ def __init__(self, scope: Construct, stack_id: str, *, props: BaseFarmStackProps 'RenderQueue', vpc=self.vpc, version=version, - images=images, + images=images.for_render_queue(), repository=repository, deletion_protection=False, ) diff --git a/examples/deadline/EC2-Image-Builder/ts/README.md b/examples/deadline/EC2-Image-Builder/ts/README.md index c59446cea..11e57eea8 100644 --- a/examples/deadline/EC2-Image-Builder/ts/README.md +++ b/examples/deadline/EC2-Image-Builder/ts/README.md @@ -33,10 +33,7 @@ These instructions assume that your working directory is `examples/deadline/EC2- ```bash # Navigate to the root directory of the RFDK repository (assumes you started in the example's directory) pushd ../../../.. - # Enter the Docker container, run the build, and then exit - ./scripts/rfdk_build_environment.sh ./build.sh - exit # Navigate back to the example directory popd # Run the example's build diff --git a/examples/deadline/EC2-Image-Builder/ts/package.json b/examples/deadline/EC2-Image-Builder/ts/package.json index d17b9cd02..57dfda591 100644 --- a/examples/deadline/EC2-Image-Builder/ts/package.json +++ b/examples/deadline/EC2-Image-Builder/ts/package.json @@ -20,7 +20,7 @@ "typescript": "~4.7.3" }, "dependencies": { - "aws-cdk-lib": "^2.33.0", + "aws-cdk-lib": "2.33.0", "aws-rfdk": "1.0.0", "constructs": "^10.0.0", "source-map-support": "^0.5.21" diff --git a/examples/deadline/Local-Zone/python/README.md b/examples/deadline/Local-Zone/python/README.md index c58011072..9d7a779e5 100644 --- a/examples/deadline/Local-Zone/python/README.md +++ b/examples/deadline/Local-Zone/python/README.md @@ -24,9 +24,9 @@ These instructions assume that your working directory is `examples/deadline/Loca ```bash # Navigate to the root directory of the RFDK repository pushd ../../../.. + ./build.sh # Enter the Docker container to run the build and pack scripts ./scripts/rfdk_build_environment.sh - ./build.sh ./pack.sh # Exit the Docker container exit diff --git a/examples/deadline/Local-Zone/python/package/lib/service_tier.py b/examples/deadline/Local-Zone/python/package/lib/service_tier.py index 2e2d9687b..c983778d8 100644 --- a/examples/deadline/Local-Zone/python/package/lib/service_tier.py +++ b/examples/deadline/Local-Zone/python/package/lib/service_tier.py @@ -137,7 +137,7 @@ def __init__(self, scope: Construct, stack_id: str, *, props: ServiceTierProps, self, 'RenderQueue', vpc=props.vpc, - images=images, + images=images.for_render_queue(), repository=repository, hostname=RenderQueueHostNameProps( hostname='renderqueue', diff --git a/examples/deadline/Local-Zone/ts/README.md b/examples/deadline/Local-Zone/ts/README.md index cd84c4501..6f79610c2 100644 --- a/examples/deadline/Local-Zone/ts/README.md +++ b/examples/deadline/Local-Zone/ts/README.md @@ -57,10 +57,7 @@ These instructions assume that your working directory is `examples/deadline/Loca ```bash # Navigate to the root directory of the RFDK repository (assumes you started in the example's directory) pushd ../../../.. - # Enter the Docker container, run the build, and then exit - ./scripts/rfdk_build_environment.sh ./build.sh - exit # Navigate back to the example directory popd # Run the example's build diff --git a/examples/deadline/Local-Zone/ts/package.json b/examples/deadline/Local-Zone/ts/package.json index 61a3d12fe..b5679a5a6 100644 --- a/examples/deadline/Local-Zone/ts/package.json +++ b/examples/deadline/Local-Zone/ts/package.json @@ -19,7 +19,7 @@ "typescript": "~4.7.3" }, "dependencies": { - "aws-cdk-lib": "^2.33.0", + "aws-cdk-lib": "2.33.0", "aws-rfdk": "1.0.0", "constructs": "^10.0.0", "source-map-support": "^0.5.21" diff --git a/packages/aws-rfdk/lib/deadline/README.md b/packages/aws-rfdk/lib/deadline/README.md index d5956bc4a..2091df82c 100644 --- a/packages/aws-rfdk/lib/deadline/README.md +++ b/packages/aws-rfdk/lib/deadline/README.md @@ -209,7 +209,7 @@ const repository = new Repository(stack, 'Repository', { /* ...*/}); const renderQueue = new RenderQueue(stack, 'RenderQueue', { vpc: vpc, - images: images, + images: images.forRenderQueue(), version: version, repository: repository, }); diff --git a/packages/aws-rfdk/lib/deadline/lib/thinkbox-docker-images.ts b/packages/aws-rfdk/lib/deadline/lib/thinkbox-docker-images.ts index b0c2d1921..655174e75 100644 --- a/packages/aws-rfdk/lib/deadline/lib/thinkbox-docker-images.ts +++ b/packages/aws-rfdk/lib/deadline/lib/thinkbox-docker-images.ts @@ -256,14 +256,18 @@ USER_ACCEPTS_AWS_CUSTOMER_AGREEMENT_AND_IP_LICENSE to signify your acceptance of * Returns container images for use with the {@link RenderQueue} construct */ public forRenderQueue(): RenderQueueImages { - return this; + return { + remoteConnectionServer: this.remoteConnectionServer, + }; } /** * Returns container images for use with the {@link UsageBasedLicensing} construct */ public forUsageBasedLicensing(): UsageBasedLicensingImages { - return this; + return { + licenseForwarder: this.licenseForwarder, + }; } /**