Skip to content

DUPLO-42774 Enable the Amazon Linux 2023 Packer builders - #44

Open
duplodavid wants to merge 1 commit into
masterfrom
DUPLO-42774
Open

DUPLO-42774 Enable the Amazon Linux 2023 Packer builders#44
duplodavid wants to merge 1 commit into
masterfrom
DUPLO-42774

Conversation

@duplodavid

@duplodavid duplodavid commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

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_builders scoped to a subset replaces every Docker-Duplo* row in BuiltInNativeImages.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:

  • Builds Amazon Linux 2023 images for x86_64 and arm64, from a new AgentAmazonLinux2023/Setup.sh that installs the agent into a Python 3 venv on dnf
  • Sources the AL2023 base AMI from the plain al2023-ami-2023.* family, leaving out the ECS-optimized and minimal variants that the wider al2023-ami-* pattern also matches
  • Merges BuiltInNativeImages.json by row name, so a scoped build replaces only the rows it rebuilt and leaves the rest in place
  • Runs the GCP credential step only when only_builders names a googlecompute builder, and treats an empty only_builders the same as all instead of letting it reach Packer with no filter
  • Runs the Amazon Linux OS-update step on the Amazon Linux 2 arm64 builder, which had listed only x86_64
  • Pins every third-party action to a commit SHA, and moves the commercial AWS role step to OIDC

Testing performed

  • Using unit tests
  • Manually, on my local system
  • Manually, on a remote test system
  • Added screenshots of test cases - API changes only

Describe any breaking changes

  • None

@duplodavid
duplodavid requested review from jeeva-duplo and zafarabbas and removed request for jeeva-duplo and zafarabbas July 28, 2026 22:49
Comment thread AgentAmazonLinux2023/Setup.sh Fixed
@duplodavid duplodavid changed the title DUPLO-42774 Update GitHub Actions workflows and add NetworkAgent files for Amazon Linux 2023 DUPLO-42774 Enable the Amazon Linux 2023 Packer builders Aug 19, 2026
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.
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants