DUPLO-42774 Enable the Amazon Linux 2023 Packer builders - #44
Open
duplodavid wants to merge 1 commit into
Open
Conversation
duplodavid
requested review from
jeeva-duplo and
zafarabbas
and removed request for
jeeva-duplo and
zafarabbas
July 28, 2026 22:49
There was no Duplo Docker Native image for Amazon Linux 2023. The Packer sources for it were added commented out in 2024-02 and had never produced an image. - Enable the `amazonlinux-2023` and `amazonlinux-2023-arm64` sources, and add the matching build, OS-update, install, and cleanup provisioners. - Add `AgentAmazonLinux2023/Setup.sh`, which installs Docker and the agent from `dnf` into a Python 3 venv. It enables `NetworkAgent.service` without starting it, since starting the agent during the bake disrupts iptables and severs the session. - Install the agent dependencies in one `pip` call. Sequential installs let `botocore` downgrade `urllib3` to 1.26.x on the `boto3` call alone. - Pin the AL2023 source AMI to `al2023-ami-2023.*`. The wider `al2023-ami-*` also matches the ECS-optimized and minimal variants, and `most_recent` could select one of those. - Merge `BuiltInNativeImages.json` by `Name` rather than replacing every `Docker-Duplo*` row. A build scoped with `only_builders` was wiping the Amazon Linux 2, Ubuntu, and GovCloud rows it had not rebuilt. - Fail `gen-native-images.sh` on a builder name with no SSH username mapping. It previously reused the previous row's username. - Run the GCP credential step only when `only_builders` names a `googlecompute` builder, and treat an empty value the same as `all`. `all` passes `-except=googlecompute.*`, and an empty value reached Packer unfiltered and built every source. - Add `amazon-ebs.amazonlinux-2-arm64` to the Amazon Linux OS-update step, which had listed only the x86_64 builder. - Pin every third-party action to a commit SHA, bump `actions/checkout` to v7, `actions/upload-artifact` to v7, and `actions/download-artifact` to v8, and move the commercial AWS role step to OIDC. - Add `AgentAmazonLinux2023/README.md` and a CHANGELOG entry, and correct the README claim that `all` builds every image.
duplodavid
force-pushed
the
DUPLO-42774
branch
from
August 21, 2026 16:46
4ffd976 to
fc8053a
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Overview
DUPLO-42774
There is no Duplo Docker Native image for Amazon Linux 2023, because the Packer sources for it have sat commented out since 2024-02. Separately, running the build action with
only_buildersscoped to a subset replaces everyDocker-Duplo*row inBuiltInNativeImages.json, so the Amazon Linux 2, Ubuntu, and GovCloud rows that were not part of that build disappear.Summary of changes
This PR does the following:
AgentAmazonLinux2023/Setup.shthat installs the agent into a Python 3 venv ondnfal2023-ami-2023.*family, leaving out the ECS-optimized and minimal variants that the wideral2023-ami-*pattern also matchesBuiltInNativeImages.jsonby row name, so a scoped build replaces only the rows it rebuilt and leaves the rest in placeonly_buildersnames agooglecomputebuilder, and treats an emptyonly_buildersthe same asallinstead of letting it reach Packer with no filterTesting performed
Describe any breaking changes