From 61255959609a5ab075f44b33047017da8680c64c Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Mon, 28 Jul 2014 10:34:10 +0200 Subject: [PATCH] labs: add Ubuntu 14.04 LTS support library This patch adds an osbash support library for Ubuntu 14.04 LTS. It allows osbash to build basedisks based on that distribution. The patch also documents the new option in localrc. Note that the new library differs from the Ubuntu 12.04 LTS version only in the URL of the ISO image. The URL could be passed as an argument and both libraries merged. Such a refactoring can be undertaken later on, should we keep adding libraries we almost identical content. Also note that these libraries do not pass bashate (formerly know as bash8). Maybe we can find a better way to store the boot argument string that is bashate conformant, readable/editable, and correct code. Implements: blueprint openstack-training-labs Change-Id: I2a6f848f47e8bcb5a9ff7bb3abb5cbef9d7790a5 --- labs/config/localrc | 4 +- labs/lib/osbash/lib.ubuntu-14.04-server-amd64 | 52 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 labs/lib/osbash/lib.ubuntu-14.04-server-amd64 diff --git a/labs/config/localrc b/labs/config/localrc index e95586fd..ac3eab56 100644 --- a/labs/config/localrc +++ b/labs/config/localrc @@ -8,7 +8,9 @@ # to the Internet, this is not sufficient. #VM_PROXY="http://192.168.178.20:3128" -# Options: ubuntu-12.04.4-server-amd64 (default), fedora-20-x86_64 +# Options: ubuntu-12.04.4-server-amd64 (default) +# ubuntu-14.04-server-amd64 +# fedora-20-x86_64 #DISTRO=ubuntu-12.04.4-server-amd64 #DISTRO=fedora-20-x86_64 diff --git a/labs/lib/osbash/lib.ubuntu-14.04-server-amd64 b/labs/lib/osbash/lib.ubuntu-14.04-server-amd64 new file mode 100644 index 00000000..e45c37fa --- /dev/null +++ b/labs/lib/osbash/lib.ubuntu-14.04-server-amd64 @@ -0,0 +1,52 @@ +# Ubuntu 14.04 LTS amd64 server + +# Default scripts for all Ubuntu installs +: ${BASE_INSTALL_SCRIPTS:=scripts.ubuntu} + +#------------------------------------------------------------------------------- +# Booting the operating system installer +#------------------------------------------------------------------------------- + +readonly ISO_URL=http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso + +readonly _PS_ssh=http://git.openstack.org/cgit/openstack/training-guides/plain/labs/lib/osbash/netboot/preseed-ssh.cfg +readonly _PS_vbadd=http://git.openstack.org/cgit/openstack/training-guides/plain/labs/lib/osbash/netboot/preseed-vbadd.cfg +readonly _PS_all=http://git.openstack.org/cgit/openstack/training-guides/plain/labs/lib/osbash/netboot/preseed-all.cfg + +readonly _BOOT_ARGS="/install/vmlinuz + noapic + preseed/url=%s + debian-installer=en_US + auto=true + locale=en_US + hostname=osbash + fb=false + debconf/frontend=noninteractive + keyboard-configuration/modelcode=SKIP + initrd=/install/initrd.gz + console-setup/ask_detect=false" + +function vbox_distro_start_installer { + local VM_NAME=$1 + + # pick a _PS_* file + local PRESEED=_PS_$VM_ACCESS + + echo "Using $PRESEED ${!PRESEED}" + + local BOOT_ARGS=$(printf "$_BOOT_ARGS" "${!PRESEED}") + + vbox_kbd_escape_key + vbox_kbd_escape_key + vbox_kbd_enter_key + + vbox_sleep 1 + + echo "Pushing boot command line" + vbox_kbd_string_input "$VM_NAME" "$BOOT_ARGS" + + echo "Initiating boot sequence" + vbox_kbd_enter_key +} + +# vim: set ai ts=4 sw=4 et ft=sh: