openSUSE:Build Service worker PXE deployment

Jump to: navigation, search

Deploy Open Build Server Workers via PXE

In case you run an own build farm, you may want to deploy all your build hosts via network, booting via PXE.

You need a running dhcpd and tftp server in that case. We recommend also to use a http server for providing the large root image, because tftp implementations has often problems with large files.

The detailed documentation how to use the PXE deployment can be found in the kiwi documentation. The short and OBS specific way can be found below.

XEN case

XEN needs more files, esp. the mboot.c32 loader. Copy it from syslinux in your tftproot directory. Afterwards create a file called pxelinux.cfg/default with following example content: DEFAULT KIWI-Boot

LABEL KIWI-Boot
       kernel mboot.c32
       append boot/initrd-netboot-suse-11.1.x86_64-2.1.1.kernel-xen.2.6.27.42-0.1-xen.gz console=com1 com1=115200 dom0_mem=2048M --- boot/initrd-netboot-suse-11.1.x86_64-2.1.1.kernel.2.6.27.42-0.1-xen vga=normal kiwitftp=192.168.1.1 console=tty0 console=ttyS0,115200 kiwistderr=/dev/ttyS0 xencons=ttyS0 --- boot/initrd-netboot-suse-11.1.x86_64-2.1.1.gz
       IPAPPEND 1

LABEL Local-Boot
       localboot 0


chroot/KVM case

In case you don't want to use XEN, but KVM or plain chroot place something like this into pxelinux.cfg/default :

DEFAULT KIWI-Boot

LABEL KIWI-Boot
       kernel boot/KVM/initrd-netboot-suse-11.2.x86_64-2.1.1.kernel
       append initrd=boot/KVM/initrd-netboot-suse-11.2.x86_64-2.1.1.gz vga=normal kiwiserver=192.168.1.1 kiwiservertype=tftp console=tty0 console=ttyS0,115200
       IPAPPEND 1

LABEL Local-Boot
       localboot 0

Generic part

Afterwards you need to configure how to setup the system. Create a file KIWI/config.$MAC and place something like this.

IMAGE=/dev/sda2;buildhost-opensuse-11.1.x86_64;1.4.0;192.168.1.1;4096;compressed
CONF=/KIWI/COLFAX.16fach/buildhost.config;/etc/buildhost.config;192.168.1.1;4096
PART=1000;S;x,20000;L;/,20000;L;/abuild.cache,x;8e;
DISK=/dev/sda