Hi Thomas,  I think your patch is a great approach and will make it easier to 
integrate with existing infrastructure.  You should document it before opening 
a issue & pull request to see if Joyent will accept it.  Thanks for the github 
link.

From: Thomas Haggett <[email protected]<mailto:[email protected]>>
Date: Thursday, July 2, 2015 at 3:23 PM
To: 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>, 
Adam Faris <[email protected]<mailto:[email protected]>>
Cc: "Joshua M. Clulow" <[email protected]<mailto:[email protected]>>
Subject: Re: [smartos-discuss] Are unattended network installs possible?

Hi Adam,

For what it’s worth, I’m adding some automated provisioning of our hardware 
into our SmartOS environment - when we originally deployed SmartOS, SDC hadn’t 
yet been open-sourced (it had a hefty price tag associated with it, I seem to 
remember).

I have added a patch[1] into our platform builds to do this - the 
/system/boot/config_script file is provided by the boot loader (iPXE in our 
case) via the bootfs mechanism and is invoked via that patch for any 
un-configured hypervisors. If it isn’t provided, the box boots as a regular 
SmartOS node and prompts for configuration.
In addition to this script, iPXE also populates a /system/boot/config file that 
contains the appropriate /usbkey/config contents - we use iPXE’s variable 
replacement to pull down the file corresponding to the system’s first MAC 
address, and just use our hypervisor inventory to automatically populate those 
static files on our boot servers. The neat thing is, once the boot loader is 
finished, the system doesn’t actually need network access as the boot 
filesystem already has the data it needs to provision, so this removed the 
previous hacks I had on the platform which previously tried to run DHCP on the 
first ethernet interface before the configuration script ran.

Anyway. The interesting bit of our iPXE config looks something along the lines 
of:

kernel /tftpboot/${version}/platform/i86pc/kernel/amd64/unix -B 
smartos=true${boot_args}
module /tftpboot/${version}/platform/i86pc/amd64/boot_archive type=rootfs 
name=ramdisk
module /tftpboot/config_script type=file name=config_script
module /tftpboot/config/${net0/mac:hexhyp}.config  type=file name=config
boot

For what it’s worth, in our environment we have a modest number of Dell 
hypervisors that we PXE boot off a pair of Ubiquiti EdgeRouter Pro[2] that run 
a custom firmware that adds basic HTTP and TFTP serving of files. Seems to work 
quite well for our needs.

Thomas

[1] - 
https://github.com/joshado/smartos-live/blob/fa_20150622/overlay/generic/smartdc/lib/smartos_prompt_config.sh#L510-L518
[2] - https://www.ubnt.com/edgemax/edgerouter-pro/

On 2 Jul 2015, at 22:37, Adam Faris via smartos-discuss 
<[email protected]<mailto:[email protected]>> 
wrote:





-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to