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

release.auto.pkvars.hcl refactor: creating 1 file per AMI platform #167

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

singholt
Copy link
Contributor

@singholt singholt commented Nov 15, 2023

Summary

This PR refactors the release.auto.pkrvars.hcl config.

This is auto-generated using the generate-release-vars.sh script. It sets dynamic values for things like the ami version, ecs agent version, source ami names, etc. ECS builds variants based off the AL1, AL2 and AL2023 platforms. Currently, all these platforms share the same release.auto.pkrvars.hcl configuration.

Currently, an ECS engineer runs thegenerate-release-vars.sh script manually, and does a PR to review the changes in release.auto.pkrvars.hcl config. With project Shinkansen, we're going to have a GitHub action run the script and generate the configuration.

Alongside the GH action automation, we'd also like each platform to have its own configuration. This would enable us to only build AMIs that have updates. ami_version is the unique key that dictates if a new AMI would be built. With this change, each platform gets its own unique ami_version.

Implementation details

  1. release.auto.pkrvars.hcl -> release-{platform}.auto.pkrvars.hcl

  2. updates to the Makefile to ensure that AMI build targets continue to work as expected.

  3. moved the following from release.auto.pkrvars.hcl to variables.pkr.hcl defaults:

    a. ecs_agent_version and ecs_init_rev
    b. docker_version and docker_version_al2023
    c. containerd_version and containerd_version_al2023
    

These variables would be treated no differently than other dependency like exec_ssm_version. An engineer would manually qualify and update the default values for the above in variables.pkr.hcl, outside of a Shinkansen release. If customers would like to use custom values, they can continue doing so using overrides.auto.pkrvars.hcl.

Testing

make al1, make al2, and make al2023 to ensure that AMI builds continue to work with the refactor.

New tests cover the changes: no

Description for the changelog

release.auto.pkvars.hcl refactor: creating 1 file per AMI platform

Licensing

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

@singholt singholt marked this pull request as ready for review November 15, 2023 19:19
@singholt singholt requested a review from a team November 15, 2023 19:20
@singholt singholt merged commit 35af16d into aws:feature/shinkansen Nov 16, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants