Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== FreeBSD Test Cluster Automation ===== * Student: [[/KamilCzekirda|Kamil Czekirda]] * Mentor: [[/WarnerLosh|Warner Losh]] ===== Project Description: ===== 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). ===== Current status ===== ===== Howto ===== ==== Scheme ==== {{http://iem.pw.edu.pl/~czekirdk/scheme2.png}} ==== TFTP ==== http://doc.freenas.org/9.3/freenas_services.html#tftp Just put undionly.kpxe into main directory in your favourite server. ==== DHCP ==== Only add the condition: <code> if exists user-class and ( option user-class = "iPXE" ) { filename "http://192.168.22.3/menu.ipxe"; } else { filename "undionly.kpxe"; } </code> into your subnet section and hosts, from my lab: <code> 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"; } </code> ==== NFS ==== http://doc.freenas.org/9.3/freenas_sharing.html#unix-nfs-shares ==== HTTP ==== 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). ==== files in repository ==== <code> dhcp/ dhcp server example ipxe/ iPXE port master/ storage content mfsbsd/ mfsbsd for nodes tftp/ tftp server content www/ http server content </code> ==== setup ==== * 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) ==== workflow ==== * 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 ===== Bugs and not done ===== ===== Schedule ===== | Week 1 (22) | May 25, 2015 - June 1, 2015 | [[SummerOfCode2015/FreeBSDTestClusterAutomation/ipxePort|iPXE port for FreeBSD (build images)]] | done | | Week 2 (23) | June 2, 2015 - June 8, 2015 | [[SummerOfCode2015/FreeBSDTestClusterAutomation/ipxePort|iPXE port for FreeBSD (build images)]] | done | | Week 3 (24) | June 9, 2015 - June 15, 2015 | [[SummerOfCode2015/FreeBSDTestClusterAutomation/ram|(BSDCan) infrastructure for boot a diskless machine from memory]] | done | | Week 4 (25) | June 16, 2015 - June 22, 2015 | [[SummerOfCode2015/FreeBSDTestClusterAutomation/nfs|infrastructure for boot a diskless machine from NFS by pxeboot]] | failed... | | Week 5 (26) | June 23, 2015 - June 29, 2015 | [[SummerOfCode2015/FreeBSDTestClusterAutomation/reboot|(Mid-term evaluations deadline) iPXE script for booting from disk after finished system installation]] | done | | Week 6 (27) | June 30, 2015 - July 6, 2015 | [[SummerOfCode2015/FreeBSDTestClusterAutomation/backend|backend and nodes management]] | done | | Week 7 (28) | July 7, 2015 - July 13, 2015 | [[SummerOfCode2015/FreeBSDTestClusterAutomation/backend|backend and nodes management]] | done | | Week 8 (29) | July 14, 2015 - July 20, 2015 | [[SummerOfCode2015/FreeBSDTestClusterAutomation/frontend|frontend]] | done | | Week 9 (30) | July 21, 2015 - July 27, 2015 | [[SummerOfCode2015/FreeBSDTestClusterAutomation/frontend|frontend]] | done | | Week 10 (31) | July 28, 2015 - August 3, 2015 | [[SummerOfCode2015/FreeBSDTestClusterAutomation/frontend|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... | ===== The Code ===== [[https://socsvn.freebsd.org/socsvn/soc2015/kczekirda/|svn repository]] [[http://svnweb.freebsd.org/socsvn/soc2015/kczekirda/|svnweb]] ===== Useful Links ===== ==== Files ==== ==== Weekly status report ==== * [[https://lists.freebsd.org/pipermail/soc-status/2015-June/000892.html|Weekly Status #1]] * [[https://lists.freebsd.org/pipermail/soc-status/2015-June/000901.html|Weekly Status #2]] * [[https://lists.freebsd.org/pipermail/soc-status/2015-June/000917.html|Weekly Status #3]] * [[https://lists.freebsd.org/pipermail/soc-status/2015-June/000917.html|Weekly Status #4]] * [[https://lists.freebsd.org/pipermail/soc-status/2015-July/000924.html|Weekly Status #5]] ---- {{tag>Historical}} summerofcode2015/freebsdtestclusterautomation.txt Last modified: 2018/03/18 17:30by MarkLinimon