Install OS Sequence

  1. Node starts PXE boot
  2. Node fetch profile, RackHD sends install-os profile
  3. Node download installer kernel/initrd (from OS repository) by the definition of profile.
  4. Node boots installer
  5. Installer download files from OS repository, and install OS into disk
  6. Node sends notification to RackHD to signify installation finishes.

Profile

  • Determines which OS to install

  • Specify kernel, initrd and boot arguments, usally each OS will provide the pxeboot images

echo Starting CentOS/RHEL <%=version%> installer for ${hostidentifier}

set base-url <%=repo%>/images/pxeboot
set params initrd=initrd.img ks=<%=installScriptUri%> hostname=<%=hostname%> ksdevice=bootif BOOTIF=01-${netX/mac} console=<%=comport%>,115200n8 console=tty0
kernel ${base-url}/vmlinuz repo=<%=repo%> ${params}
initrd ${base-url}/initrd.img

boot || prompt --key 0x197e --timeout 2000 Press F12 to investigate || exit shell

Kickstart

OS Callback

  • Notify the OS installation completion during the first boot
  • Find the right point where OS installation is really completed.
  • The callback only call a simple RackHD notification API
  • The callback script will be deleted after notification

The callback script for centos:

set -e
echo "Attempting to call back to RackHD CentOS installer"
wget --retry-connrefused --waitretry=1 -t 300 --post-data '{"nodeId":"<%=nodeId%>"}' --header='Content-Type:application/json' http://<%=server%>:<%=port%>/api/current/notification
# Only run this once to verify the OS was installed, then disable it forever
chkconfig centos.rackhdcallback off

PubSub Style

A simple version of install os job:

InstallOsJob.prototype._run = function() {
    var self = this;

    self._subscribeRequestProfile(function() {
        return self.profile;
    });

    self._subscribeRequestProperties(function() {
        return self.options;
    });

    self._subscribeNodeNotification(self.nodeId, function(data) {
        return self._done();
    });
};

Challenge

  • Some OS installation needs multiple reboot, this is a challenge for current RackHD architecture.

  • Introduce the OS installation code flow and practice how to do OS installation in RackHD.

Goals:

(1)Understand the OS installation code flow.

(2)Understand how to setup OS repository (setup_iso.py and Http proxy)

(3)Successfully run an OS installation using workflow.

(4)EJS template

Practice:

(1)Successfully install ESXi/CentOS/SUSE/Ubuntu/Windows using example payload.

(2)Add the new option “timezone” for OS installation

results matching ""

    No results matching ""