Skip to content

Commit

Permalink
feat(core): add PadEfsStorage construct (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddneilson authored Mar 31, 2021
1 parent 901b749 commit c6334b6
Show file tree
Hide file tree
Showing 14 changed files with 1,541 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
MongoDbSsplLicenseAcceptance,
MongoDbVersion,
MountableEfs,
PadEfsStorage,
X509CertificatePem,
X509CertificatePkcs12
)
Expand Down Expand Up @@ -91,6 +92,34 @@ def __init__(self, scope: Construct, stack_id: str, *, props: StorageTierProps,
removal_policy=RemovalPolicy.DESTROY
)

# Add padding files to the filesystem to increase baseline throughput. Deadline's Repository filesystem
# is small (initial size of about 1GB), which results in a very low baseline throughput for the Amazon
# EFS filesystem. We add files to the filesystem to increase this baseline throughput, while retaining the
# ability to burst throughput. See RFDK's PadEfsStorage documentation for additional details.
pad_access_point = AccessPoint(
self,
'PaddingAccessPoint',
file_system=file_system,
path='/PaddingFiles',
# TODO - We set the padding files to be owned by root (uid/gid = 0) by default. You may wish to change this.
create_acl=Acl(
owner_gid='0',
owner_uid='0',
permissions='700',
),
posix_user=PosixUser(
uid='0',
gid='0',
),
)
PadEfsStorage(
self,
'PadEfsStorage',
vpc=props.vpc,
access_point=pad_access_point,
desired_padding_gb=40, # Provides 2 MB/s of baseline throughput. Costs $12/month.
)

# Create an EFS access point that is used to grant the Repository and RenderQueue with write access to the
# Deadline Repository directory in the EFS file-system.
access_point = AccessPoint(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
MongoDbSsplLicenseAcceptance,
MongoDbVersion,
MountableEfs,
PadEfsStorage,
X509CertificatePem,
X509CertificatePkcs12,
} from 'aws-rfdk';
Expand Down Expand Up @@ -74,6 +75,30 @@ export abstract class StorageTier extends cdk.Stack {
removalPolicy: RemovalPolicy.DESTROY,
});

// Add padding files to the filesystem to increase baseline throughput. Deadline's Repository filesystem
// is small (initial size of about 1GB), which results in a very low baseline throughput for the Amazon
// EFS filesystem. We add files to the filesystem to increase this baseline throughput, while retaining the
// ability to burst throughput. See RFDK's PadEfsStorage documentation for additional details.
const padAccessPoint = new AccessPoint(this, 'PaddingAccessPoint', {
fileSystem,
path: '/PaddingFiles',
// TODO - We set the padding files to be owned by root (uid/gid = 0) by default. You may wish to change this.
createAcl: {
ownerGid: '0',
ownerUid: '0',
permissions: '700',
},
posixUser: {
uid: '0',
gid: '0',
},
});
new PadEfsStorage(this, 'PadEfsStorage', {
vpc: props.vpc,
accessPoint: padAccessPoint,
desiredPaddingGB: 40, // Provides 2 MB/s of baseline throughput. Costs $12/month.
});

// Create an EFS access point that is used to grant the Repository and RenderQueue with write access to the Deadline
// Repository directory in the EFS file-system.
const accessPoint = new AccessPoint(this, 'AccessPoint', {
Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@aws-cdk/assets": "1.94.1",
"@aws-cdk/aws-apigateway": "1.94.1",
"@aws-cdk/aws-apigatewayv2": "1.94.1",
"@aws-cdk/aws-apigatewayv2-integrations": "1.94.1",
"@aws-cdk/aws-applicationautoscaling": "1.94.1",
"@aws-cdk/aws-autoscaling": "1.94.1",
"@aws-cdk/aws-autoscaling-common": "1.94.1",
Expand All @@ -44,6 +45,7 @@
"@aws-cdk/aws-codeguruprofiler": "1.94.1",
"@aws-cdk/aws-codepipeline": "1.94.1",
"@aws-cdk/aws-cognito": "1.94.1",
"@aws-cdk/aws-databrew": "1.94.1",
"@aws-cdk/aws-docdb": "1.94.1",
"@aws-cdk/aws-dynamodb": "1.94.1",
"@aws-cdk/aws-ec2": "1.94.1",
Expand All @@ -52,10 +54,13 @@
"@aws-cdk/aws-ecs": "1.94.1",
"@aws-cdk/aws-ecs-patterns": "1.94.1",
"@aws-cdk/aws-efs": "1.94.1",
"@aws-cdk/aws-eks": "1.94.1",
"@aws-cdk/aws-elasticloadbalancing": "1.94.1",
"@aws-cdk/aws-elasticloadbalancingv2": "1.94.1",
"@aws-cdk/aws-events": "1.94.1",
"@aws-cdk/aws-events-targets": "1.94.1",
"@aws-cdk/aws-globalaccelerator": "1.94.1",
"@aws-cdk/aws-glue": "1.94.1",
"@aws-cdk/aws-iam": "1.94.1",
"@aws-cdk/aws-kinesis": "1.94.1",
"@aws-cdk/aws-kinesisfirehose": "1.94.1",
Expand All @@ -69,15 +74,19 @@
"@aws-cdk/aws-sam": "1.94.1",
"@aws-cdk/aws-secretsmanager": "1.94.1",
"@aws-cdk/aws-servicediscovery": "1.94.1",
"@aws-cdk/aws-signer": "1.94.1",
"@aws-cdk/aws-sns": "1.94.1",
"@aws-cdk/aws-sns-subscriptions": "1.94.1",
"@aws-cdk/aws-sqs": "1.94.1",
"@aws-cdk/aws-ssm": "1.94.1",
"@aws-cdk/aws-stepfunctions": "1.94.1",
"@aws-cdk/aws-stepfunctions-tasks": "1.94.1",
"@aws-cdk/cloud-assembly-schema": "1.94.1",
"@aws-cdk/core": "1.94.1",
"@aws-cdk/custom-resources": "1.94.1",
"@aws-cdk/cx-api": "1.94.1",
"@aws-cdk/lambda-layer-awscli": "1.94.1",
"@aws-cdk/lambda-layer-kubectl": "1.94.1",
"@aws-cdk/region-info": "1.94.1",
"@types/jest": "^26.0.21",
"@types/node": "^14.14.35",
Expand Down
1 change: 1 addition & 0 deletions packages/aws-rfdk/lib/core/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export * from './mongodb-post-install';
export * from './mountable-ebs';
export * from './mountable-efs';
export * from './mountable-filesystem';
export * from './pad-efs-storage';
export { RFDK_VERSION } from './runtime-info';
export * from './script-assets';
export * from './session-manager-helper';
Expand Down
Loading

0 comments on commit c6334b6

Please sign in to comment.