-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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(batch): fargate support for jobs #13591
Conversation
166c998
to
3c4fd44
Compare
bef6f46
to
f3eadba
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@iliapolo review? |
@iliapolo should I close this PR? |
@kokachev No - I still have this on my radar. Would be good if you resolved the conflicts that arose in the meantime though :) |
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. Very clean and straight forward 👍
```ts | ||
const vpc = new ec2.Vpc(this, 'VPC'); | ||
|
||
const spotEnvironment = new batch.ComputeEnvironment(stack, 'MyFargateEnvironment', { |
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.
const spotEnvironment = new batch.ComputeEnvironment(stack, 'MyFargateEnvironment', { | |
const fargateSpotEnvironment = new batch.ComputeEnvironment(stack, 'MyFargateEnvironment', { |
/** | ||
* Resources will be Fargate resources. | ||
*/ | ||
FARGATE_SPOT = 'FARGATE_SPOT', |
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.
What does spot mean in the context of fargate? would be nice to have a sentence or two about it.
@@ -82,6 +82,164 @@ describe('Batch Compute Evironment', () => { | |||
}); | |||
}); | |||
}); | |||
describe('using fargate resources', () => { |
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.
We also need an integ test. Add a compute environment to https://github.com/aws/aws-cdk/blob/master/packages/@aws-cdk/aws-batch/test/integ.batch.ts#L30
This PR has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
will update the PR. |
Looking forward to being able to play with this :) |
@@ -458,6 +523,9 @@ export class JobDefinition extends Resource implements IJobDefinition { | |||
user: container.user, | |||
vcpus: container.vcpus || 1, | |||
volumes: container.volumes, | |||
fargatePlatformConfiguration: container.fargatePlatformConfiguration ? { |
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.
Sorry, my github-fu is weak. Not sure how to put a comment on code that isn't a part of the PR.
But above, when setting the resourceRequirements
, don't we need a way to pass those in for fargate?
resourceRequirements: container.gpuCount
? [{ type: 'GPU', value: String(container.gpuCount) }]
: undefined
Also, pretty sure that vcpus
needs to be not set
Looking forward to this PR being merged in 👍 ... just in time for what I'm working on. 😄 |
@iliapolo @brendonparker since it has been a little while since the author has responded, I've opened PR #15848 that responds to all of the feedback left on this MR in hopes that this will be brought to completion soon. A review as soon as you get a chance would be greatly appreciated. |
@DDynamic sweet 👍😊 |
Closing in favor of #15848 |
Added Fargate support for Batch jobs. Note: this is not entirely my work - most of it was done by @kokachev. It is an updated version of Fargate support for batch jobs based on the feedback left in #13591. - Doc fixes - Integration test addition - Network configuration for Fargate - Support `ResourceRequirements` for Fargate jobs - Other minor fixes revealed by integration test closes: #13590, #13591 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Added Fargate support for Batch jobs.
closes: #13590
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license