Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0ac5222
tests: add standalone tailor image workspace
bfjelds Oct 10, 2026
6bd26b3
tests: point tailor workspace docs at tests/tailor-images
bfjelds Oct 10, 2026
ba41b72
tests/tailor-images: deduplicate files shared across image families
bfjelds Oct 10, 2026
17ded0e
tests/tailor-images: share the by-arch/arm64.yaml base override
bfjelds Oct 10, 2026
d1466cf
tests/tailor-images: add qcow2/vhd-fixed outputs for VM scenarios tha…
bfjelds Oct 10, 2026
ecabc7e
tests: name tailor outputs for legacy artifacts
bfjelds Oct 10, 2026
4b4261d
fix: split qemu grub-verity base and update layouts
bfjelds Oct 11, 2026
ed8a6ae
fix: restore executable bit on shell scripts lost during tailor migra…
bfjelds Oct 12, 2026
4fcb3e7
tests: fix tailor image-config review findings
bfjelds Oct 12, 2026
7958462
tests: fix additional tailor image-config review findings
bfjelds Oct 12, 2026
d1770fc
tests: drop outputs[].name overrides; fix arm64 qcow2, azure hostname…
bfjelds Oct 12, 2026
d9258ed
tests: restore legacy Azure disk layout, fix stale README paths
bfjelds Oct 13, 2026
5e69754
tests: add ./base to trident-testimage extraDependencies
bfjelds Oct 13, 2026
abd08d3
tests: restore missing trident.service override, fix README output paths
bfjelds Oct 13, 2026
1d53cf6
tests: explicitly disable trident-install on direct-streaming images
bfjelds Oct 13, 2026
3385f24
tests: restore missing root-verity qcow2 base-image output
bfjelds Oct 13, 2026
da2fb6f
tests: restore netplan on Azure update image, drop trident-service fr…
bfjelds Oct 13, 2026
97d6a08
tests: migrate trident-mos to the Tailor workspace
bfjelds Oct 13, 2026
a27f8cb
tests: fix trident-mos cache fingerprint, document it in the workspac…
bfjelds Oct 13, 2026
3cccd4b
docs: fix acl-agent-base.yaml comment about per-root paths
bfjelds Oct 13, 2026
2274099
docs: fix overlay-partition comment in trident-acl-agent-cert-install…
bfjelds Oct 13, 2026
85870e7
docs: fix stale README removal claim
bfjelds Oct 13, 2026
43af2c5
fix: restore executable bit on 3 IC postCustomization scripts
bfjelds Oct 13, 2026
4b7b0fa
fix: restore the Azure update image's 7G disk-size cap
bfjelds Oct 14, 2026
6e40419
tests: declare artifacts/rpm-overrides as an RPM source
bfjelds Oct 14, 2026
b6a3908
tests: declare artifacts/rpm-overrides for azurelinux-direct-streamin…
bfjelds Oct 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions tests/tailor-images/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Test images with tailor

`tests/tailor-images/` is a [tailor](../../tools/tailor/README.md) workspace.
It replaces the legacy `testimages.py` / `builder/` flow, which runs alongside it
for now and is removed in a follow-up cleanup PR.

## Build from the repo root

Use the in-tree tailor binary via Cargo:

```bash
cargo run --manifest-path tools/tailor/Cargo.toml -- --manifest tests/tailor-images/tailor.yaml matrix trident-installer --format json
```

Build examples:

```bash
# trident-testimage
cargo run --manifest-path tools/tailor/Cargo.toml -- --manifest tests/tailor-images/tailor.yaml build trident-testimage -s arch=amd64 --output-dir ./artifacts

# trident-testimage-arm64
cargo run --manifest-path tools/tailor/Cargo.toml -- --manifest tests/tailor-images/tailor.yaml build trident-testimage -s arch=arm64 --output-dir ./artifacts

# trident-direct-streaming-installer-arm64
cargo run --manifest-path tools/tailor/Cargo.toml -- --manifest tests/tailor-images/tailor.yaml build trident-installer -s arch=arm64 -s variant=direct-streaming --output-dir ./artifacts

# trident-container-usrverity-testimage (signed)
cargo run --manifest-path tools/tailor/Cargo.toml -- --manifest tests/tailor-images/tailor.yaml build trident-verity-testimage -s deployment=container -s mode=usr --output-dir ./artifacts
```

