Add comprehensive phase system, types, and treefile support for deb-bootc-compose
- Add internal/phases/ with complete phase management system - Add internal/types/ with core data structures - Add internal/treefile/ for OSTree treefile generation - Update examples with YAML configurations - Update .gitignore to properly exclude test artifacts and build outputs - Update dependencies and configuration files
This commit is contained in:
parent
57bb8aafbe
commit
cca68c90f6
18 changed files with 2543 additions and 717 deletions
|
|
@ -1,102 +1,82 @@
|
|||
{
|
||||
"name": "debian-bootc-minimal",
|
||||
"version": "13",
|
||||
"description": "Minimal Debian bootc base image",
|
||||
"release": "bookworm",
|
||||
"description": "Minimal Debian Trixie bootc image (Debian 13+ required for OSTree support)",
|
||||
"release": "trixie",
|
||||
"packages": {
|
||||
"required": [
|
||||
"linux-image-amd64",
|
||||
"systemd",
|
||||
"ostree",
|
||||
"bootc",
|
||||
"grub-pc",
|
||||
"grub-efi-amd64",
|
||||
"initramfs-tools",
|
||||
"ca-certificates",
|
||||
"curl",
|
||||
"wget"
|
||||
"bootc"
|
||||
],
|
||||
"optional": [
|
||||
"openssh-server",
|
||||
"vim",
|
||||
"less",
|
||||
"man-db"
|
||||
"curl"
|
||||
],
|
||||
"recommended": [
|
||||
"debian-archive-keyring",
|
||||
"locales"
|
||||
],
|
||||
"build_deps": [
|
||||
"build-essential",
|
||||
"fakeroot",
|
||||
"devscripts"
|
||||
"ca-certificates"
|
||||
]
|
||||
},
|
||||
"exclude": [
|
||||
"snapd",
|
||||
"flatpak",
|
||||
"firefox",
|
||||
"thunderbird"
|
||||
"unattended-upgrades"
|
||||
],
|
||||
"repositories": [
|
||||
"deb http://deb.debian.org/debian bookworm main",
|
||||
"deb http://deb.debian.org/debian bookworm-updates main",
|
||||
"deb http://deb.debian.org/debian-security bookworm-security main"
|
||||
{
|
||||
"name": "debian",
|
||||
"url": "http://deb.debian.org/debian",
|
||||
"suite": "trixie",
|
||||
"component": "main",
|
||||
"arch": "amd64",
|
||||
"enabled": true
|
||||
}
|
||||
],
|
||||
"architecture": ["amd64", "arm64"],
|
||||
"architecture": ["amd64"],
|
||||
"variants": [
|
||||
{
|
||||
"name": "minimal",
|
||||
"description": "Minimal base system",
|
||||
"architectures": ["amd64"],
|
||||
"packages": {
|
||||
"required": [],
|
||||
"optional": [],
|
||||
"recommended": [],
|
||||
"build_deps": []
|
||||
"recommended": []
|
||||
},
|
||||
"exclude": [],
|
||||
"architecture": ["amd64", "arm64"],
|
||||
"custom": false
|
||||
},
|
||||
{
|
||||
"name": "server",
|
||||
"description": "Server variant with additional packages",
|
||||
"packages": {
|
||||
"required": [
|
||||
"openssh-server",
|
||||
"nginx",
|
||||
"postgresql-client"
|
||||
],
|
||||
"optional": [],
|
||||
"recommended": [],
|
||||
"build_deps": []
|
||||
},
|
||||
"exclude": [],
|
||||
"architecture": ["amd64", "arm64"],
|
||||
"custom": false
|
||||
"config": {}
|
||||
}
|
||||
],
|
||||
"build": {
|
||||
"system": "sbuild",
|
||||
"environment": "debootstrap",
|
||||
"dependencies": "aptitude",
|
||||
"parallel": true,
|
||||
"max_workers": 4
|
||||
"type": "sbuild",
|
||||
"environment": {},
|
||||
"options": {}
|
||||
},
|
||||
"ostree": {
|
||||
"mode": "bare",
|
||||
"refs": [
|
||||
"debian/13/amd64/minimal",
|
||||
"debian/13/arm64/minimal"
|
||||
],
|
||||
"repository": "/var/lib/deb-bootc-compose/ostree",
|
||||
"signing": false,
|
||||
"key_file": ""
|
||||
"ref": "debian/13/amd64/minimal",
|
||||
"subject": "Debian 13 Trixie minimal bootc image",
|
||||
"body": "Minimal Debian Trixie bootc image for testing and development"
|
||||
},
|
||||
"output": {
|
||||
"formats": ["container", "disk-image", "chunked-oci"],
|
||||
"registry": "docker.io/debian",
|
||||
"signing": false,
|
||||
"compression": true
|
||||
"formats": ["container", "disk"],
|
||||
"container": {
|
||||
"base_image": "debian:trixie-slim",
|
||||
"labels": {
|
||||
"org.debian.release": "13",
|
||||
"org.debian.variant": "minimal"
|
||||
},
|
||||
"entrypoint": ["/usr/sbin/init"],
|
||||
"cmd": []
|
||||
},
|
||||
"disk_image": {
|
||||
"size": "10G",
|
||||
"formats": ["raw", "qcow2"],
|
||||
"bootloader": "grub",
|
||||
"kernel": "linux-image-amd64",
|
||||
"initramfs": true
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
"maintainer": "debian-bootc-team@debian.org",
|
||||
"homepage": "https://salsa.debian.org/debian-bootc-team/deb-bootc-compose"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
76
examples/debian-bootc-minimal.yaml
Normal file
76
examples/debian-bootc-minimal.yaml
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# apt-ostree treefile for Debian Trixie minimal bootc image
|
||||
# This follows the apt-ostree v1 format specification
|
||||
# Debian 13+ (trixie) has the required OSTree version for bootc support
|
||||
|
||||
apiVersion: v1
|
||||
kind: Treefile
|
||||
metadata:
|
||||
name: "debian-trixie-minimal"
|
||||
description: "Minimal Debian Trixie system for bootc images"
|
||||
version: "13.0.0"
|
||||
|
||||
spec:
|
||||
# Base system configuration
|
||||
base:
|
||||
distribution: "trixie"
|
||||
architecture: "amd64"
|
||||
mirror: "http://deb.debian.org/debian"
|
||||
|
||||
# Package management
|
||||
packages:
|
||||
include:
|
||||
# Essential system packages
|
||||
- "systemd"
|
||||
- "udev"
|
||||
- "dbus"
|
||||
- "libc6"
|
||||
- "libcap2"
|
||||
- "ostree"
|
||||
- "bootc"
|
||||
- "linux-image-amd64"
|
||||
|
||||
# Basic utilities
|
||||
- "bash"
|
||||
- "coreutils"
|
||||
- "ca-certificates"
|
||||
|
||||
exclude:
|
||||
- "unattended-upgrades"
|
||||
- "unwanted-package"
|
||||
|
||||
# Customizations
|
||||
customizations:
|
||||
files:
|
||||
- path: "/etc/hostname"
|
||||
content: "debian-atomic"
|
||||
mode: "0644"
|
||||
owner: "root:root"
|
||||
|
||||
- path: "/etc/motd"
|
||||
content: "Welcome to Debian Atomic (bootc) - Trixie"
|
||||
mode: "0644"
|
||||
owner: "root:root"
|
||||
|
||||
services:
|
||||
enable:
|
||||
- "systemd-networkd"
|
||||
- "systemd-resolved"
|
||||
- "systemd-timesyncd"
|
||||
|
||||
# OSTree configuration
|
||||
ostree:
|
||||
ref: "debian/13/amd64/minimal"
|
||||
commit_message: "Debian 13 Trixie minimal bootc image"
|
||||
metadata:
|
||||
build_tool: "deb-bootc-compose"
|
||||
build_timestamp: "2025-08-19T18:44:29Z"
|
||||
build_version: "1.0.0"
|
||||
variant: "minimal"
|
||||
architecture: "amd64"
|
||||
distribution: "trixie"
|
||||
|
||||
# Build options
|
||||
build:
|
||||
parallel_jobs: 4
|
||||
cache_dir: "./cache"
|
||||
cleanup: true
|
||||
130
examples/debian-bootc-server.yaml
Normal file
130
examples/debian-bootc-server.yaml
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
# apt-ostree treefile for Debian Trixie server bootc image
|
||||
# This follows the apt-ostree v1 format specification
|
||||
# Debian 13+ (trixie) has the required OSTree version for bootc support
|
||||
|
||||
apiVersion: v1
|
||||
kind: Treefile
|
||||
metadata:
|
||||
name: "debian-trixie-server"
|
||||
description: "Server Debian Trixie system for bootc images"
|
||||
version: "13.0.0"
|
||||
|
||||
spec:
|
||||
# Base system configuration
|
||||
base:
|
||||
distribution: "trixie"
|
||||
architecture: "amd64"
|
||||
mirror: "http://deb.debian.org/debian"
|
||||
|
||||
# Package management
|
||||
packages:
|
||||
include:
|
||||
# Essential system packages
|
||||
- "systemd"
|
||||
- "udev"
|
||||
- "dbus"
|
||||
- "libc6"
|
||||
- "libcap2"
|
||||
- "ostree"
|
||||
- "bootc"
|
||||
- "linux-image-amd64"
|
||||
|
||||
# Server utilities
|
||||
- "bash"
|
||||
- "coreutils"
|
||||
- "ca-certificates"
|
||||
- "curl"
|
||||
- "wget"
|
||||
- "vim"
|
||||
- "htop"
|
||||
- "net-tools"
|
||||
- "iproute2"
|
||||
- "openssh-server"
|
||||
- "rsyslog"
|
||||
- "cron"
|
||||
|
||||
exclude:
|
||||
- "unattended-upgrades"
|
||||
- "desktop-packages"
|
||||
- "unwanted-package"
|
||||
|
||||
# Customizations
|
||||
customizations:
|
||||
users:
|
||||
- name: "admin"
|
||||
groups: ["sudo", "docker"]
|
||||
ssh_keys:
|
||||
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC..."
|
||||
|
||||
files:
|
||||
- path: "/etc/hostname"
|
||||
content: "debian-atomic-server"
|
||||
mode: "0644"
|
||||
owner: "root:root"
|
||||
|
||||
- path: "/etc/motd"
|
||||
content: "Welcome to Debian Atomic Server (bootc) - Trixie"
|
||||
mode: "0644"
|
||||
owner: "root:root"
|
||||
|
||||
- path: "/etc/ssh/sshd_config"
|
||||
content: |
|
||||
Port 22
|
||||
Protocol 2
|
||||
HostKey /etc/ssh/ssh_host_rsa_key
|
||||
HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||
HostKey /etc/ssh/ssh_host_ed25519_key
|
||||
UsePrivilegeSeparation yes
|
||||
KeyRegenerationInterval 3600
|
||||
ServerKeyBits 1024
|
||||
SyslogFacility AUTH
|
||||
LogLevel INFO
|
||||
LoginGraceTime 120
|
||||
PermitRootLogin no
|
||||
StrictModes yes
|
||||
RSAAuthentication yes
|
||||
PubkeyAuthentication yes
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
IgnoreRhosts yes
|
||||
RhostsRSAAuthentication no
|
||||
HostbasedAuthentication no
|
||||
PermitEmptyPasswords no
|
||||
ChallengeResponseAuthentication no
|
||||
PasswordAuthentication yes
|
||||
X11Forwarding yes
|
||||
X11DisplayOffset 10
|
||||
PrintMotd no
|
||||
PrintLastLog yes
|
||||
TCPKeepAlive yes
|
||||
AcceptEnv LANG LC_*
|
||||
Subsystem sftp /usr/lib/openssh/sftp-server
|
||||
UsePAM yes
|
||||
mode: "0644"
|
||||
owner: "root:root"
|
||||
|
||||
services:
|
||||
enable:
|
||||
- "systemd-networkd"
|
||||
- "systemd-resolved"
|
||||
- "systemd-timesyncd"
|
||||
- "ssh"
|
||||
- "rsyslog"
|
||||
- "cron"
|
||||
|
||||
# OSTree configuration
|
||||
ostree:
|
||||
ref: "debian/13/amd64/server"
|
||||
commit_message: "Debian 13 Trixie server bootc image"
|
||||
metadata:
|
||||
build_tool: "deb-bootc-compose"
|
||||
build_timestamp: "2025-08-19T18:44:29Z"
|
||||
build_version: "1.0.0"
|
||||
variant: "server"
|
||||
architecture: "amd64"
|
||||
distribution: "trixie"
|
||||
|
||||
# Build options
|
||||
build:
|
||||
parallel_jobs: 4
|
||||
cache_dir: "./cache"
|
||||
cleanup: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue