os-autoinst-distri-opensuse
os-autoinst-distri-opensuse copied to clipboard
[WIP] Automate iPXE host installation for SL Micro 6.1
-
This pull request aims to support automated SL Micro 6.1 iPXE installation by using PXE-capable kernel/initrd and pre-built disk image (indicated by
rd.kiwi.install.image=MIRROR_HTTP/HDD_1
) which then will be deployed onto specified disk device (indicated byrd.kiwi.oem.installdevice=/dev/disk/by-id/INSTALL_DISK_WWN
) and configured by using ignition/combustion (indicated byFIRST_BOOT_CONFIG
). -
Several new subroutines in
lib/utils.pm
:-
is_disk_image
indicates pre-built disk image will used for OS installation. -
is_ipxe_with_disk_image
indicates OS installation is performed with iPXE and disk image.
-
-
New test module
jeos/prepare_firstboot_config.pm
:-
Aims to generate ignition or combustion configuration file based on template
config.ign.ARCH.ep
orscript.ARCH.ep
. -
Setting
FIRSTBOOT_CONFIG_DIR
provides flexibility of using customized folder to store configuration templates. -
Subroutine
prepare_profile
does the actual job of expanding variables (likeSERIALCONSOLE
) and uploading final configuration file. -
Save addresses of configuration files to settings
IGNITION_URL
andCOMBUSTION_URL
.
-
Aims to generate ignition or combustion configuration file based on template
-
Changes made to
tests/installation/ipxe_install.pm
:-
Move part of adding extra kernel command line outside
set_bootscript
and into a new subroutineset_bootscript_cmdline_extra
to avoid inflatedset_bootscript
subroutine. -
Introduce
BOOTLOADER_ROOT_DEVICE
andBOOTLOADER_INITRD
which indicates whether root device and specified initrd are needed at boot time for UEFI machines. If they are not needed, setBOOTLOADER_ROOT_DEVICE=0
andBOOTLOADER_INITRD=0
. If customized ones are needed, setBOOTLOADER_ROOT_DEVICE=/dev/xxx
andBOOTLOADER_INITRD=initrd_addr
instead of defaultroot=/dev/ram0
andinitrd=initrd
. Not usingBOOTLOADER_ROOT_DEVICE
andBOOTLOADER_INITRD
means using default settings. -
New subroutine
set_bootscript_image_config
adds boot parameters for pre-built disk image on kernel command line to achieve non-interactive mode installation, which is called inset_bootscript_cmdline_extra
. Settingrd.kiwi.oem.installdevice
is only added ifFIRST_BOOT_CONFIG
is being used, which means full automation, andINSTALL_DISK_WWN
will be set to/dev/sda
or/dev/vda
if it not given. -
New subroutine
set_bootscript_firstboot_config
adds boot parameters for first boot configuration on kernel command line to complete automated configuration, which is called inset_bootscript_cmdline_extra
. -
Only needles
load-linux-kernel
andload-initrd
need to be matched for OS installation with disk image.
-
Move part of adding extra kernel command line outside
-
Changes made to
tests/microos/selfinstall.pm
:-
For installation with specified disk device, there will be no prompt confirmation of disk device, only dialogues of writing into and verifying disk device are shown up. Corresponding needles
slem-selfinstall-write-drive
andslem-selfinstall-verify-drive
will be matched. -
Due to test runs under various circumstances,
check_screen('slem-selfinstall-verify-drive')
will be used afterassert_screen('slem-selfinstall-write-drive')
to avoid unnecessary failures.
-
For installation with specified disk device, there will be no prompt confirmation of disk device, only dialogues of writing into and verifying disk device are shown up. Corresponding needles
-
New ignition (
config.ign.x86_64.ep
andconfig.ign.aarch64.ep
) and combustion (script.x86_64.ep
andscript.aarch64.ep
) configuration templates, which are based on architecture to better facilitate first boot configuration process. These templates need to be expanded, because there are different serial consoles and etc being used for different machines, by executingjeos/prepare_firstboot_config.pm
at the beginning of test run. Final configuration files are served on URL (IGNITION_URL
andCOMBUSTION_URL
) and will be provided on kernel command line directly. -
Add new schedule file
schedule/virt_autotest/install_guest_on_slem_kvm_host_ipxe_install.yaml
for iPXE installation and rename existing one toschedule/virt_autotest/install_guest_on_slem_kvm_host_usb_install.yaml
. -
Trivial changes are made to legacy
combustion/script
file to takeGRUB_TERMINAL_INPUT
andGRUB_TERMINAL_OUTPUT
into consideration as well. -
Verification Runs:
- 15sp7 on 15sp7 kvm
- 15sp6 on 15sp6 kvm
- 15sp6 on 15sp6 xen
- 15sp6 on 12sp5 kvm
- 15sp6 on 12sp5 xen
- 15sp6 on 15sp5 kvm
- 15sp6 on 15sp5 xen
- sl-micro 6.1 on sl-micro 6.1 host
- sles15sp6 on sl-micro 6.1 host
- ipxe x86_64 host installation
- ipxe aarch64 host installation
- In case you can not see job on my openQA server
-
Needles:
- Needle slem-selfinstall-write-drive
- Needle slem-selfinstall-verify-drive
- Needle slem-selfinstall-write-drive