Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example/centos: edge-raw for x86_64 #245

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
85 changes: 85 additions & 0 deletions example/centos/centos-9-x86_64-edge-raw-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
otk.version: "1"

otk.define:
packages:
build:
otk.external.osbuild-gen-depsolve-dnf4:
architecture: x86_64
module_platform_id: c9s
releasever: "9"
repositories:
otk.include: "common/repositories/x86_64.yaml"
packages:
include:
- dosfstools
- clevis-luks
- iwl105-firmware
- glibc
- xfsprogs
- coreutils
- iwl100-firmware
- iwl2030-firmware
- dracut-config-generic
- microcode_ctl
- iwl6050-firmware
- iwl5150-firmware
- iwl135-firmware
- platform-python
- xz
- shim-x64
- grub2-pc
- iwl3160-firmware
- iwl2000-firmware
- selinux-policy-targeted
- python3
- iwl5000-firmware
- iwl1000-firmware
- cryptsetup
- grub2-efi-x64
- systemd
- efibootmgr
- rpm-ostree
- clevis
- lvm2
exclude: []
commit:
otk.external.otk-resolve-ostree-commit:
url: http://example.com/repo
ref: centos/9/x86_64/edge
osname: rhel-edge
remote: ${osname}
luks_uuid: "5a8535ea-d662-4a9a-af6b-76b51fe4b522" # TODO: will be generated by partition table
kernel_opts: "luks.uuid=${luks_uuid} modprobe.blacklist=vc4 rw coreos.no_persist_ip ignition.platform.id=metal $ignition_firstboot"
kernel_opts_list:
- "luks.uuid=${luks_uuid}"
- "modprobe.blacklist=vc4 rw coreos.no_persist_ip"
- "ignition.platform.id=metal"
- "$ignition_firstboot"
img_filename: disk.img

otk.target.osbuild:
pipelines:
- otk.include: "pipeline/build/generic.yaml"
- otk.include: "pipeline/ostree-deployment.yaml"
- otk.include: "pipeline/image/luks-lvm-x86_64.yaml"
- name: xz
build: name:build
stages:
- type: org.osbuild.xz
inputs:
file:
type: org.osbuild.files
origin: org.osbuild.pipeline
references:
name:image:
file: ${img_filename}
options:
filename: image.raw.xz
sources:
otk.op.join:
values:
- otk.external.osbuild-make-depsolve-dnf4-curl-source:
packagesets:
- ${packages.build}
- otk.external.otk-make-ostree-source:
${commit}
227 changes: 227 additions & 0 deletions example/centos/pipeline/image/luks-lvm-x86_64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
# NOTE: using the generic image pipeline requires LUKS support in the
# partition table generator
name: image
build: name:build
stages:
- type: org.osbuild.truncate
options:
filename: ${img_filename}
size: '10737418240'
- type: org.osbuild.sfdisk
options:
label: gpt
uuid: D209C89E-EA5E-4FBD-B161-B461CCE297E0
partitions:
- bootable: true
size: 2048
start: 2048
type: 21686148-6449-6E6F-744E-656564454649
uuid: FAC7F1FB-3E8D-4137-A512-961DE09A5549
- size: 260096
start: 4096
type: C12A7328-F81F-11D2-BA4B-00A0C93EC93B
uuid: 68B2905B-DF3E-4FB3-80FA-49D1E773AA33
- size: 786432
start: 264192
type: BC13C2FF-59E6-4262-A352-B275FD6F7172
uuid: CB07C243-BC44-4717-853E-28852021225B
- size: 19920863
start: 1050624
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
uuid: 6264D520-3FB9-423F-8AB8-7A0A8E3D3562
devices:
device:
type: org.osbuild.loopback
options:
filename: ${img_filename}
lock: true
- type: org.osbuild.luks2.format
options:
passphrase: osbuild
uuid: 5a8535ea-d662-4a9a-af6b-76b51fe4b522
cipher: cipher_null
label: crypt_root
sector-size: 0
pbkdf:
method: argon2id
iterations: 4
memory: 32
parallelism: 1
devices:
device:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 1050624
size: 19920863
lock: true
- type: org.osbuild.clevis.luks-bind
options:
passphrase: osbuild
pin: 'null'
policy: '{}'
devices:
device:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 1050624
size: 19920863
lock: true
- type: org.osbuild.lvm2.create
options:
volumes:
- name: rootlv
size: 9663676416B
devices:
device:
type: org.osbuild.luks2
parent: luks-5a85
options:
passphrase: osbuild
luks-5a85:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 1050624
size: 19920863
lock: true
- type: org.osbuild.mkfs.fat
options:
volid: 7B7795E7
devices:
device:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 4096
size: 260096
lock: true
- type: org.osbuild.mkfs.xfs
options:
uuid: dbd21911-1c4e-4107-8a9f-14fe6e751358
label: boot
devices:
device:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 264192
size: 786432
lock: true
- type: org.osbuild.mkfs.xfs
options:
uuid: 9851898e-0b30-437d-8fad-51ec16c3697f
label: root
devices:
device:
type: org.osbuild.lvm2.lv
parent: rootvg
options:
volume: rootlv
luks-5a85:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 1050624
size: 19920863
lock: true
rootvg:
type: org.osbuild.luks2
parent: luks-5a85
options:
passphrase: osbuild
- type: org.osbuild.copy
inputs:
root-tree:
type: org.osbuild.tree
origin: org.osbuild.pipeline
references:
- name:ostree-deployment
options:
paths:
- from: input://root-tree/
to: mount://-/
devices:
'-':
type: org.osbuild.lvm2.lv
parent: rootvg
options:
volume: rootlv
boot:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 264192
size: 786432
boot-efi:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 4096
size: 260096
luks-5a85:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 1050624
size: 19920863
rootvg:
type: org.osbuild.luks2
parent: luks-5a85
options:
passphrase: osbuild
mounts:
- name: '-'
type: org.osbuild.xfs
source: '-'
target: /
- name: boot
type: org.osbuild.xfs
source: boot
target: /boot
- name: boot-efi
type: org.osbuild.fat
source: boot-efi
target: /boot/efi
- type: org.osbuild.lvm2.metadata
options:
vg_name: rootvg
devices:
device:
type: org.osbuild.luks2
parent: luks-5a85
options:
passphrase: osbuild
luks-5a85:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 1050624
size: 19920863
lock: true
- type: org.osbuild.luks2.remove-key
options:
passphrase: osbuild
devices:
device:
type: org.osbuild.loopback
options:
filename: ${img_filename}
start: 1050624
size: 19920863
lock: true
- type: org.osbuild.grub2.inst
options:
filename: ${img_filename}
platform: i386-pc
location: 2048
core:
type: mkimage
partlabel: gpt
filesystem: xfs
prefix:
type: partition
partlabel: gpt
number: 2
path: /grub2
Loading
Loading