refraction-forger/images/omnios-bloody-disk.kdl
Till Wegmueller 48f8db1236
Initial implementation of refraction-forger
Standalone workspace with 4 crates for building optimized OS images
and publishing to OCI registries:

- spec-parser: KDL image spec parsing with include resolution and
  profile-based conditional filtering
- forge-oci: OCI image creation (tar layers, manifests, Image Layout)
  and registry push via oci-client
- forge-engine: Build pipeline with Phase 1 (rootfs assembly via native
  package managers with -R) and Phase 2 (QCOW2/OCI/artifact targets),
  plus dyn-compatible ToolRunner trait for external tool execution
- forger: CLI binary with build, validate, inspect, push, and targets
  commands

Ported KDL specs and overlay files from the vm-manager prototype.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:30:22 +01:00

70 lines
3.1 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// OmniOS bloody final disk image target (ported from image-builder JSON)
// Source JSON reference (abridged):
// {
// "pool": { "name": "rpool", "ashift": 12, "uefi": true, "size": 2000 },
// "steps": [
// { "t": "create_be" },
// { "t": "unpack_tar", "name": "omnios-stable-r${release}.tar" },
// { "t": "include", "name": "devfs" },
// { "t": "assemble_files", "dir": "/etc/versions", "output": "/etc/versions/build", "prefix": "build." },
// { "t": "make_bootable" },
// { "t": "include", "name": "common" },
// { "t": "ensure_file", "file": "/boot/conf.d/console", "src": "boot_console.${console}", "owner": "root", "group": "root", "mode": "644" },
// { "t": "ensure_file", "file": "/etc/ttydefs", "src": "ttydefs.115200", "owner": "root", "group": "sys", "mode": "644" },
// { "t": "ensure_file", "file": "/etc/default/init", "src": "default_init.utc", "owner": "root", "group": "root", "mode": "644" },
// { "t": "shadow", "username": "root", "password": "$5$kr1VgdIt$OUiUAyZCDogH/uaxH71rMeQxvpDEY2yX.x0ZQRnmeb9" },
// { "t": "include", "name": "finalise" }
// ]
// }
// Notes:
// - The refraction KDL schema doesnt model the step DSL directly; we express the
// relevant parts via includes, overlays, and target settings.
// - UEFI + disk size are mapped to the target stanza. Pool properties are now
// modeled via a pool { property name=".." value=".." } block under target.
// - Finalizers are implicit per the toolchain and dont need to be listed.
metadata name="omnios-bloody-disk" version="0.0.1" description="OmniOS bloody: bootable qcow2 target from base spec"
// Derive from the base publisher/variant/cert configuration and base packages
base "images/omnios-bloody-base.kdl"
// Device filesystem overlays and common system files
include "images/devfs.kdl"
include "images/common.kdl"
packages {
package "/system/management/cloud-init"
package "/driver/crypto/viorand"
package "/driver/network/vioif"
package "/driver/storage/vio9p"
package "/driver/storage/vioblk"
package "/driver/storage/vioscsi"
}
// Files that the original JSON ensured
overlays {
// Console configuration (115200 by default)
file destination="/boot/conf.d/console" source="boot_console.115200" owner="root" group="root" mode="644"
// TTY speed definitions
file destination="/etc/ttydefs" source="ttydefs.115200" owner="root" group="sys" mode="644"
// Init defaults (UTC timezone)
file destination="/etc/default/init" source="default_init.utc" owner="root" group="root" mode="644"
// Fallback local login: set a default root password in /etc/shadow
// This is used only if cloud-init (or metadata) fails to provision credentials
shadow username="root" password="$5$kr1VgdIt$OUiUAyZCDogH/uaxH71rMeQxvpDEY2yX.x0ZQRnmeb9"
}
// Bootable qcow2 disk image; size is 2000 MB; use UEFI bootloader
target "qcow2" kind="qcow2" {
disk-size "2000M"
bootloader "uefi"
// ZFS pool properties for the created rpool
pool {
// Match original JSON: ashift=12
property name="ashift" value="12"
}
}