Skip to content

Instantly share code, notes, and snippets.

@gbraad
Last active July 5, 2016 02:14
Show Gist options
  • Select an option

  • Save gbraad/f2b364d1fb3533b8b5b32dc37ea2865c to your computer and use it in GitHub Desktop.

Select an option

Save gbraad/f2b364d1fb3533b8b5b32dc37ea2865c to your computer and use it in GitHub Desktop.
Installing Ironic standalone

Ironic

Overview - Ironc

OpenStack Ironic is a bare metal as a service deployment tool.

I used pxe+ssh, as it virtualizes bare-metal deployment for testing purposes, so only one machine is needed. The machine should have 16GB+ of RAM. This is because it will install other OpenStack services for integration, such as Glance, Nova, etc. Please see the developer documentation and how to get started.

DevStack configuration

Interaction flow

  • Nova contacts Ironic to allocate an Ironic node providing the image to boot
  • Ironic pulls the image from Glance and stores it on the local hard disk
  • Ironic boots a virtual machine via SSH with a PXE-enabled seabios BIOS
  • The seabios code asks Ironic’s tftpserver for a deploy ramdisk and kernel
  • The deployed node starts the deploy kernel and ramdisk
  • The deploy ramdisk does the following:
    • Starts tgtd to present the root device as an iSCSI disk on the network
    • Contacts the Ironic ReST API to initiate iSCSI transfer of the image
    • Waits on port 10000 for a network connection to indicate the iSCSI transfer is complete
    • Reboots the node once port 10000 has been opened and closed by a process
  • Once the deploy ramdisk contacts Ironic to initiate iSCSI transfer of the image ... Ironic does the following:
    • uses iscsiadm to connect to the ISCSI target on the deploy hardware
    • spawns several dd processes to copy the local disk image to the iSCSI target
    • Once the dd processes exit successfully, Ironic contacts port 10000 on the deploy node
  • Ironic changes the PXEboot configuration to point to the user’s actual desired ramdisk and kernel
  • The deploy node reboots into seabios again
  • The node boots the proper ramdisk and kernel, which load the disk image that was written via iSCSI

Source

Overview - Ironic Standalone

To install Ironic as standalone, there are at least two approaches available:

They are both based on a set of Ansible scripts to setup an environment in which Ironic can be used for bare-metal deployments.

This means that none of the other OpenStack components are used; such as Nova, Glance, etc. Nginx is used in this case to serve the images. And dnsmasq is comfigured to handle the DHCP/BOOTP requests, and points to the relevant location for a node.

Bifrost, for instance, currently uses Ansible to setup a source based deployment of these components. While Ansible-Ironic-Standalone uses RDO packages to accomplish the same. However, the latter project allows for a finegrained deployment of components if some of them already exists in your environment.

Both of these tools have a higher success rate when deployed on Ubuntu than CentOS. (Related to how development is done).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment