-
Notifications
You must be signed in to change notification settings - Fork 4k
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(ec2): CloudFormation-init support #9065
Conversation
This is a prerequisite of #8788, where it will be used to add CfnInit metadata.
> NOTE: This is a reduced version of #8788, which is the full CloudFormation-init support. This has been reduced down to only support instances (not ASGs), and to only support the InitCommand and InitService init elements, rather than the full set. This is to reduce the PR size and encourage a more thorough review. A follow-up review will add the remainder of the elements and auto-scaling group support. Add CloudFormation-init support. The CloudFormation-init metadata is encapsulated in a CloudFormationInit object, and using it automatically renders the UserData to apply it and send a signal to the appropriate CloudFormation resource and adds the permissions required to use cfn-init, cfn-signal and any S3 files/assets to the instance role. On an Instance, using CloudFormation-init automatically adds a ResourceSignal with a default timeout to the instance.
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.
Reviewed cfn-init-template.ts
so far.... 😅
- Moving all bind-related methods and elements to be internal and not exported in the module. - Support for a "forever" wait duration. - Various documentation updates.
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.
Slowly but surely...
packages/@aws-cdk/aws-ec2/lib/private/cfn-init-elements-internal.ts
Outdated
Show resolved
Hide resolved
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.
Also the comments above.
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.
Ship this thingamabob!
Changes addressed (prepare() calls removed).
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…nd groups Cloudformation Init (cfn-init) support was introduced in #9065 with a minimal set of support for various init element types. This PR is a continuation of that support (based on the original #8788), and adds the remaining init element types: files, packages, sources, users, and groups. With this PR, CloudFormation init support for EC2 instances is complete. A final PR will be submitted to extend this support to auto-scaling groups (again, based on the original work done in #8788).
Introduces CloudFormation init (cfn-init) support for autoscaling groups. This builds on the previous work (#9065) and (#9664) that introduced init support for instances. This change also reworks the existing signaling functionality, as this becomes even more important with cfn-init. A final change was to adjust the (internal) interface of the `_attach` method to accept an `ec2.OperatingSystemType` instead of the internal-only `ec2.InitPlatform` type which wasn't exported and unavailable within the asg module. This change is also in the #9664 diff, as both are pending. Credit for 90% of this goes to @rix0rrr; all cfn-init support was pair- programmed, but the ASG stuff was much more heavily done by him.
… groups (#9664) Cloudformation Init (cfn-init) support was introduced in #9065 with a minimal set of support for various init element types. This PR is a continuation of that support (based on the original #8788), and adds the remaining init element types: files, packages, sources, users, and groups. With this PR, CloudFormation init support for EC2 instances is complete. A final PR will be submitted to extend this support to auto-scaling groups (again, based on the original work done in #8788). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Introduces CloudFormation init (cfn-init) support for autoscaling groups. This builds on the previous work (#9065) and (#9664) that introduced init support for instances. This change also reworks the existing signaling functionality, as this becomes even more important with cfn-init. A final change is to export the `CloudFormationInit._attach` method and related options. Credit for 90% of this goes to @rix0rrr; all cfn-init support was pair- programmed, but the ASG stuff was mostly him. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add CloudFormation-init support.
The CloudFormation-init metadata is encapsulated in a CloudFormationInit object,
and using it automatically renders the UserData to apply it and send a signal to
the appropriate CloudFormation resource and adds the permissions required to use
cfn-init, cfn-signal and any S3 files/assets to the instance role.
On an Instance, using CloudFormation-init automatically adds a ResourceSignal
with a default timeout to the instance.
Note this currently also includes the same changes as #9063, as this relies on it. #9063 can be independently shipped.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license