iPXE discussion forum
Standardizing the Build Environment... - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Standardizing the Build Environment... (/showthread.php?tid=6848)



Standardizing the Build Environment... - MultimediaMan - 2013-03-03 14:51

On the IRC channel, I brought up the topic of Scripting and Logging the build artifacts to keep bookkeeping simpler.

This is what I'm using currently:

Code:
#!/bin/bash
#Build Script:

#Script Variables

builduser=_yourbuildusername_

bld_dt=`date +"%y-%m-%d-%H-%M-%S"`
ipx_dir=/home/$builduser/Projects/iPXE/ipxe
src_dir=/home/$builduser/Projects/iPXE/ipxe/src/bin
out_dir=/home/$builduser/Projects/iPXE/Builds/iPXE_Build_$bld_dt
scr_dir=/home/$builduser/Projects/iPXE/Embedded-Scripts


#    Make Artifacts Directory
mkdir $out_dir
mkdir $out_dir/Embedded-Scripts
mkdir $out_dir/config
cp $ipx_dir/src/config/local/*.h $out_dir/config/.
cp $scr_dir/*.ipxe $out_dir/Embedded-Scripts/.

#    Clean iPXE Source Directory
rm -f $src_dir/undionly.kpxe
rm -f $src_dir/undionly.kkpxe
rm -f $src_dir/ipxe.iso
rm -f $src_dir/ipxe.pxe
rm -f $src_dir/ipxe.usb

#Update iPXE Source Tree
cd $ipx_dir
git pull
cd $ipx_dir/src

#Make iPXE
make

#Compile UNDIonly.kpxe Boot Strap Program, No Embedded Script
make bin/undionly.kpxe
#    Copy Artifacts to Current Directory
cp $src_dir/undionly.kpxe $out_dir/defipxe.kpxe

#Compile UNDIonly.kkpxe (For Problem BIOS) Boot Strap Program, No Embedded Script
make bin/undionly.kkpxe
#    Copy Artifacts to Current Directory
cp $src_dir/undionly.kkpxe $out_dir/defipxe.kkpxe

#Compile ipxe.iso ISO Image Boot Strap Program, No Embedded Script
make bin/ipxe.iso
#    Copy Artifacts to Current Directory
cp $src_dir/ipxe.iso $out_dir/defipxe.iso

#Compile ipxe.pxe 2nd Stage Boot Strap Program, No Embedded Script
make bin/ipxe.pxe
#    Copy Artifacts to Current Directory
cp $src_dir/ipxe.pxe $out_dir/defipxe.pxe

#Compile ipxe.usb USB Boot Strap Program, No Embedded Script
make bin/ipxe.usb
#    Copy Artifacts to Current Directory
cp $src_dir/ipxe.iso $out_dir/defipxe.usb

#Compile UNDIonly.kpxe Boot Strap Program, with webipxe.ipxe Embedded Script
make bin/undionly.kpxe EMBED=$scr_dir/webipxe.ipxe
#    Copy Artifacts to Current Directory
cp $src_dir/undionly.kpxe $out_dir/webipxe.kpxe

#Compile UNDIonly.kkpxe Boot Strap Program (For Problem BIOS), with webipxe.ipxe Embedded Script
make bin/undionly.kkpxe EMBED=$scr_dir/webipxe.ipxe
#    Copy Artifacts to Current Directory
cp $src_dir/undionly.kkpxe $out_dir/webipxe.kkpxe

#Compile ipxe.iso ISO Image Boot Strap Program, with isoipxe.ipxe Embedded Script
make bin/ipxe.iso EMBED=$scr_dir/isoipxe.ipxe
#    Copy Artifacts to Current Directory
cp $src_dir/ipxe.iso $out_dir/webipxe.iso

#Compile ipxe.pxe 2nd Stage Boot Strap Program, with webnative.ipxe Embedded Script
make bin/ipxe.kpxe EMBED=$scr_dir/webnative.ipxe
#    Copy Artifacts to Current Directory
cp $src_dir/ipxe.kpxe $out_dir/webipxe.pxe

#Compile ipxe.usb USB Boot Strap Program, with isoipxe.ipxe Embedded Script
make bin/ipxe.usb EMBED=$scr_dir/isoipxe.ipxe
#    Copy Artifacts to Current Directory
cp $src_dir/ipxe.usb $out_dir/webipxe.usb

#distribute artifacts
#WIP

Thoughts?


RE: Standardizing the Build Environment... - robinsmidsrod - 2013-03-03 18:34

For reference, I'll post what I said on IRC, in case someone else wants to join the conversation:

Quote:<robinsmidsrod> well, if you want to ponder it some more, the most important thing to start with is to figure out what knobs would need to be allowed to be tweaked
<robinsmidsrod> once we have that, we have to make a data structure to hold it
<robinsmidsrod> once we have that, we need to create a worker that can build said artifact from data structure
<robinsmidsrod> once we have that, we need a way to remote orchestrate it (I like zeromq for that)
<robinsmidsrod> once we have that, we can make a web and/or desktop client
<robinsmidsrod> (or even cmdline)
<robinsmidsrod> imagine having a java application you can start with web start or something, it asks you for some configuration details, it gives you a file chooser for setting your embedded scripts and such and you should be ready to go, send it off to the build farm and back you get a binary after a short while

Also see my post to the mailing-list: http://lists.ipxe.org/pipermail/ipxe-devel/2012-December/002082.html