You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ppg-packer): extend AMI factory to Rocky Linux 8/9/10
- Generalize the refresh template (oracle-linux.pkr.hcl -> refresh.pkr.hcl)
with an os dimension (oraclelinux|rocky) threaded through tags, AMI names,
the SSH login user, and the lineage source filter
- Add a seed path (-var seed=true) sourcing the official Rocky community
AMIs (include_deprecated covers the frozen Rocky 8) to root each lineage
once per combo
- Make validate.sh and the smoke template distro-aware (/etc/rocky-release,
powertools/crb vs ol*_codeready_builder, rocky vs ec2-user login)
- Rename the workflow to ppg-ami-factory.yml, add an os matrix dimension and
a pull_request trigger for the no-AWS check job; default combos stay
OL-only until the Rocky seeds are promoted
- Thread os through the justfile (validate/build/bake/all/latest, os-aware
prune sweeps) and add seed-rocky + ci-seed-rocky recipes
Copy file name to clipboardExpand all lines: ppg/packer/README.md
+34-13Lines changed: 34 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
-
# PPG Oracle Linux AMI factory
1
+
# PPG EL AMI factory (Oracle Linux + Rocky Linux)
2
2
3
-
Builds the Oracle Linux package-test target AMIs that PG release testing runs
4
-
against, so we stop hand-maintaining them (launch base, `dnf update`, snapshot).
3
+
Builds the Oracle Linux and Rocky Linux package-test target AMIs that PG release
4
+
testing runs against, so we stop hand-maintaining them (launch base,
5
+
`dnf update`, snapshot).
5
6
6
7
## Why this exists
7
8
8
-
There is no off-the-shelf AWS image that is all of: genuine Oracle Linux,
9
-
OL8/OL9/OL10, x86_64 **and** arm64, free of software fees, and maintained.
9
+
**Oracle Linux**: there is no off-the-shelf AWS image that is all of: genuine
10
+
Oracle Linux, OL8/OL9/OL10, x86_64 **and** arm64, free of software fees, and
11
+
maintained.
10
12
11
13
- Oracle stopped publishing official AWS AMIs. The newest public Oracle images
12
14
(owner `131827586825`) are OL8.9 / OL9.3 from Feb 2024 and were all deprecated
@@ -17,6 +19,16 @@ OL8/OL9/OL10, x86_64 **and** arm64, free of software fees, and maintained.
17
19
- AlmaLinux is free + current + both-arch, but it is an EL clone, fine as
18
20
supplemental smoke coverage, not a replacement for the Oracle Linux gate.
19
21
22
+
**Rocky Linux**: official community AMIs exist (owner `792107900819`, no fees,
23
+
no product codes), but upstream stopped publishing Rocky 8 images at
24
+
`8.10-20240528` and AWS auto-deprecated them in 2026, so the previously
25
+
hand-pinned Rocky 8 AMI aged two years of errata into every molecule run. The
26
+
factory seeds each Rocky lineage once from the official AMI, then refreshes it
27
+
weekly like OL, which keeps Rocky 8 current even though upstream no longer
28
+
ships it. The official 10 GiB roots restore fine onto the factory's
29
+
`var.volume_size` (EBS only refuses to shrink), so Rocky needs no
30
+
bootstrap/re-image machinery.
31
+
20
32
So we bake our own, on a schedule, in the CI build account (eu-central-1). The
21
33
same Packer templates + scripts run whether driven locally (`justfile`) or by the
22
34
GitHub Actions workflow. Builds connect over AWS Session Manager (no inbound SSH)
@@ -26,7 +38,8 @@ and authenticate via GitHub OIDC (no static keys).
26
38
27
39
| Path | Covers | Mechanism |
28
40
|------|--------|-----------|
29
-
|**Refresh** (`oracle-linux.pkr.hcl`) | OL8, OL9, OL10 (x86_64 + arm64) |`amazon-ebs`: launch the latest self-owned base of the same major+arch, `dnf update`, validate (fail-closed), snapshot. Each build's output is the next build's source. |
41
+
|**Refresh** (`refresh.pkr.hcl`) | OL + Rocky 8/9/10 (x86_64 + arm64) |`amazon-ebs`: launch the latest self-owned base of the same os+major+arch, `dnf update`, validate (fail-closed), snapshot. Each build's output is the next build's source. |
42
+
|**Seed** (`refresh.pkr.hcl -var seed=true`) | Rocky lineage roots, one-time per combo | Same bake, but sourced from the official Rocky community AMI (`include_deprecated` covers the frozen Rocky 8). Promoted seeds become the refresh lineage. |
30
43
|**Bootstrap** (`scripts/bootstrap-ol10.sh`) | OL10 lineage root, one-time per arch | Import Oracle's official OL10 cloud image (arm64 `*-kvm-cloud-*.qcow2`, x86_64 `*-aws-*.vmdk`) via `aws ec2 import-snapshot`, register the raw base, then `packer build bootstrap/finalize-ol10.pkr.hcl` (adds `ec2-user` + `amazon-ssm-agent` + `dnf update`). Needed because Oracle ships no OL10 AWS AMI. Promotes to a `prebase` role: Oracle's full-size root cannot launch on `var.volume_size`, so `reimage-ol10` shrinks it before it becomes the consumed base. Idempotent. |
31
44
|**Re-image** (`scripts/reimage-ol10.sh`) | OL10 root shrink, one-time per arch | Copy the current base's root onto a fresh `var.volume_size` GiB volume on a builder, snapshot + register, then `reimage-ol10-verify` boot-tests two sizes + smoke + size-gate + promote. Needed because EBS cannot restore a volume below its source snapshot and XFS cannot shrink in place. Full internals (`dd` /boot, LVM-to-plain, the gates): [docs/reimage.md](docs/reimage.md). |
32
45
@@ -35,24 +48,30 @@ and authenticate via GitHub OIDC (no static keys).
35
48
```bash
36
49
export AWS_PROFILE=percona-dev-admin
37
50
just check # fmt-check + validate every combo (no AWS)
38
-
just bake 9 x86_64 # build + smoke + promote one combo
51
+
just bake 9 x86_64 # build + smoke + promote one OL combo
52
+
just bake 9 x86_64 prod rocky # same for a seeded Rocky combo
0 commit comments