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(ec2): CloudFormation init for files, packages, sources, users, & groups #9664

Merged
merged 6 commits into from
Aug 17, 2020

Conversation

njlynch
Copy link
Contributor

@njlynch njlynch commented Aug 13, 2020

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

…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).
@njlynch njlynch requested a review from a team August 13, 2020 11:06
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 13, 2020
]),
config: new ec2.InitConfig([
// Create a JSON file from tokens (can also create other files)
ec2.InitFile.fromObject('/etc/stack.json', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading this I'm regretting this not being ec2.InitElement.fileFromObject(...).

Although even reading that I'm not sure it would be better. Augh!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing like 6 weeks without seeing a piece of code to bring a new perspective (although not necessarily enlightenment). :D

@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Aug 13, 2020
Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with label to give other people an opportunity to chime in.

njlynch added a commit that referenced this pull request Aug 13, 2020
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.
@njlynch
Copy link
Contributor Author

njlynch commented Aug 14, 2020

Approving with label to give other people an opportunity to chime in.

Will remove the label on Monday unless there are further comments.

@njlynch njlynch removed the pr/do-not-merge This PR should not be merged at this time. label Aug 17, 2020
@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2020

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).

@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2020

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 21b44c1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2020

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).

@mergify mergify bot merged commit d6c44e8 into master Aug 17, 2020
@mergify mergify bot deleted the njlynch/cfn-init-elements branch August 17, 2020 11:06
mergify bot pushed a commit that referenced this pull request Oct 28, 2020
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*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants