-
Notifications
You must be signed in to change notification settings - Fork 9
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
[RFC] test: test against reference images lib generated manifest #186
Changes from all commits
f6ed83f
ae5147c
39e198d
ee5518b
c9ebe37
486e11b
8949b09
84a5bca
067fe3d
6ad7247
843af8a
7ac1bdf
4635037
d7834d2
771987f
f3dd7c0
494d5f8
7e0f61b
7ee91a0
28fef79
239b7fa
5754525
2430d24
ec10b6d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,139 @@ | ||
otk.version: "1" | ||
|
||
otk.define.default: | ||
default: | ||
language: "en_US.UTF-8" | ||
|
||
otk.define.centos-9-x86_64-ami: | ||
architecture: "x86_64" | ||
version: "9" | ||
kernel_opts_list: | ||
- "rd.blacklist=nouveau" | ||
- "nvme_core.io_timeout=4294967295" | ||
sshd_password_authentication: true | ||
modfication: | ||
language: "en_US.UTF-8" | ||
timezone: "UTC" | ||
enabled_services: | ||
- sshd | ||
- NetworkManager | ||
- nm-cloud-setup.service | ||
- nm-cloud-setup.timer | ||
- cloud-init | ||
- cloud-init-local | ||
- cloud-config | ||
- cloud-final | ||
- reboot.target | ||
- tuned | ||
# todo: should this go into centos-9-common.yaml ? and we customize via normal "otk.defines" ? | ||
otk.define: | ||
# XXX: de-dup | ||
distro: centos | ||
version: 9 | ||
kernel_commandline: "console=tty0 console=ttyS0,115200n8 net.ifnames=0 nvme_core.io_timeout=4294967295" | ||
filesystem: | ||
# this will expand to "root: ...\nboot: \n"etc (i.e. a real file-systems) and "kernel_opts_list: | ||
# [list_item1, list_item2, ..]" | ||
# (i.e. define the partition table as a map of root/boot/boot_efi vars) | ||
# *and* it needs to undstand modifications (e.g. adding extra parititions somehow, size contraints) | ||
otk.external.osbuild.create_partition_table_defines: | ||
total_size: 10G | ||
modifications: | ||
filename: "image.raw" | ||
otk.include: "common/gen-partition-table-x86_64.yaml" | ||
|
||
otk.include.centos-9-x86_64: "common/centos-9.yaml" | ||
otk.target.osbuild: | ||
pipelines: | ||
- otk.include: "pipeline/build.yaml" | ||
- name: os | ||
build: name:build | ||
stages: | ||
- otk.include: "fragment/kernel-cmdline.yaml" | ||
- type: org.osbuild.rpm | ||
- type: org.osbuild.fix-bls | ||
options: | ||
prefix: "" | ||
- type: org.osbuild.locale | ||
options: | ||
language: en_US.UTF-8 | ||
- type: org.osbuild.keymap | ||
options: | ||
keymap: us | ||
x11-keymap: | ||
layouts: | ||
- us | ||
- type: org.osbuild.timezone | ||
options: | ||
zone: UTC | ||
- type: org.osbuild.chrony | ||
options: | ||
servers: | ||
- hostname: 169.254.169.123 | ||
minpoll: 4 | ||
maxpoll: 4 | ||
iburst: true | ||
prefer: true | ||
leapsectz: "" | ||
- type: org.osbuild.sysconfig | ||
options: | ||
kernel: | ||
update_default: true | ||
default_kernel: kernel | ||
network: | ||
networking: true | ||
no_zero_conf: true | ||
network-scripts: | ||
ifcfg: | ||
eth0: | ||
bootproto: dhcp | ||
device: eth0 | ||
ipv6init: false | ||
onboot: true | ||
peerdns: true | ||
type: Ethernet | ||
userctl: true | ||
- type: org.osbuild.systemd-logind | ||
options: | ||
filename: 00-getty-fixes.conf | ||
config: | ||
Login: | ||
NAutoVTs: 0 | ||
- type: org.osbuild.cloud-init | ||
options: | ||
filename: 00-rhel-default-user.cfg | ||
config: | ||
system_info: | ||
default_user: | ||
name: ec2-user | ||
- type: org.osbuild.modprobe | ||
options: | ||
filename: blacklist-nouveau.conf | ||
commands: | ||
- command: blacklist | ||
modulename: nouveau | ||
- type: org.osbuild.modprobe | ||
options: | ||
filename: blacklist-amdgpu.conf | ||
commands: | ||
- command: blacklist | ||
modulename: amdgpu | ||
- type: org.osbuild.dracut.conf | ||
options: | ||
filename: sgdisk.conf | ||
config: | ||
install_items: | ||
- sgdisk | ||
- type: org.osbuild.dracut.conf | ||
options: | ||
filename: ec2.conf | ||
config: | ||
add_drivers: | ||
- nvme | ||
- xen-blkfront | ||
- type: org.osbuild.systemd.unit | ||
options: | ||
unit: nm-cloud-setup.service | ||
dropin: 10-rh-enable-for-ec2.conf | ||
config: | ||
Service: | ||
Environment: | ||
- key: NM_CLOUD_SETUP_EC2 | ||
value: "yes" | ||
- type: org.osbuild.authselect | ||
options: | ||
profile: sssd | ||
- type: org.osbuild.sshd.config | ||
options: | ||
config: | ||
PasswordAuthentication: false | ||
- otk.external.otk-make-fstab-stage: | ||
${filesystem} | ||
- otk.include: "fragment/grub2.yaml" | ||
- type: org.osbuild.systemd | ||
options: | ||
enabled_services: | ||
- sshd | ||
- NetworkManager | ||
- nm-cloud-setup.service | ||
- nm-cloud-setup.timer | ||
- cloud-init | ||
- cloud-init-local | ||
- cloud-config | ||
- cloud-final | ||
- reboot.target | ||
- tuned | ||
default_target: multi-user.target | ||
- type: org.osbuild.selinux | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be split into a fragement as it's use with the same options everywhere There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not entirely, we'd need separate fragments for the build and root pipelines as the build pipeline also sets install_t on cp, so maybe two fragments? :) |
||
options: | ||
file_contexts: etc/selinux/targeted/contexts/files/file_contexts | ||
- otk.include: "pipeline/image.yaml" | ||
sources: | ||
org.osbuild.curl: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,66 @@ | ||
otk.version: "1" | ||
|
||
otk.define.centos-9-x86_64-qcow2: | ||
architecture: "x86_64" | ||
version: "9" | ||
kernel_opts_list: [] | ||
sshd_password_authentication: true | ||
modfication: | ||
language: "C.UTF-8" | ||
timezone: "America/New_York" | ||
enabled_services: [] | ||
otk.define: | ||
# XXX: dedup | ||
distro: centos | ||
version: 9 | ||
kernel_commandline: "console=tty0 console=ttyS0,115200n8 no_timer_check net.ifnames=0" | ||
filesystem: | ||
# this will expand to "root: ...\nboot: \n"etc (i.e. a real file-systems) and "kernel_opts_list: | ||
# [list_item1, list_item2, ..]" | ||
# (i.e. define the partition table as a map of root/boot/boot_efi vars) | ||
# *and* it needs to undstand modifications (e.g. adding extra parititions somehow, size contraints) | ||
otk.external.osbuild.create_partition_table_defines: | ||
total_size: 10G | ||
modifications: | ||
# empty | ||
otk.include: "common/gen-partition-table-x86_64.yaml" | ||
|
||
otk.include.centos-9-x86_64: "common/centos-9.yaml" | ||
otk.target.osbuild: | ||
pipelines: | ||
- otk.include: "pipeline/build.yaml" | ||
- name: os | ||
build: name:build | ||
stages: | ||
- otk.include: "fragment/kernel-cmdline.yaml" | ||
- type: org.osbuild.rpm | ||
- type: org.osbuild.fix-bls | ||
options: | ||
prefix: "" | ||
- type: org.osbuild.locale | ||
options: | ||
language: C.UTF-8 | ||
- type: org.osbuild.timezone | ||
options: | ||
zone: America/New_York | ||
- type: org.osbuild.sysconfig | ||
options: | ||
kernel: | ||
update_default: true | ||
default_kernel: kernel | ||
network: | ||
networking: true | ||
no_zero_conf: true | ||
- otk.external.otk-make-fstab-stage: | ||
${filesystem} | ||
- otk.include: "fragment/grub2.yaml" | ||
- type: org.osbuild.systemd | ||
options: | ||
default_target: multi-user.target | ||
- type: org.osbuild.selinux | ||
options: | ||
file_contexts: etc/selinux/targeted/contexts/files/file_contexts | ||
- otk.include: "pipeline/image.yaml" | ||
- name: qcow2 | ||
build: name:build | ||
stages: | ||
- type: org.osbuild.qemu | ||
inputs: | ||
image: | ||
type: org.osbuild.files | ||
origin: org.osbuild.pipeline | ||
references: | ||
name:image: | ||
file: ${filesystem.const.filename} | ||
options: | ||
# XXX: provide a way to derive the name from the filesystem one? | ||
filename: disk.qcow2 | ||
format: | ||
type: qcow2 | ||
compat: "1.1" | ||
sources: | ||
org.osbuild.curl: |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extracting: org.osbuild.fix-bls,org.osbuild.keymap, org.osbuild.timezone would work here but because it's in a list it will look quite awkward
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't be that awkward, I believe we already use
otk.op.join
in some places and I used it 'everywhere' in my branch just so fragments could define one or more stages :)