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): add support for al2022 and amzn2 with kernel 5.x #18117

Merged
merged 11 commits into from
Jan 17, 2022

Conversation

robertd
Copy link
Contributor

@robertd robertd commented Dec 21, 2021

This PR is aimed to expand CDK ability to support al2022 and amzn2 with kernel 5.x

"/aws/service/ami-amazon-linux-latest/al2022-ami-kernel-5.10-arm64"
"/aws/service/ami-amazon-linux-latest/al2022-ami-minimal-kernel-5.10-arm64"
"/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2"
"/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-s3"
"/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-s3"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/al2022-ami-kernel-5.10-x86_64"
"/aws/service/ami-amazon-linux-latest/al2022-ami-minimal-kernel-5.10-x86_64"
"/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-pv-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-pv-x86_64-s3"
"/aws/service/ami-amazon-linux-latest/amzn-ami-pv-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn-ami-pv-x86_64-s3"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-arm64-gp2"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-gp2"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-arm64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-x86_64-ebs"

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Dec 21, 2021

@robertd robertd marked this pull request as draft December 21, 2021 17:04
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Dec 21, 2021
@robertd
Copy link
Contributor Author

robertd commented Dec 21, 2021

@njlynch I'd really appreciate your feedback when you get a chance. I still think this needs to be refactored. I'm not really happy with cleanliness of this PR. al2022 and amzn2 (kernel-5.10) ssm param entries are a bit different from other entries... i.e. missing storage and virtualization components, etc.

Just let me know what you think and I'll follow your lead. In the meantime, I've converted this PR to a draft.

@robertd
Copy link
Contributor Author

robertd commented Dec 21, 2021

Also, I'm planning on updating Readme.MD and probably adding more tests to cover all possible ssm linux parameters coming from /aws/service/ami-amazon-linux-latest path.

njlynch
njlynch previously requested changes Jan 6, 2022
Copy link
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

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

I think it looks good.

Re: a refactoring of sorts. I could potentially see creating an AmazonLinux2022Image class with less properties, but I'm not sure that's the right model. I think what you have makes as good sense as any a natural evolution of the existing model.

packages/@aws-cdk/aws-ec2/lib/machine-image.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-ec2/lib/machine-image.ts Outdated Show resolved Hide resolved
Co-authored-by: Nick Lynch <nlynch@amazon.com>
@mergify mergify bot dismissed njlynch’s stale review January 7, 2022 05:51

Pull request has been modified.

@robertd robertd marked this pull request as ready for review January 8, 2022 08:43
@robertd
Copy link
Contributor Author

robertd commented Jan 8, 2022

@njlynch let me know if you'd like to see more integration tests or other tests in general. Thanks!

Copy link
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

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

Great!

@mergify
Copy link
Contributor

mergify bot commented Jan 17, 2022

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: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: ed7ceb1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit 6b73d1d into aws:master Jan 17, 2022
@mergify
Copy link
Contributor

mergify bot commented Jan 17, 2022

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

@robertd robertd deleted the add-new-linux-amis branch January 17, 2022 21:28
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
This PR is aimed to expand CDK ability to support `al2022` and `amzn2` with kernel 5.x

```
"/aws/service/ami-amazon-linux-latest/al2022-ami-kernel-5.10-arm64"
"/aws/service/ami-amazon-linux-latest/al2022-ami-minimal-kernel-5.10-arm64"
"/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2"
"/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-s3"
"/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-s3"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/al2022-ami-kernel-5.10-x86_64"
"/aws/service/ami-amazon-linux-latest/al2022-ami-minimal-kernel-5.10-x86_64"
"/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-pv-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-pv-x86_64-s3"
"/aws/service/ami-amazon-linux-latest/amzn-ami-pv-x86_64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn-ami-pv-x86_64-s3"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-arm64-gp2"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-gp2"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-arm64-ebs"
"/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-x86_64-ebs"
```

----

*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
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants