Contact Info

sean [at] coreitpro [dot] com gpg key

sc68cal on Libera

Building a cheap, compact, and multinode DevStack environment for a home lab

One of the first things that any new OpenStack contributor will do, is to download DevStack and run stack.sh in order to set up a development version of OpenStack.

It could be a virtual machine, it could be on their laptop. Heck, it could be on a virtual machine in a public OpenStack cloud (this is what is used by the OpenStack CI system).

I personally have run DevStack a wide range of environments. For a long time, I ran it by using vagrant_devstack. The advantages were that by using Vagrant, I could quickly build, use, and destroy virtual machines on my laptop, and also share Vagrant configurations with fellow developers, and we’d all have identical environments.

Set up PXE and TFTP on FreeBSD

DHCPD config

subnet 192.168.1.0 netmask 255.255.255.0{
	range 192.168.1.10 192.168.1.254;
	option routers 192.168.1.1;
	server-identifier 192.168.1.1;
	next-server 192.168.1.1;

	# PXE boot for NUCs
	filename "pxelinux.0";
}

Inetd configuration

daishi# grep 'tftp' /etc/inetd.conf
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /tank/tftpboot
tftp    dgram   udp6    wait    root    /usr/libexec/tftpd      tftpd -l -s /tank/tftpboot
daishi#

I have an Amazon S3 bucket that I use to serve out kickstart scripts - because I am too lazy to run my own HTTP server at home - after doing it for a number of years I’m happy to pay $0.10 to Amazon to have them deal with it.

d-i debian-installer/locale string en_US

d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select us

d-i netcfg/choose_interface select auto

d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain

d-i mirror/country string manual
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string

d-i user-setup/encrypt-home boolean false

d-i clock-setup/utc boolean true

d-i time/zone string US/Eastern

d-i clock-setup/ntp boolean true

# To create a normal user account.
d-i passwd/user-fullname string Stack
d-i passwd/username string stack
d-i passwd/user-password password stack
d-i passwd/user-password-again password stack
d-i user-setup/allow-password-weak boolean true


d-i partman-auto/method string lvm

d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true

d-i partman-auto/choose_recipe select atomic

d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true


d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

tasksel	tasksel/first	multiselect	openssh-server standard

d-i pkgsel/include string python

d-i grub-installer/only_debian boolean true

d-i grub-installer/with_other_os boolean true

d-i finish-install/reboot_in_progress note

Here is the pxelinux config, which I have set up to provide both Ubuntu 14.04 kernels and Ubuntu 15.04 kernels.

default ubuntu1610

label ubuntu1404
  kernel ubuntu1404/linux
  append initrd=ubuntu1404/initrd.gz ks=http://coreitpro-kickstart.s3-website-us-east-1.amazonaws.com/ubuntu1404/ks.cfg
  prompt 0
  timeout 0
label ubuntu1504
  kernel ubuntu1504/linux
  append initrd=ubuntu1504/initrd.gz ks=http://coreitpro-kickstart.s3-website-us-east-1.amazonaws.com/ubuntu1404/ks.cfg
  prompt 0
  timeout 0
label ubuntu1604
  kernel ubuntu1604/linux
  append initrd=ubuntu1604/initrd.gz priority=critical interface=auto netcfg/dhcp_timeout=120 console-setup/layoutcode=us auto=true url=http://coreitpro-kickstart.s3-website-us-east-1.amazonaws.com/preseed.cfg
  prompt 0
  timeout 0
label ubuntu1610
  kernel ubuntu1610/linux
  append initrd=ubuntu1610/initrd.gz priority=critical interface=auto netcfg/dhcp_timeout=120 console-setup/layoutcode=us auto=true url=http://coreitpro-kickstart.s3-website-us-east-1.amazonaws.com/preseed.cfg
  path ubuntu1610/boot-screens/
  include ubuntu1610/boot-screens/menu.cfg
  default ubuntu1610/boot-screens/vesamenu.c32
  prompt 0
  timeout 0

The kernel and initial ramdisk were manually fetched from the Ubuntu’s netboot installer directory, at the following URLs

  • http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/

  • http://archive.ubuntu.com/ubuntu/dists/vivid/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/