Skip to content

images: curated and full EC2 toolsets, from GitHub's runner images - #151

Merged
linyiru merged 6 commits into
mainfrom
feat/ec2-curated-toolset
Nov 4, 2026
Merged

linyiru merged 6 commits into
mainfrom
feat/ec2-curated-toolset

Conversation

@linyiru

@linyiru linyiru commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

build-ec2-ami.sh --toolset runs a pinned actions/runner-images release's installers in its Packer template's order. full takes 44 GiB; curated takes 18 GiB, and four public workloads took the same time on both. Jobs on these images run as runner with sudo, as on GitHub's.

Stacked on the boot tuning PR.

Closes #145

The EC2 image had no compiler, make or unzip, so changing runs-on was not
enough for a workflow written for ubuntu-latest.

build-ec2-ami.sh --toolset runs the installers of a pinned actions/runner-images
release, in the order its Packer template lists them. A full image took 44 GiB,
and four public workloads read 3.5% of it. curated keeps the latest version of
most tools and the defaults that system paths link to, in 18 GiB, and those
workloads took the same time on both. Its trims follow
runs-on/runner-images-for-aws.

Jobs on these images run as "runner" with sudo, as on GitHub's images. The boot
script now reads /etc/environment, after HOME, because PATH there holds
entries such as $HOME/.cargo/bin.

Closes #145

Signed-off-by: Yi-Ru Lin <deduce@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

ARM64 curated/full builds cannot complete with the pinned x64 tooling, and root-owned Miniconda prevents runner jobs from installing packages into the preinstalled base environment.

2 open issues
What changed in this PR

Adds curated and full EC2 toolsets using a pinned GitHub runner-images release, improving compatibility with workflows written for ubuntu-latest while retaining the minimal image as the default.

Changes:

  • Adds toolset selection and ordered upstream installer execution, with trimming for curated images.
  • Runs jobs as runner with sudo on expanded images and loads tool environment settings.
  • Adds documentation, shell tests, VM checks, and CI integration.
File Description
scripts/​check.sh Adds toolset tests and shell checks.
images/​test-runner-images.sh Tests curated toolset trimming.
images/​test-ec2-vm.sh Adds toolset selection and job-environment checks.
images/​test-ec2-run.sh Tests loading tool environment settings.
images/​test-build-ec2-ami.sh Tests toolset rendering and validation.
images/​README.md Documents toolsets and build requirements.
images/​ec2/​provision.sh Installs expanded toolsets and configures the runner user.
images/​ec2/​install-runner-images.sh Runs pinned upstream installers and trims curated tools.
images/​build-ec2-ami.sh Adds toolset and upstream release options.
images/​assets/​firerunner-ec2-run.sh Selects the job user and loads tool paths.
.github/​workflows/​ci.yml Runs toolset tests in CI.

Review effort: Balanced

Comment thread images/build-ec2-ami.sh Resolved
Comment thread images/ec2/provision.sh Resolved
Answers an independent review as well:
- a job can write where setup actions and pipx install, as on GitHub's images;
- /etc/environment reaches only the runner's subshell, because its PATH holds
  directories a job can write, and this script powers off as root;
- zram's module follows the kernel the build upgraded to;
- arm64 is refused, because the installers come from the x64 toolset;
- a failed disk usage report no longer fails a finished build.

Signed-off-by: Yi-Ru Lin <deduce@gmail.com>
Base automatically changed from feat/ec2-boot-tuning to main November 4, 2026 17:30
Signed-off-by: Yi-Ru Lin <deduce@gmail.com>

# Conflicts:
#	images/test-ec2-vm.sh
The filter kept the first version and assumed the default was it, so a release
with another default would leave it dangling and fail the build.

Signed-off-by: Yi-Ru Lin <deduce@gmail.com>
It exported RUNNER_ALLOW_RUNASROOT and root's home before the choice of user, so
a job on a curated or full image ran as runner with root's settings around it.

Signed-off-by: Yi-Ru Lin <deduce@gmail.com>
The block separated "It launches" from the script it meant, and left a minimal
build's time and egress reading as true of every toolset.

Signed-off-by: Yi-Ru Lin <deduce@gmail.com>
@linyiru

linyiru commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

babysit-pr · head b96e574
Fixed: #151 (comment) — arm64 refused, bfcc3bf
Fixed: #151 (comment) — Miniconda writable by runner, bfcc3bf
Local review (subagent): 6b02a40..2d3f1b8 and ee4c3c2..a26d0be — adopted 4: Go's default, the root block a merge left behind, the boot script's header, the README's order. 2d3f1b8..b96e574 — none
CI: green on the previous head; running on this one

@linyiru
linyiru merged commit 12b3b01 into main Nov 4, 2026
7 checks passed
@linyiru
linyiru deleted the feat/ec2-curated-toolset branch November 4, 2026 18:01
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.

images: a full EC2 runner AMI aligned with GitHub's ubuntu-latest

2 participants