## Base images

The workspace uses a `baseImages:` catalogue in `tests/tailor-images/tailor.yaml`.
For the Azure Linux base slots you can materialize the defaults locally with:

```bash
cargo run --manifest-path tools/tailor/Cargo.toml -- --manifest tests/tailor-images/tailor.yaml bases download baremetal core_arm64 core_selinux qemu_guest
```

Verify that every referenced base file exists:

```bash
cargo run --manifest-path tools/tailor/Cargo.toml -- --manifest tests/tailor-images/tailor.yaml bases verify
```

Ubuntu / GB200 direct-streaming inputs still come from the pipeline-managed blob
staging flow; those slots are intentionally catalogued without an in-workspace
remote source.

## Image families

The current families are:

- `azl-installer`
- `azurelinux-direct-streaming-testimage`
- `foreign-direct-streaming-testimage`
- `trident-container-installer`
- `trident-container-testimage`
- `trident-functest`
- `trident-installer`
- `trident-mos`
- `trident-testimage`
Comment thread
bfjelds marked this conversation as resolved.
- `trident-verity-testimage`
- `trident-vm-testimage`
20 changes: 20 additions & 0 deletions tests/tailor-images/azl-installer/image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: azl-installer

base:
ref: baremetal

outputs:
- format: iso

rpmSources:
- ../../../bin/RPMS
- ../../../artifacts/rpm-overrides

extraDependencies:
- ./installer-iso.yaml
- ./mos
- ./iso
- ../common

config:
$include: ./installer-iso.yaml
95 changes: 95 additions & 0 deletions tests/tailor-images/azl-installer/installer-iso.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
storage:
bootType: efi

disks:
- partitionTableType: gpt
maxSize: 4G
partitions:
- id: esp
type: esp
size: 8M

- id: rootfs
size: grow

filesystems:
- deviceId: esp
type: fat32
mountPoint:
path: /boot/efi
options: umask=0077

- deviceId: rootfs
type: ext4
mountPoint:
path: /

os:
hostname: azl-installer
bootloader:
resetType: hard-reset

selinux:
mode: disabled

kernelCommandLine:
extraCommandLine:
- console=tty0
- console=ttyS0
- rd.info
- log_buf_len=1M

packages:
install:
- curl
- device-mapper
- dnf
- dosfstools
- efibootmgr
- iproute
- iptables
- jq
- lsof
- mdadm
- nano
- netplan
- openssh-server
- squashfs-tools
- tar
- tpm2-tools
- trident-provisioning
- vim
- veritysetup
# Accessibility packages
- pcaudiolib

additionalFiles:
# Getty service files for root autologin
- source: ../common/files/getty@.service
destination: /usr/lib/systemd/system/getty@.service
- source: ../common/files/serial-getty@.service
destination: /usr/lib/systemd/system/serial-getty@.service
- source: mos/scripts/installation.sh
destination: /root/installer/installation.sh

iso:
initramfsType: full-os

additionalFiles:
- source: iso/images/trident-testimage.cosi
destination: /images/azure-linux-core.cosi
- source: iso/bin/liveinstaller
destination: /installer/liveinstaller
- source: iso/files/config-placeholder.yaml
destination: /installer/trident-config.yaml.tmpl

kernelCommandLine:
extraCommandLine:
- console=tty0
- console=tty1
- console=ttyS0
- loglevel=6

scripts:
postCustomization:
- path: mos/scripts/startup-command.sh
2 changes: 2 additions & 0 deletions tests/tailor-images/azl-installer/iso/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/images/
/bin/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#8505c8ab802dd717290331acd0592804c4e413b030150c53f5018ac998b7831d:/installer/trident-config.yaml.tmpl:##############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
51 changes: 51 additions & 0 deletions tests/tailor-images/azl-installer/mos/scripts/installation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/bash
set -ex
trap '/bin/bash' ERR

CDROM_MOUNT="/mnt/cdrom"
WORKING_DIR="/root/installer"
MAGIC_PLACEHOLDER="8505c8ab802dd717290331acd0592804c4e413b030150c53f5018ac998b7831d"

# Mount CD-ROM using symlink
mkdir -p "$CDROM_MOUNT"
mount /dev/cdrom "$CDROM_MOUNT"

