-
Notifications
You must be signed in to change notification settings - Fork 42
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): change SEP construct to use launch templates instead of launch specifications #513
Conversation
b350484
to
7323f60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How feasible would it be to prevent tying the Spot Event Plugin to the Launch Template version that was created and, instead, using the latest version of the Launch Template?
That would let users edit the Launch Template in the AWS Console rather than making their changes in their CDK application.
@gdday So Spot does support using a special value
Maybe there's a way to do this with a custom resource that would update that value via calling the appropriate AWS APIs though, I'll look into seeing what that would look like |
Right, I think you could do it via the describe-launch-templates API in Lambda. I don't know how much additional work that would be, but I do think that would be useful for customers. |
7323f60
to
9683e08
Compare
37da9cd
to
3b5a75a
Compare
d11f144
to
91994f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding support for $Latest. This will be very helpful for customers who want to quickly modify the Launch Template without having to redeploy.
This looks good to me, I don't see any issues!
@@ -522,51 +521,52 @@ export class ConfigureSpotEventPlugin extends Construct { | |||
* Each congiguration is a mapping between one Deadline Group and one Spot Fleet Request Configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You didn't change this but... congiguration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, thanks! Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great work, @jericht. The three primary concerns are:
- Move the launch template to be created in the
SpotEvenPluginFleet
if possible - Make sure the required tags are added to launch templates for the Deadline Resource Tracker to function properly
- Map each
SpotEventPluginFleet
subnet to an individualLaunchTemplateConfig
instead of passing an invalid comma-separated list of subnet IDs
Otherwise, there are a few minor semantic/polish suggestions.
examples/deadline/All-In-AWS-Infrastructure-SEP/python/package/config.py
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/deadline/test/configure-spot-event-plugin.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/conversion.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/conversion.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
c07ff41
to
d777283
Compare
@jusiskin @gdday I've retested this end-to-end and verified SEP is still working (as well as the Resource Tracker tags being applied to the spot instances). The CI build is failing because something is up with the CI runners that is causing an expected crash. I'll look into getting those fixed, but in the meantime this is ready for re-review |
d777283
to
c4503c3
Compare
eb195bc
to
44be32e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor suggestions here, but this is shaping up really nicely
examples/deadline/All-In-AWS-Infrastructure-SEP/python/package/app.py
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/conversion.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/test/handler.test.ts
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/deadline/test/configure-spot-event-plugin.test.ts
Outdated
Show resolved
Hide resolved
examples/deadline/All-In-AWS-Infrastructure-SEP/python/package/app.py
Outdated
Show resolved
Hide resolved
packages/aws-rfdk/lib/lambdas/nodejs/configure-spot-event-plugin/conversion.ts
Show resolved
Hide resolved
…of launch specifications BREAKING CHANGE: SpotEventPluginFleet now uses EC2 Launch Templates instead of Launch Specifications. See the [RFDK 0.39.x upgrade documentation](https://github.com/aws/aws-rfdk/blob/v0.39.0/packages/aws-rfdk/docs/upgrade/upgrading-0.39.md) for more details and guidance on how to upgrade.
44be32e
to
c86c5bd
Compare
@horsmand @jusiskin I also changed the initial commit message to have a BREAKING CHANGE section and added some upgrade documentation since old SFRs will be orphaned if users try to redeploy while they have active SFRs that don't use launch templates. I also did a final E2E test (deploy SEP example and render a cmd line job with SEP), so if everything looks good we can merge this in. |
c86c5bd
to
5d85d5d
Compare
Is there any easy way to preview the diagram? |
521fc2b
to
a8bd154
Compare
@horsmand Yep, you can click the rich diff button in the top right of the file panel for the svg files |
e66ec42
to
37a8355
Compare
37a8355
to
5b3a123
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! This will be a really great enhancement for RFDK users. Thanks for your hard work, @jericht
Notes
Refactors the code around the Spot Event Plugin construct to use Launch Templates instead of Launch Specifications.
Testing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license