Skip to content

Commit

Permalink
Merge pull request #227 from aws/bump/0.20.0
Browse files Browse the repository at this point in the history
chore(release): 0.20.0
  • Loading branch information
ddneilson authored Nov 12, 2020
2 parents 5ddff08 + 057cbff commit 58e909f
Show file tree
Hide file tree
Showing 64 changed files with 4,011 additions and 3,031 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ updates:
- dependency-name: "constructs"
versions: ">=3.0.4"
- dependency-name: "@aws-cdk/*"
- dependency-name: "jsii*"
- dependency-name: "awslint"
commit-message:
prefix: "chore(deps):"
- package-ecosystem: "github-actions"
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

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.20.0](https://github.com/aws/aws-rfdk/compare/v0.19.0...v0.20.0) (2020-11-10)


### Supported CDK Version

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


### Officially Supported Deadline Versions

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


### Features

* **deadline:** add WorkerInstanceConfiguration construct ([#209](https://github.com/aws/aws-rfdk/issues/209)) ([bbb82b0](https://github.com/aws/aws-rfdk/commit/bbb82b0d1c68477d82e72420dc4fff7e0dd2f17b))
* **deadline:** versionquery construct ([#175](https://github.com/aws/aws-rfdk/issues/175)) ([78dcd86](https://github.com/aws/aws-rfdk/commit/78dcd860e6743094e123c12d8e7313e4d19af5a0)), closes [#176](https://github.com/aws/aws-rfdk/issues/176)

## [0.19.0](https://github.com/aws/aws-rfdk/compare/v0.18.1...v0.19.0) (2020-10-28)


Expand Down
37 changes: 35 additions & 2 deletions bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ version=${1:-minor}

cd "$(dirname "$0")"

echo "Starting ${version} version bump"
echo "Starting $version version bump"

export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}"

/bin/bash ./install.sh

npx lerna version ${version} --yes --exact --no-git-tag-version --no-push
npx lerna version $version --yes --exact --no-git-tag-version --no-push

# Another round of install to fix package-lock.jsons
/bin/bash ./install.sh
Expand All @@ -39,3 +39,36 @@ npx lerna version ${version} --yes --exact --no-git-tag-version --no-push

# Generate CHANGELOG and create a commit
npx standard-version --skip.tag=true --commit-all

# Get the new version number to do some manual find and replaces
new_version=$(node -p "require('./package.json').version")

# Update the version of RFDK used in the python examples
for exampleSetupPy in $(find ./examples/ -name 'setup.py')
do
sed -i "s/\"aws-rfdk==[0-9]*\.[0-9]*\.[0-9]*\"/\"aws-rfdk==$new_version\"/" "$exampleSetupPy"
done

# When standard-version adds a patch release to the changelog, it makes it a smaller header size. This undoes that.
if [[ $version == "patch" ]]; then
version_header="#\(## \[$new_version](.*) (.*)\)"
sed -i "s|$version_header|\1|" ./CHANGELOG.md
fi

version_header="# \[$new_version](.*) (.*)"

# Add a section to the changelog that states the supported Deadline versions
DEADLINE_RELEASE_NOTE_URL="https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/release-notes.html"
DEADLINE_SUPPORTED_VERSIONS=$(node ./scripts/getSupportedDeadlineVersions.ts)
MIN_DEADLINE_VERSION=$(echo "$DEADLINE_SUPPORTED_VERSIONS" | grep 'Min' | cut -f 2 -d ' ')
MAX_DEADLINE_VERSION=$(echo "$DEADLINE_SUPPORTED_VERSIONS" | grep 'Max' | cut -f 2 -d ' ')
deadline_version_section="\n\n\n### Officially Supported Deadline Versions\n\n* [${MIN_DEADLINE_VERSION} to ${MAX_DEADLINE_VERSION}](${DEADLINE_RELEASE_NOTE_URL})"
sed -i "s|\($version_header\)|\1$deadline_version_section|" ./CHANGELOG.md

# Add a section to the changelog that state the version of CDK being used
cdk_version=$(node -p "require('./package.json').devDependencies['aws-cdk']")
cdk_version_section="\n\n\n### Supported CDK Version\n\n* [$cdk_version](https://github.com/aws/aws-cdk/releases/tag/v$cdk_version)"
sed -i "s|\($version_header\)|\1$cdk_version_section|" ./CHANGELOG.md

git add .
git commit --amend --no-edit
37 changes: 26 additions & 11 deletions examples/deadline/All-In-AWS-Infrastructure-Basic/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,45 @@ These instructions assume that your working directory is `examples/deadline/All-

---

1. Install the dependencies of the sample app:
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.
2. Install the dependencies of the sample app:

```bash
pip install -r requirements.txt
```
2. 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.
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:
```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
./pack.sh
# Exit the Docker container
exit
# Navigate back to the example directory
popd
pip install ../../../../dist/python/aws-rfdk-<version>.tar.gz
```
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.

```python
# For example, in the us-west-2 region
self.deadline_client_linux_ami_map: Mapping[str, str] = {
'us-west-2': '<your ami id>'
}
```
3. Create a binary secret in [SecretsManager](https://aws.amazon.com/secrets-manager/) that contains your [Usage-Based Licensing](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/aws-portal/licensing-setup.html?highlight=usage%20based%20licensing) certificates in a `.zip` file:
5. Create a binary secret in [SecretsManager](https://aws.amazon.com/secrets-manager/) that contains your [Usage-Based Licensing](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/aws-portal/licensing-setup.html?highlight=usage%20based%20licensing) certificates in a `.zip` file:

```bash
aws secretsmanager create-secret --name <name> --secret-binary fileb://<path-to-zip-file>
```
4. The output from the previous step will contain the secret's ARN. Change the value of the `ubl_certificate_secret_arn` variable in `package/config.py` to the secret's ARN:
6. The output from the previous step will contain the secret's ARN. Change the value of the `ubl_certificate_secret_arn` variable in `package/config.py` to the secret's ARN:

```python
self.ubl_certificate_secret_arn: str = '<your secret arn>'
```
5. Choose your UBL limits and change the value of the `ubl_licenses` variable in `package/config.py` accordingly. For example:
7. Choose your UBL limits and change the value of the `ubl_licenses` variable in `package/config.py` accordingly. For example:

```python
self.ubl_licenses: List[UsageBasedLicense] = [
Expand All @@ -54,33 +69,33 @@ These instructions assume that your working directory is `examples/deadline/All-
**Note:** The next two steps are optional. You may skip these if you do not need SSH access into your render farm.

---
6. Create an EC2 key pair to give you SSH access to the render farm:
8. Create an EC2 key pair to give you SSH access to the render farm:

```bash
aws ec2 create-key-pair --key-name <key-name>
```
7. Change the value of the `key_pair_name` variable in `package/config.py` to your value for `<key-name>` in the previous step:
9. Change the value of the `key_pair_name` variable in `package/config.py` to your value for `<key-name>` in the previous step:

**Note:** Save the value of the `"KeyMaterial"` field as a file in a secure location. This is your private key that you can use to SSH into the render farm.

```python
self.key_pair_name: Optional[str] = '<your key pair name>'
```
8. Choose the type of database you would like to deploy (AWS DocumentDB or MongoDB).
10. Choose the type of database you would like to deploy (AWS DocumentDB or MongoDB).
If you would like to use MongoDB, you will need to accept the Mongo SSPL (see next step).
Once you've decided on a database type, change the value of the `deploy_mongo_db` variable in `package/config.py` accordingly:
```python
# True = MongoDB, False = Amazon DocumentDB
self.deploy_mongo_db: bool = False
```
9. If you set `deploy_mongo_db` to `True`, then you must accept the [SSPL license](https://www.mongodb.com/licensing/server-side-public-license) to successfully deploy MongoDB. To do so, change the value of `accept_sspl_license` in `package/config.py`:
11. If you set `deploy_mongo_db` to `True`, then you must accept the [SSPL license](https://www.mongodb.com/licensing/server-side-public-license) to successfully deploy MongoDB. To do so, change the value of `accept_sspl_license` in `package/config.py`:
```python
# To accept the MongoDB SSPL, change from USER_REJECTS_SSPL to USER_ACCEPTS_SSPL
self.accept_sspl_license: MongoDbSsplLicenseAcceptance = MongoDbSsplLicenseAcceptance.USER_REJECTS_SSPL
```
10. Stage the Docker recipes for `RenderQueue` and `UBLLicensing`:
12. Stage the Docker recipes for `RenderQueue` and `UBLLicensing`:
```bash
# Set this value to the version of RFDK your application targets
Expand All @@ -94,7 +109,7 @@ These instructions assume that your working directory is `examples/deadline/All-
--dockerRecipesURI s3://thinkbox-installers/DeadlineDocker/${RFDK_DEADLINE_VERSION}/DeadlineDocker-${RFDK_DEADLINE_VERSION}.tar.gz \
--output stage
```
11. Deploy all the stacks in the sample app:
12. Deploy all the stacks in the sample app:
```bash
cdk deploy "*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ def __init__(self, scope: Construct, stack_id: str, *, props: ServiceTierProps,
self,
'Repository',
vpc=props.vpc,
version=recipes.version,
database=props.database,
file_system=props.file_system,
repository_installation_timeout=Duration.minutes(20)
repository_installation_timeout=Duration.minutes(20),
version=recipes.version,
)

server_cert = X509CertificatePem(
Expand All @@ -142,7 +142,6 @@ def __init__(self, scope: Construct, stack_id: str, *, props: ServiceTierProps,
self,
'RenderQueue',
vpc=props.vpc,
version=recipes.version,
images=recipes.render_queue_images,
repository=repository,
hostname=RenderQueueHostNameProps(
Expand All @@ -155,6 +154,7 @@ def __init__(self, scope: Construct, stack_id: str, *, props: ServiceTierProps,
),
internal_protocol=ApplicationProtocol.HTTPS
),
version=recipes.version,
# TODO - Evaluate deletion protection for your own needs. This is set to false to
# cleanly remove everything when this stack is destroyed. If you would like to ensure
# that this resource is not accidentally deleted, you should set this to true.
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.70.0",
"aws-rfdk==0.18.1"
"aws-cdk.core==1.72.0",
"aws-rfdk==0.20.0"
],

python_requires=">=3.7",
Expand Down
39 changes: 24 additions & 15 deletions examples/deadline/All-In-AWS-Infrastructure-Basic/ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ These instructions assume that your working directory is `examples/deadline/All-

---

1. Install the dependencies of the sample app:
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 npm from npmjs. 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 and using the `aws-rfdk` from your local repository.
2. Install the dependencies of the sample app:

```
yarn install
```
2. Change the value in the `deadlineClientLinuxAmiMap` variable in `bin/config.ts` to include the region + AMI ID mapping of your EC2 AMI(s) with Deadline Worker.
3. Change the value in the `deadlineClientLinuxAmiMap` variable in `bin/config.ts` to include the region + AMI ID mapping of your EC2 AMI(s) with Deadline Worker.

```ts
// For example, in the us-west-2 region
Expand All @@ -26,17 +27,17 @@ These instructions assume that your working directory is `examples/deadline/All-
// ...
};
```
3. Create a binary secret in [SecretsManager](https://aws.amazon.com/secrets-manager/) that contains your [Usage-Based Licensing](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/aws-portal/licensing-setup.html?highlight=usage%20based%20licensing) certificates in a `.zip` file:
4. Create a binary secret in [SecretsManager](https://aws.amazon.com/secrets-manager/) that contains your [Usage-Based Licensing](https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/aws-portal/licensing-setup.html?highlight=usage%20based%20licensing) certificates in a `.zip` file:

```
aws secretsmanager create-secret --name <name> --secret-binary fileb://<path-to-zip-file>
```
4. The output from the previous step will contain the secret's ARN. Change the value of the `ublCertificatesSecretArn` variable in `bin/config.ts` to the secret's ARN:
5. The output from the previous step will contain the secret's ARN. Change the value of the `ublCertificatesSecretArn` variable in `bin/config.ts` to the secret's ARN:

```ts
public readonly ublCertificatesSecretArn: string = '<your-secret-arn>';
```
5. Choose your UBL limits and change the value of the `ublLicenses` variable in `bin/config.ts` accordingly. For example:
6. Choose your UBL limits and change the value of the `ublLicenses` variable in `bin/config.ts` accordingly. For example:

```ts
public readonly ublLicenses: UsageBasedLicense[] = [
Expand All @@ -55,48 +56,56 @@ These instructions assume that your working directory is `examples/deadline/All-
**Note:** The next two steps are optional. You may skip these if you do not need SSH access into your render farm.

---
6. Create an EC2 key pair to give you SSH access to the render farm:
7. Create an EC2 key pair to give you SSH access to the render farm:

```
aws ec2 create-key-pair --key-name <key-name>
```
7. Change the value of the `keyPairName` variable in `bin/config.ts` to your value for `<key-name>` in the previous step:
8. Change the value of the `keyPairName` variable in `bin/config.ts` to your value for `<key-name>` in the previous step:

**Note:** Save the value of the `"KeyMaterial"` field as a file in a secure location. This is your private key that you can use to SSH into the render farm.

```ts
public readonly keyPairName: string = '<key-name>';
```
8. Choose the type of database you would like to deploy (AWS DocumentDB or MongoDB).
9. Choose the type of database you would like to deploy (AWS DocumentDB or MongoDB).
If you would like to use MongoDB, you will need to accept the Mongo SSPL (see next step).
Once you've decided on a database type, change the value of the `deployMongoDB` variable in `bin/config.ts` accordingly:

```ts
// true = MongoDB, false = Amazon DocumentDB
public readonly deployMongoDB: boolean = false;
```
9. If you set `deployMongoDB` to `true`, then you must accept the [SSPL license](https://www.mongodb.com/licensing/server-side-public-license) to successfully deploy MongoDB. To do so, change the value of `acceptSsplLicense` in `bin/config.ts`:
10. If you set `deployMongoDB` to `true`, then you must accept the [SSPL license](https://www.mongodb.com/licensing/server-side-public-license) to successfully deploy MongoDB. To do so, change the value of `acceptSsplLicense` in `bin/config.ts`:

```ts
// To accept the MongoDB SSPL, change from USER_REJECTS_SSPL to USER_ACCEPTS_SSPL
public readonly acceptSsplLicense: MongoDbSsplLicenseAcceptance = MongoDbSsplLicenseAcceptance.USER_REJECTS_SSPL;
```
10. Modify the `deadline_ver` field in the `config` block of `package.json` as desired (Deadline 10.1.9 and up are supported), then stage the Docker recipes for `RenderQueue` and `UBLLicensing`:
11. Modify the `deadline_ver` field in the `config` block of `package.json` as desired (Deadline 10.1.9 and up are supported), then stage the Docker recipes for `RenderQueue` and `UBLLicensing`:

```
yarn stage
```
11. Build the sample app:

```
12. Build the `aws-rfdk` package, and then build the sample app. There is some magic in the way yarn workspaces and lerna packages work that will link the built `aws-rfdk` from the base directory as the dependency to be used in the example's directory:
```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
yarn build
```
12. Deploy all the stacks in the sample app:
13. Deploy all the stacks in the sample app:

```
cdk deploy "*"
```
13. Once you are finished with the sample app, you can tear it down by running:
14. Once you are finished with the sample app, you can tear it down by running:

```
cdk destroy "*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
IPrivateHostedZone,
} from '@aws-cdk/aws-route53';
import * as cdk from '@aws-cdk/core';
import {
import {
IMountableLinuxFilesystem,
X509CertificatePem,
} from 'aws-rfdk';
Expand All @@ -30,8 +30,8 @@ import {
UsageBasedLicense,
UsageBasedLicensing,
} from 'aws-rfdk/deadline';
import {
Secret
import {
Secret,
} from '@aws-cdk/aws-secretsmanager';
import { Duration } from '@aws-cdk/core';

Expand Down Expand Up @@ -150,7 +150,6 @@ export class ServiceTier extends cdk.Stack {
});
this.renderQueue = new RenderQueue(this, 'RenderQueue', {
vpc: props.vpc,
version: recipes.version,
images: recipes.renderQueueImages,
repository: repository,
hostname: {
Expand All @@ -163,14 +162,15 @@ export class ServiceTier extends cdk.Stack {
},
internalProtocol: ApplicationProtocol.HTTPS,
},
version: recipes.version,
// TODO - Evaluate deletion protection for your own needs. This is set to false to
// cleanly remove everything when this stack is destroyed. If you would like to ensure
// that this resource is not accidentally deleted, you should set this to true.
deletionProtection: false,
});
this.renderQueue.connections.allowDefaultPortFrom(this.bastion);

const ublCertSecret = Secret.fromSecretArn(this, 'UBLCertsSecret', props.ublCertsSecretArn);
const ublCertSecret = Secret.fromSecretArn(this, 'UBLCertsSecret', props.ublCertsSecretArn);
this.ublLicensing = new UsageBasedLicensing(this, 'UBLLicensing', {
vpc: props.vpc,
images: recipes.ublImages,
Expand Down
Loading

0 comments on commit 58e909f

Please sign in to comment.