I would like to work on Testing Infrastructure (FreeBSD cluster).

My goal is complete infrastructure for automatization installs and tests of FreeBSD.

The base of this project will be iPXE and iPXE scripts as a backend to control nodes. For frontend I propose a small python webapplication.

The applications of this project are non-limited (testing kernels, network test, parallel packages building).

http://doc.freenas.org/9.3/freenas_services.html#tftp

Just put undionly.kpxe into main directory in your favourite server.

Only add the condition:

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://192.168.22.3/menu.ipxe";
}
    else {
    filename "undionly.kpxe";
}

into your subnet section

and hosts, from my lab:

host node01 { hardware ethernet xx:xx:xx:xx:xx:xx; fixed-address 192.168.22.51; option host-name "node01"; }
host node02 { hardware ethernet xx:xx:xx:xx:xx:xx; fixed-address 192.168.22.52; option host-name "node02"; }
host node03 { hardware ethernet xx:xx:xx:xx:xx:xx; fixed-address 192.168.22.53; option host-name "node03"; }

I have two http services, one in standard 80 port, it's for static files, the iso and init menu.ipxe script. The second service is running on port 8080, it's small python webapp (management).

dhcp/   dhcp server example
ipxe/	  iPXE port
master/ storage content
mfsbsd/ mfsbsd for nodes
tftp/   tftp server content
www/    http server content
  • setup FreeNAS and jail
  • install in jail: subversion, py27-sqlite3, rsync, curl, python, apache24
  • start servers: dhcp, tftp, http and nfs
  • create local copy of freebsd repo: svn checkout svn://svn.freebsd.org/base/head/ /cluster/usr/src/
  • add node in management - http://192.168.22.3:8080/admin and set take_task.ipxe as boot
  • add task (revision number)
  • node starts with take_task status (take_task.ipxe as a boot)
  • node sends DHCP request and gives an answer with next-server and filename options (filename “undionly.kpxe”)
  • node downloads undionly.kpxe by tftp protocol and execute it
  • iPXE sends DHCP request and gives an answer with filename option: http://192.168.22.3/menu.ipxe
  • menu.ipxe is iPXE script and asks the management for chainloading next script (chain http://${www}:${port}/menu/${net0/mac})
  • management returns static file take_task.ipxe
  • take_task.ipxe runs next chainloading: chain http://${www}:${port}/admin/take_task/${net0/mac}
  • management creates new task by /cluster/new_task.sh script
  • management changes node status from take_task to wait
  • management chenges task status from new to preparing
  • node waits for next chainloading
  • when management finish preparing task change node status to cluster.ipxe
  • node chainloads cluster.ipxe script and uses sanboot to boot mfsBSD
  • mfsBSD mounts storage in /cluster
  • mfsBSD runs /cluster/run.sh script
  • run.sh script compiles the source, build world, kernel, make ftp and installs dist on hdd (current status is available in storage in nodeXX/run.log file)
  • run.sh if everything goes fine changes node status to rebooting and boot to hdd.ipxe
  • node reboots and changes boot status to take_task.ipxe
Week 1 (22) May 25, 2015 - June 1, 2015 iPXE port for FreeBSD (build images) done
Week 2 (23) June 2, 2015 - June 8, 2015 iPXE port for FreeBSD (build images) done
Week 3 (24) June 9, 2015 - June 15, 2015 (BSDCan) infrastructure for boot a diskless machine from memory done
Week 4 (25) June 16, 2015 - June 22, 2015 infrastructure for boot a diskless machine from NFS by pxeboot failed…
Week 5 (26) June 23, 2015 - June 29, 2015 (Mid-term evaluations deadline) iPXE script for booting from disk after finished system installation done
Week 6 (27) June 30, 2015 - July 6, 2015 backend and nodes management done
Week 7 (28) July 7, 2015 - July 13, 2015 backend and nodes management done
Week 8 (29) July 14, 2015 - July 20, 2015 frontend done
Week 9 (30) July 21, 2015 - July 27, 2015 frontend done
Week 10 (31) July 28, 2015 - August 3, 2015 frontend done
Week 11 (32) August 4, 2015 - August 10, 2015 tests, fixes and documentation donee
Week 12 (33) August 11, 2015 - August 17, 2015 tests, fixes and documentation in progress…
  • summerofcode2015/freebsdtestclusterautomation.txt
  • Last modified: 2018/03/18 17:30
  • by MarkLinimon