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

Allow subnet selection for RenderQueue's ALB #263

Closed
1 of 2 tasks
ddneilson opened this issue Dec 8, 2020 · 2 comments · Fixed by #264
Closed
1 of 2 tasks

Allow subnet selection for RenderQueue's ALB #263

ddneilson opened this issue Dec 8, 2020 · 2 comments · Fixed by #264
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@ddneilson
Copy link
Contributor

The ask is for the ability to control which subnets the RenderQueue will deploy its ALB(s) into.

Use Case

When deploying into a Local Zone (ex: the LA Local Zone), the Local Zone is actually a part of a greater region (us-west-2 in the case of the LA zone). An ALB cannot be deployed into subnets that are both in the region and in the local zone. So, to support local zones we need the ability for the user to select which subnets the ALB will be created within (either entirely in the LZ or entirely in the regular Region AZs).

Proposed Solution

Adding a vpcAlbSubnets property to the RenderQueue props.

Other

N/A

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@ddneilson ddneilson added needs-triage This issue or PR still needs to be triaged. feature-request A feature should be added or improved. labels Dec 8, 2020
@alcousins
Copy link

I hit an issue with deploying RFDK's initial tutorial in a pre-existing VPC which has 3x3 subnets.

The RenderQueue ALB was unable to deploy in this configuration because of multiple subnets in the same AZ.

I was able to patch RFDK with the above pull request and leverage it to resolve the issue by specifying the AZs using a vpc.selectSubnets() call.. e.g.:

const vpcid = this.node.tryGetContext('vpcid');
const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
            vpcId: vpcid
        });
const vpcsubnets = vpc.selectSubnets({ subnetGroupName: 'private', onePerAz: true });

...

const renderQueue = new deadline.RenderQueue(this, 'RenderQueue', {
            vpc,
            vpcSubnets: vpcsubnets,
            vpcAlbSubnets: vpcsubnets,
            repository,
            version: serverRecipes.version,
            images: serverRecipes.renderQueueImages,
            deletionProtection: false,
});

@ddneilson
Copy link
Contributor Author

I hit an issue with deploying RFDK's initial tutorial in a pre-existing VPC which has 3x3 subnets.

The RenderQueue ALB was unable to deploy in this configuration because of multiple subnets in the same AZ.

I was able to patch RFDK with the above pull request and leverage it to resolve the issue by specifying the AZs using a vpc.selectSubnets() call.. e.g.:

const vpcid = this.node.tryGetContext('vpcid');
const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
            vpcId: vpcid
        });
const vpcsubnets = vpc.selectSubnets({ subnetGroupName: 'private', onePerAz: true });

...

const renderQueue = new deadline.RenderQueue(this, 'RenderQueue', {
            vpc,
            vpcSubnets: vpcsubnets,
            vpcAlbSubnets: vpcsubnets,
            repository,
            version: serverRecipes.version,
            images: serverRecipes.renderQueueImages,
            deletionProtection: false,
});

Thanks for letting us know, Al. I'll update the linked PR to limit the RFDK to a single subnet per AZ as well. That should eliminate the need for your workaround in the default case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants