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

Modify generate-release-vars.sh to include ecs init, docker, and containerd versions similar to previous release vars #173

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

hozkaya2000
Copy link
Contributor

@hozkaya2000 hozkaya2000 commented Nov 29, 2023

Summary

After the previous PRs for modifying generate-release-vars.sh and release files structure to change only specific AMIs release files, including information of dependency versions such as ECS Init, Docker, Containerd, ExecSSM was deemed useful in the release files. Therefore, the script has been updated to reflect this decision.

The reason including these dependencies are useful is to check whether any of these dependencies have been updated since the last release. Since the Agent Team will update the values of these dependencies in the variables.pkr.hcl file, the ./generate-release-vars.sh script will pull and update the release variables files. If there is a change in these dependencies from the previous release file, that means that the agent team has changed one of the dependency versions from last time, indicating the need for an update. The generate config action will pick up on this change and realize that a release is necessary, and kick it off.

Note that this script is modifying the template of the release-{ami_type}.auto.pkrvars.hcl files, since they were not modified to consider this use case before.

Implementation details

Add extraction of versions from the default values in the variables.pkr.hcl file, and use the extracted versions in the update of release-{ami_type}.auto.pkrvars.hcl file.

Testing

The script was run for each type of AMI locallly, successfully modifying each file as desired, and extracting the correct version from the variables.pkr.hcl file. The variables.pkr.hcl file was modified to exaggerate these differences and see them reflected at test time.

Other than that, here is the output of three test runs today:
Note that the version is automatically given as today, but these changes will NOT be pushed unless anything EXCEPT the ami_version has changed. This is implemented in the GenerateConfig Github Action.

./generate-release-vars.sh al1

ami_version        = "20231130"
ecs_version_al1    = "1.51.0"
docker_version_al1 = "20.10.13"
exec_ssm_version   = "3.2.1630.0"
source_ami_al1     = "amzn-ami-minimal-hvm-2018.03.0.20231106.0-x86_64-ebs"

./generate-release-vars.sh al2

ami_version                   = "20231130"
ecs_agent_version             = "1.79.0"
ecs_init_rev                  = "1"
docker_version                = "20.10.25"
containerd_version            = "1.6.19"
exec_ssm_version              = "3.2.1630.0"
source_ami_al2                = "amzn2-ami-minimal-hvm-2.0.20231116.0-x86_64-ebs"
source_ami_al2arm             = "amzn2-ami-minimal-hvm-2.0.20231116.0-arm64-ebs"
source_ami_al2kernel5dot10    = "amzn2-ami-minimal-hvm-2.0.20231116.0-x86_64-ebs"
source_ami_al2kernel5dot10arm = "amzn2-ami-minimal-hvm-2.0.20231116.0-arm64-ebs"

./generate-release-vars.sh al2023

ami_version                 = "20231130"
ecs_agent_version           = "1.79.0"
ecs_init_rev                = "1"
docker_version_al2023       = ""
containerd_version_al2023   = "1.6.19"
exec_ssm_version            = "3.2.1630.0"
source_ami_al2023           = "al2023-ami-minimal-2023.2.20231113.0-kernel-6.1-x86_64"
source_ami_al2023arm        = "al2023-ami-minimal-2023.2.20231113.0-kernel-6.1-arm64"
kernel_version_al2023       = "-kernel-6.1"
kernel_version_al2023arm    = "-kernel-6.1"
distribution_release_al2023 = "2023.2.20231113"

New tests cover the changes: yes

Description for the changelog

Include ECS Init, Docker, and Containerd versions in release files for each AMI type.

Licensing

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

@hozkaya2000 hozkaya2000 force-pushed the feature/shinkansen branch 2 times, most recently from a6756b0 to f4ce9f3 Compare November 30, 2023 18:21
…ainerd versions similar to previously existing release vars
@hozkaya2000 hozkaya2000 merged commit adac2ad into aws:feature/shinkansen Dec 1, 2023
2 checks passed
danehlim pushed a commit to danehlim/amazon-ecs-ami that referenced this pull request Feb 6, 2024
…ainerd versions similar to previously existing release vars (aws#173)
danehlim pushed a commit to danehlim/amazon-ecs-ami that referenced this pull request Feb 6, 2024
…ainerd versions similar to previously existing release vars (aws#173)
danehlim added a commit that referenced this pull request Feb 6, 2024
* Add action to push to codecommit mirror ripository

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

* Add script to check for security update of given ami (#165)

* Change generate-release-vars.sh to update specific release files (#169)

* Modify generate-release-vars.sh to include ecs init, docker, and containerd versions similar to previously existing release vars (#173)

* Add generateConfig action, updates to check-update-security and generate-release-vars.sh (#174)

* Modify generate-release-vars.sh to include ecs init, docker, and containerd versions similar to previously existing release vars

* Add generateConfig action, small updates to check-update-security

* Add security update install script in build recipe for al1 and al2 (#178)

* Remove unnecessary security update checks for al2023 (#186)

* Combine GenerateConfig and PushToCodeCommit actions under one action and add conditional kickoff (#187)

* Refactor generate release notes script for enhanced release process

---------

Co-authored-by: hozkaya2000 <[email protected]>
Co-authored-by: Anuj Singh <[email protected]>
Co-authored-by: hozkaya2000 <[email protected]>
rwarren25 pushed a commit to rwarren25/amazon-ecs-ami that referenced this pull request Jul 9, 2024
* Add action to push to codecommit mirror ripository

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

* Add script to check for security update of given ami (aws#165)

* Change generate-release-vars.sh to update specific release files (aws#169)

* Modify generate-release-vars.sh to include ecs init, docker, and containerd versions similar to previously existing release vars (aws#173)

* Add generateConfig action, updates to check-update-security and generate-release-vars.sh (aws#174)

* Modify generate-release-vars.sh to include ecs init, docker, and containerd versions similar to previously existing release vars

* Add generateConfig action, small updates to check-update-security

* Add security update install script in build recipe for al1 and al2 (aws#178)

* Remove unnecessary security update checks for al2023 (aws#186)

* Combine GenerateConfig and PushToCodeCommit actions under one action and add conditional kickoff (aws#187)

* Refactor generate release notes script for enhanced release process

---------

Co-authored-by: hozkaya2000 <[email protected]>
Co-authored-by: Anuj Singh <[email protected]>
Co-authored-by: hozkaya2000 <[email protected]>
rwarren25 pushed a commit to rwarren25/amazon-ecs-ami that referenced this pull request Jul 9, 2024
* Add action to push to codecommit mirror ripository

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

* Add script to check for security update of given ami (aws#165)

* Change generate-release-vars.sh to update specific release files (aws#169)

* Modify generate-release-vars.sh to include ecs init, docker, and containerd versions similar to previously existing release vars (aws#173)

* Add generateConfig action, updates to check-update-security and generate-release-vars.sh (aws#174)

* Modify generate-release-vars.sh to include ecs init, docker, and containerd versions similar to previously existing release vars

* Add generateConfig action, small updates to check-update-security

* Add security update install script in build recipe for al1 and al2 (aws#178)

* Remove unnecessary security update checks for al2023 (aws#186)

* Combine GenerateConfig and PushToCodeCommit actions under one action and add conditional kickoff (aws#187)

* Refactor generate release notes script for enhanced release process

---------

Co-authored-by: hozkaya2000 <[email protected]>
Co-authored-by: Anuj Singh <[email protected]>
Co-authored-by: hozkaya2000 <[email protected]>
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