OpenStack Ironic and Scale-out Power (ppc64) Servers

If you are planning to setup baremetal cloud using OpenStack Ironic and your environment consists of scale-out servers based on IBM POWER8 processor architecture, then you needn’t worry.

You can leverage OpenStack Ironic for baremetal provisioning of scale-out Power servers from either IBM or OpenPower partners. These new scale-out servers with POWER8 processor comes with Linux based ‘petitboot‘ bootloader which supports PXE based deployments.

However few things needs to be kept in mind in order to have a mixed baremetal cluster consisting of Intel and Power servers.

1. External DHCP server must be used instead of the internal neutron DHCP server (dnsmasq). This shouldn’t be much of a problem, since in production deployments external DHCP server is mostly preferred.

2. DHCP architecture identifier must be used to distinguish requests from scale-out Power servers (0x0e for Power). This allows for managing x86 and petitboot based scale-out Power servers using the same DHCP infrastructure. One major difference in the PXE process when using petitboot is that it doesn’t require downloading a binary pxelinux loader (pxelinux.0) as is the case for Intel servers. In other words, it is not required to populate the filename field in the DHCP response header. More in-depth details is available here.

A sample DHCP server configuration snippet handling both Power and Intel servers

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.1.255;
option conf-file code 209 = text;
option path-prefix code 210 = text;
option arch code 93 = unsigned integer 16;
next-server 10.0.1.248;
if option arch = 00:0e {
    option path-prefix "/opt/stack/data/ironic/tftpboot/";
} else {
    filename "pxelinux.0";
}
subnet 10.0.1.0 netmask 255.255.255.0 {
    range 10.0.1.10 10.0.1.100;
    range 10.0.1.150 10.0.1.200;
}

3. Depending on the OS that needs to be deployed eg, Ubuntu, Fedora or IBM PowerKVM, image generation using diskimage-builder for Ironic will vary.

For example, Ubuntu provides cloud images for Power so creating images for Ubuntu is straightforward and involves using the following two commands

disk-image-create ubuntu baremetal -o <user-image>
ramdisk-image-create ubuntu deploy-ironic -o <deploy-image>

However, Fedora currently doesn’t provide any cloud images for Power. So a local qemu image needs to be created first and the same needs to be used with diskimage-builder. You can create a Fedora qemu image from scratch using virt-install and use the same with diskimage-builder.  Ensure that the image has only PPC PreP boot partition and root partition.

DIB_LOCAL_IMAGE=/tmp/fedora.qcow2 disk-image-create fedora baremetal -o <user-image>
DIB_LOCAL_IMAGE=/tmp/fedora.qcow2 ramdisk-image-create fedora deploy-ironic -o <deploy-image>

If you are planning to use IBM PowerKVM, then you’ll be required to create a local image and use the same as user-image by leveraging Ironic’s wholedisk installation mechanism. The deploy-image can be either Ubuntu or Fedora.

Here are the steps required for PowerKVM

1. On an existing PowerKVM host create a PowerKVM VM.
Create a raw disk image of atleast 75G for installing PowerKVM on a VM. Note that PowerKVM installation on a qcow2 disk doesn’t work. So you need to use raw disk for initial installation. After installation, the disk image can be converted to qcow2.

qemu-img create -f raw pkvm_vm.img +75G
virt-install --name=pkvm --boot=cdrom,hd --disk path=pkvm_vm.img --ram=4096 --cdrom=<path-to-powerkvm-iso>

Follow the installation instructions and complete the installation process. After successful installation perform the following additional customizations.

2. Perform additional customizations
Add “IBM Power RAID SCSI Adapter Driver” to the initrd image

mkinitrd --preload ipr -f -v /boot/initrd-$(uname -r).img $(uname -r)

Set the root as /dev/mapper/ibmpkvm_vg_root-ibmpkvm_lv_root
edit /etc/default/grub and set
GRUB_DEVICE=/dev/mapper/ibmpkvm_vg_root-ibmpkvm_lv_root
GRUB_DISABLE_LINUX_UUID=true
After making the changes in the grub file run the following command

grub2-mkconfig

3. Shutdown the VM and convert the raw image to qcow2 format

qemu-img convert -f raw -O qcow2 pkvm_vm.img powerkvm.qcow2

Additionally Ironic needs to be told that this is a whole disk image by executing the following commands

nova flavor-key baremetal set "capabilities:boot_option"="local"
ironic node-update <node_uuid> properties/capabilities='boot_option:local'

Hope this helps you in setting up baremetal cloud to exploit the advantages of Power servers for performance critical workloads. In case of any issues please do post your comments and I’ll be more than happy to help.

If you are looking for detailed instructions on OpenStack Ironic setup to manage scale-out Power servers, please refer to the following articles

Pradipta Kumar Banerjee

I'm a Cloud and Linux/ OpenSource enthusiast, with 16 years of industry experience at IBM. You can find more details about me here - Linkedin

You may also like...