Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jan 2016 09:39:23 GMT
From:      kczekirda@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r297777 - soc2015/kczekirda/asiabsdcon2016
Message-ID:  <201601240939.u0O9dNJU025136@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kczekirda
Date: Sun Jan 24 09:39:19 2016
New Revision: 297777
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=297777

Log:
  asiabsdcon

Added:
  soc2015/kczekirda/asiabsdcon2016/
  soc2015/kczekirda/asiabsdcon2016/mgmt.png   (contents, props changed)
  soc2015/kczekirda/asiabsdcon2016/node.png   (contents, props changed)
  soc2015/kczekirda/asiabsdcon2016/paper.pdf   (contents, props changed)
  soc2015/kczekirda/asiabsdcon2016/paper.tex
  soc2015/kczekirda/asiabsdcon2016/revision.png   (contents, props changed)

Added: soc2015/kczekirda/asiabsdcon2016/mgmt.png
==============================================================================
Binary file. No diff available.

Added: soc2015/kczekirda/asiabsdcon2016/node.png
==============================================================================
Binary file. No diff available.

Added: soc2015/kczekirda/asiabsdcon2016/paper.pdf
==============================================================================
Binary file. No diff available.

Added: soc2015/kczekirda/asiabsdcon2016/paper.tex
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/asiabsdcon2016/paper.tex	Sun Jan 24 09:39:19 2016	(r297777)
@@ -0,0 +1,90 @@
+\documentclass[a4paper,11pt,notitlepage]{article}

\usepackage[utf8]{inputenc}	% latin2 - kodowanie iso-8859-2; cp1250 - kodowanie windows
\usepackage[T1]{fontenc}
\usepackage[MeX]{polski}
\usepackage{hyperref}
\usepackage{graphicx}

\author{Kamil Czekirda}

\title{FreeBSD Test Cluster Automation\\{\small AsiaBSDCon 2016, Tokyo, 10-13 March}}

\date{}

\linespread{1.3}

\usepackage{indentfirst}

\begin{document}

\maketitle

\section{Introduction}
“FreeBSD Test Cluster Automation” is a Google Summer of Code 2015 project for FreeBSD organization to create an infrastructure for automated tests of FreeBSD building, installation and first boot process.
+
+The base of this project is iPXE - Open Source Boot Firmware, which I use for controlling nodes. A small webapplication written in python is a frontend for the database where I save informations about nodes, current states and states of revisions. The project use also mfsBSD and \texttt{bsdinstall} extension from Google Summer of Code 2014 for non interactive installation process. 
+
+On the server side I use FreeNAS to provide shared storage and jails for applications. The ZFS filesystem with deduplication enabled on dataset for source code allows me to save every tested revision of the source code with space saving. 
+
+The most important requirement during this project is as little intervention as possible.
+
+\section{iPXE port}
+The firts stage of the project was creating iPXE port for FreeBSD. The port is ready for submition and has many possibilities for extensions.

\section{Servers side}
+Details of configuration I'll include in final paper.
+
+\subsection{DHCP Server}
Firts step of booting node from network is DHCP service. DHCP server responds with a DHCP packet that included PXE options, in this case the name of TFTP boot server and a boot file. 
+
+\subsection{TFTP Server}
+On the TFTP server I only store iPXE loader compiled from the port.
+
+\subsection{HTTP Server}
+On the HTTP server I only store iso image of custom mfsBSD, iPXE loader runs it if node should to take new task.
+
+\subsection{NFS Server}
+The NFS server it's a storage for source code and obj files if node have not enough RAM memory. NFS service is provided by FreeNAS and stored on the ZFS filesystem. The dataset have enabled deduplication.
+
+\subsection{Management}
+The frontend of management application is writen in python with bottle framework. This is the place, where I can manage my nodes and revisions. Screenshot is below.
+
+\begin{figure}
+\begin{center}
+  \centering
+  \includegraphics[width=1\textwidth]{mgmt.png}
+\end{center}
+\end{figure}
+
+\section{Client side}
+From client side there is only one thing I have to carry on - setup boot order - from network. The iPXE uses scripts to decide which is next step on booting - hard drive or network.
+
+\section{Workflow}
+
+\subsection{The node}
+\begin{itemize}
+\item the node starts from netbooting and take\_task.ipxe file
+\item in first step of PXE booting node sends DHCP request and DHCP server respond with \texttt{next-server} and \texttt{filename} options and node knows what and from to download. 
+\item the node downloads iPXE loader binary by TFTP protocol and executes it
+\item iPXE sends DHCP request and gives an answer with different filename option - url to iPXE starting script
+\item iPXE starting script asks the management for chainloading next script and authorize itself by mac address
+\item management return \texttt{take\_task.ipxe} file
+\item \texttt{take\_task.ipxe} runs next chainloading and node waits for environment preparation, in this time on server side script \texttt{take\_task.sh} prepares files (update svn, rsync to new src space)
+\item the node chainloads \texttt{cluster.ipxe} script and node starts mfsBSD
+\item the node mounts storage from NFS server and building process starts (\texttt{make buildworld, make buildkernel} and \texttt{make ftp})
+\item after building the node tries to install the system on hard drive from files compiled and created during this task
+\item the node reboots and boots from hdd
+\item the node reboots and boots from the network like in first step
+\end{itemize}
+
+If any step from building, installing or booting stage fails then the node starts netbooting and takes new task.
+
+\begin{figure} [h]
+\begin{center}
+  \centering
+  \includegraphics[width=1\textwidth]{node.png}
+\end{center}
+\end{figure}
+
+\subsection{Revision}
+
+\begin{itemize}
+\item first status of revision is NEW, in this status revision waits for free node to take task 
+\item when the node starts netbooting and revision is first in the queue status changes to preparing
+\item in next steps revision is tested by compilation, installation and boot
+\item revision is marked as success or failed and logs of every steps are available on management server
+\end{itemize}
+
+\begin{figure} [h]
+\begin{center}
+  \centering
+  \includegraphics[width=1\textwidth]{revision.png}
+\end{center}
+\end{figure}
+
+\newpage
+
+\section{urls}
+
+\begin{itemize}
+\item \url{https://wiki.freebsd.org/SummerOfCode2015/FreeBSDTestClusterAutomation} \\
+\item \url{https://svnweb.freebsd.org/socsvn/soc2015/kczekirda/} \\
+\item \url{http://ipxe.org/}
+\end{itemize}
+
+\end{document}
\ No newline at end of file

Added: soc2015/kczekirda/asiabsdcon2016/revision.png
==============================================================================
Binary file. No diff available.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601240939.u0O9dNJU025136>