Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deadline): configure identity registration settings for deadline clients #576

Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions packages/aws-rfdk/lib/core/lib/deployment-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import {
UpdatePolicy,
} from '@aws-cdk/aws-autoscaling';
import {
AmazonLinuxImage,
Connections,
IConnectable,
IMachineImage,
InstanceClass,
InstanceSize,
InstanceType,
IVpc,
MachineImage,
SubnetSelection,
SubnetType,
} from '@aws-cdk/aws-ec2';
Expand Down Expand Up @@ -46,7 +46,12 @@ import { tagConstruct } from './runtime-info';
*/
export interface DeploymentInstanceProps {
/**
* The time CloudFormation should wait for the success signals before failing the create/update.
* The VPC that the instance should be launched in.
*/
readonly vpc: IVpc;

/**
* The amount of time that CloudFormation should wait for the success signals before failing the create/update.
*
* @default 15 minutes
*/
Expand Down Expand Up @@ -74,8 +79,9 @@ export interface DeploymentInstanceProps {
readonly logGroupName?: string;

/**
* Properties for setting up the Deadline DeploymentInstance's LogGroup in CloudWatch
* @default - LogGroup will be created with all properties' default values to the LogGroup: /renderfarm/<construct id>
* Properties for setting up the DeploymentInstance's LogGroup in CloudWatch
*
* @default the LogGroup will be created with all properties' default values to the LogGroup: /renderfarm/<construct id>
*/
readonly logGroupProps?: LogGroupFactoryProps;

Expand All @@ -93,11 +99,6 @@ export interface DeploymentInstanceProps {
*/
readonly selfTerminate?: boolean;

/**
* The VPC that the instance should be launched in.
*/
readonly vpc: IVpc;

/**
* The subnets to deploy the instance to
*
Expand Down Expand Up @@ -163,7 +164,7 @@ export class DeploymentInstance extends Construct implements IScriptHost, IConne
this.asg = new AutoScalingGroup(this, 'ASG', {
instanceType: props.instanceType ?? InstanceType.of(InstanceClass.T3, InstanceSize.SMALL),
keyName: props.keyName,
machineImage: props.machineImage ?? new AmazonLinuxImage(),
machineImage: props.machineImage ?? MachineImage.latestAmazonLinux(),
vpc: props.vpc,
vpcSubnets: props.vpcSubnets ?? {
subnetType: SubnetType.PRIVATE,
Expand Down Expand Up @@ -202,14 +203,23 @@ export class DeploymentInstance extends Construct implements IScriptHost, IConne
}
}

/**
* @inheritdoc
*/
public get osType() {
jericht marked this conversation as resolved.
Show resolved Hide resolved
return this.asg.osType;
}

/**
* @inheritdoc
*/
public get userData() {
return this.asg.userData;
}

/**
* @inheritdoc
*/
public get grantPrincipal() {
return this.asg.grantPrincipal;
}
Expand All @@ -221,6 +231,8 @@ export class DeploymentInstance extends Construct implements IScriptHost, IConne
* - The cloud-init log
*
* @param asg The auto-scaling group
* @param groupName The name of the Log Group, or suffix of the Log Group if `logGroupProps.logGroupPrefix` is
* specified
* @param logGroupProps The properties for LogGroupFactory to create or fetch the log group
jericht marked this conversation as resolved.
Show resolved Hide resolved
*/
private configureCloudWatchAgent(asg: AutoScalingGroup, groupName: string, logGroupProps?: LogGroupFactoryProps) {
Expand Down
Loading