# CD-ROM paths
LIVEINSTALLER_PATH="$CDROM_MOUNT/installer/liveinstaller"
POSSIBLE_HC_TEMPLATE="$CDROM_MOUNT/installer/trident-config.yaml.tmpl"
IMAGES_DIR="$CDROM_MOUNT/images/"

# WORKING_DIR paths
LIVEINSTALLER_BIN="$WORKING_DIR/liveinstaller"
TRIDENT_CONFIG_DESTINATION="/etc/trident/config.yaml"
LOG_FILE="$WORKING_DIR/liveinstaller.log"
OUTPUT_LOG="$WORKING_DIR/output_liveinstaller.log"

# Copy to WORKING_DIR to execute liveinstaller
cp "$LIVEINSTALLER_PATH" "$LIVEINSTALLER_BIN"

# Check if placeholder magic string is present (ISO not patched)
if grep -q "^#${MAGIC_PLACEHOLDER}:" "$POSSIBLE_HC_TEMPLATE"; then
# Placeholder found - execute attended installation (interactive UI)
cd "$WORKING_DIR"
"$LIVEINSTALLER_BIN" \
--images-dir="$IMAGES_DIR" \
--host-config-output="$TRIDENT_CONFIG_DESTINATION" \
--log-level=trace \
--log-file="$LOG_FILE" 2>&1 | tee "$OUTPUT_LOG"
else
# Placeholder was replaced by a Host Configuration - execute unattended installation
echo "Pre-configured Host Configuration found. Starting unattended installation..."
# Save template in WORKING_DIR in case of failure
TEMPLATE_FILE="$WORKING_DIR/template.yaml"
cp "$POSSIBLE_HC_TEMPLATE" "$TEMPLATE_FILE"
# Execute liveinstaller (unattended)
cd "$WORKING_DIR"
"$LIVEINSTALLER_BIN" \
--unattended \
--template-file="$TEMPLATE_FILE" \
--log-level=trace \
--log-file="$LOG_FILE" 2>&1 | tee "$OUTPUT_LOG"
fi

/bin/bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
INSTALLATION="/root/installer/installation.sh"
chmod +x "$INSTALLATION"

chsh -s "$INSTALLATION" root
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
base:
$include: ../common/matrix/base-core-arm64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: azurelinux-direct-streaming-testimage

matrix:
arch: [amd64, arm64]

base:
ref: baremetal

outputs:
- format: baremetal-image

rpmSources:
- ../../../bin/RPMS
- ../../../artifacts/rpm-overrides

extraDependencies:
- ../common

config:
$include: ./tailor/baseimg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
storage:
bootType: efi
disks:
- partitionTableType: gpt
maxSize: 15G
partitions:
- id: esp
type: esp
size: 50M
label: esp
- id: root-a
size: 4G
type: root
label: root-a
- id: root-b
size: 4G
type: root
label: root-b
- id: swap
size: 2G
type: swap
label: swap
filesystems:
- deviceId: esp
type: fat32
mountPoint:
path: /boot/efi
options: umask=0077
- deviceId: root-a
type: ext4
mountPoint:
path: /
os:
bootloader:
resetType: hard-reset
hostname: trident-rawcosi-testimage
selinux:
mode: permissive
kernelCommandLine:
extraCommandLine:
- console=tty0
- console=ttyS0
- rd.info
- log_buf_len=1M
packages:
install:
- curl
- dnf
- efibootmgr
- iproute
- iptables
- lsof
- mdadm
- netplan
- openssh-server
- tpm2-tools
- vim
- audit
- device-mapper
- dosfstools
- lvm2
- veritysetup
- ntfs-3g
- ntfsprogs
- selinux-policy
services:
enable:
- sshd
1 change: 1 addition & 0 deletions tests/tailor-images/common/files/config-placeholder.yaml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions tests/tailor-images/common/files/containerd-mmap-fix.cil
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; Fix for containerd 2.2+ MountManager plugin SELinux denial.
; containerd 2.2 introduces a MountManager that opens a bbolt DB under
; /run/containerd/ using mmap(). The base refpolicy (RELEASE_2_20240226)
; grants manage_file_perms on container_runtime_t:file but that set does
; not include 'map'. Upstream fixed this in commit 7876e51510 (May 2024).
; This module backports the missing permission.
(allow container_engine_system_domain container_runtime_t (file (map)))
Loading
Loading