<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linaro - Open source software for ARM SoCs &#187; Zygmunt Krynicki</title>
	<atom:link href="http://www.linaro.org/linaro-blog/author/zyga/feed/?mrss=off" rel="self" type="application/rss+xml" />
	<link>http://www.linaro.org/linaro-blog</link>
	<description></description>
	<lastBuildDate>Thu, 13 Jun 2013 19:27:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>LAVA@Home</title>
		<link>http://www.linaro.org/linaro-blog/2011/11/30/lava-at-home/</link>
		<comments>http://www.linaro.org/linaro-blog/2011/11/30/lava-at-home/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 21:31:26 +0000</pubDate>
		<dc:creator>Zygmunt Krynicki</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[LAVA]]></category>
		<category><![CDATA[Linaro]]></category>

		<guid isPermaLink="false">http://www.linaro.org/linaro-blog/?p=965</guid>
		<description><![CDATA[I&#8217;m currently working on the flexible LAVA deployment blueprint. This blueprint is about untying our hands (both as developers and administrators) from having to provide Debian packages for our releases. This is especially important our major new dependency, celery, is not available &#8230; <a href="http://www.linaro.org/linaro-blog/2011/11/30/lava-at-home/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.linaro.org/linaro-blog/wp-content/uploads/2011/11/IMG_3464.jpg"><img class="alignnone size-medium wp-image-966" title="Panda and home-made power control board" src="http://www.linaro.org/linaro-blog/wp-content/uploads/2011/11/IMG_3464-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://www.linaro.org/linaro-blog/wp-content/uploads/2011/11/IMG_3464.jpg"></a>I&#8217;m currently working on the flexible <a href="https://blueprints.launchpad.net/lava-lab/+spec/flexible-lava-deployment-11.12">LAVA deployment blueprint</a>. This blueprint is about untying our hands (both as developers and administrators) from having to provide Debian packages for our releases. This is especially important our major new dependency, <a href="http://celeryproject.org/">celery</a>, is not available in Debian. The idea is to deploy both production and development releases from <a href="http://pypi.python.org/">pypi</a> using a mixture of release tarballs and source branches. This way we can do very frequent releases, test new features in isolation (one of the features of the <a href="http://bazaar.launchpad.net/~linaro-validation/lava-deployment-tool/trunk/view/head:/README">deployment tool</a> is an ability to install multiple instances of LAVA on one machine, ideally we&#8217;d get an instance for each merge request if we wish so).</p>
<p>The scrip has been improving and is now semi-production (see <a href="http://bazaar.launchpad.net/~linaro-validation/lava-deployment-tool/trunk/view/head:/TODO">TODO </a>for known issues) ready. It would be a shame to break production though so I wanted to do some testing before we actually use this. Since instances and global configuration are at odds I needed to make every component instance aware. This was not that hard, most of the things are using <em>lava-server manage</em> (or have been converted to do so) and thus get automatic configuration management for free. Other things, like the dispatcher did not and had to be improved (thanks for the quick patch mwhudson).</p>
<p>With all the pieces aligning I had only one thing left to do. Deploy an instance in a fresh virtual machine, connect it to a board and do some testing! This is something I have carefully avoided as the dispatcher is the most complicated (for practical reasons) components of the LAVA stack and the one that is, how shall I put it, least elegant.</p>
<p>One of the things you will notice is that you need to prepare a<em> master image</em> according to the <a href="https://wiki.linaro.org/Platform/Validation/LAVA/Documentation#Creating_a_master_image">instructions</a>. This step is not automated and is quite error prone. Everyone ends up with a different master image. While going through the pain of doing this I learned a few interesting things. I learned how to rebuild an arm initrd on intel (copy qemu-arm-static to your rootfs, mount proc+sys and chroot inside, finally invoke mkimage with all the arguments you can read from linaro-media-create (grep for mkimage), yuck!) I learned how to boot from nfs while using initrd (you need nfs-common in your ramdisk, add &#8220;ip=dhcp boot=nfs root=/dev/nfs nfsroot=192.168.1.40:/path/to/rootfs&#8221; to kernel command line, add insecure_locks to your nfs export line), I finally learned how to edit u-boot boot script (edit the plain text file and run mkimage with different options).</p>
<p>I have finally come up with a rather nice solution. Let me summarize the benefits:</p>
<ol>
<li>I only need a few megabytes on the SD card for LAVA, the rest can be devoted to testing so a 4GB card is more than enough to test all of our images.</li>
<li>The SD card will not wear out so badly and the critical parts are less likely to be damaged (and are faster to recover too)</li>
<li>The tests cannot harm our master root filesystem. This has happened before and it&#8217;s something we had to recover from manually.</li>
<li>I don&#8217;t get duplicate MAC addresses anymore, I can identify each board uniquely once it powers on.</li>
<li>We can experiment with remote booting and other new features</li>
<li>We can script the creation of all of the required components.</li>
<li>Each board could tell LAVA that it has been powered on and ask the system for things to do. LAVA could power down boards to save money and energy while the test queue is empty.</li>
<li>We could put intelligent piece on a board, consistently, so that we don&#8217;t have to rely on fragile serial port for communication. We could have standard APIs for boards!</li>
<li>We could stop caring if a board is locally attached or behind NAT on the other side of the planet.</li>
</ol>
<p>The only thing that made my setup different from the one in the lab was remote power control. In the lab we can recover from a failed test by power cycling a board. As long as the boot loader was not damaged we could still regain control. Unfortunately the hardware we used for that is rather pricey and I could not afford it. About a year ago I experimented with USB hubs that could replace expensive server hardware. You see, the USB specification defines that all hubs have an ability to turn a port on and off (it also includes LED control but I have not seen many hubs that actually implement that feature). Sadly none of the hubs I have at home implement this specification correctly. Details differ but technically what they do is turn the port off (it goes away as far as we are concerned) but keeps the power on. The other downside is that most USB hubs don&#8217;t provide enough power to run a board without additional power brick. That idea faded but now it got back in somewhat other form. An old colleague from Poland built a simple ARM-based device that acts as a USB cable with &#8230; USB control port for power. The board is small (half of the things I have on mine are not needed and are simply there because we reused hardware from some other project). It has a few LEDs thaw we could use for signaling (master image vs test image, recovery, etc). The software that runs on the micro controller is open and you can get the <a href="https://launchpad.net/usbpowercontrol">source</a> from launchpad. Since I did not need the mini-USB port on my Panda I plugged it to a 10W iPad USB power adapter. I connected the other end to my LAVA machine. The board is nice enough to show up as another serial port, you can echo a single ASCI digit there, the first bit of that digit controls power, the other three control LEDs on the board itself. I can turn my panda off with <em>echo 0 &gt; /dev/ttyACM0</em></p>
<p>So there you have it. I&#8217;ll post a separate article about the details of the master image and how it can change and improve our workflow. Now it&#8217;s time to run some tests!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linaro.org/linaro-blog/2011/11/30/lava-at-home/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>LAVA Fundamentals</title>
		<link>http://www.linaro.org/linaro-blog/2011/08/12/lava-fundamentals/</link>
		<comments>http://www.linaro.org/linaro-blog/2011/08/12/lava-fundamentals/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 21:24:00 +0000</pubDate>
		<dc:creator>Zygmunt Krynicki</dc:creator>
				<category><![CDATA[LAVA]]></category>
		<category><![CDATA[Linaro]]></category>
		<category><![CDATA[lava]]></category>

		<guid isPermaLink="false">http://www.linaro.org/linaro-blog/?p=382</guid>
		<description><![CDATA[This blog post talks about the core topics that LAVA deals with, dives into the architecture of the stack as it exists today and provides some background rationale for the design choices we made. If you are not familiar with &#8230; <a href="http://www.linaro.org/linaro-blog/2011/08/12/lava-fundamentals/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This blog post talks about the core topics that LAVA deals with, dives into the architecture of the stack as it exists today and provides some background rationale for the design choices we made. If you are not familiar with LAVA you may want to read the <a href="http://www.linaro.org/linaro-blog/2011/08/10/lava-introduction/">introduction</a> first.</p>
<p><span id="more-382"></span></p>
<p>LAVA is a broad project and to make it more manageable for day-to-day engineering we have separated it into a collection of smaller projects, focused on a narrow topic. Today LAVA has the following key sub-projects:</p>
<ul>
<li><a href="https://launchpad.net/lava-test">LAVA Test</a> is a framework and a command line tool for wrapping existing test programs and translating results into a common format.</li>
<li><a href="https://launchpad.net/lava-dispatcher">LAVA Dispatcher</a> is a framework and a command line tool for controlling test execution on a particular machine, including deployment of the initial environment.</li>
<li><a href="https://launchpad.net/lava-dashboard">LAVA Dashboard</a> is a web application for storing and viewing test results. It also has a simple data mining and reporting features.</li>
<li><a href="https://launchpad.net/lava-scheduler">LAVA Scheduler</a> is another web application for managing a collection of devices and processing a queue of test jobs to perform.</li>
</ul>
<p>There are many more smaller parts, all of which you can see on the <a href="http://launchpad.net/lava">LAVA project page</a> but I will not cover them directly here. To explain how the four key pieces work I will take you back to the May 2010 when this project started.</p>
<p>Originally the Validation / QA effort started out as two small projects: launch-control and abrek. The former was responsible for the so-called &#8220;validation dashboard&#8221; &#8211; a web application that makes sense of test results while the latter was a test execution/wrapper tool that allowed us to run an existing test, gather the result and upload it to the dashboard.</p>
<p>Abrek would allow you to customize how a test is installed, how to invoke and finally how to translate between the text output of the test program and the dashboard data format. Simple tests take a few minutes to <em>wrap</em> with this framework and we quickly got a few interesting, open source tests and benchmarks integrated.</p>
<p>During that early period one of the most fundamental interface was formed (that is still around today) that is, the concept of <em>dashboard bundles</em>, files containing machine-readable test results. We investigated existing formats but after a lot of mind-storming and thought experiments we realized that none of them could express the kind of data that we were interested in. We used plain text files with hierarchical data structure encoded as JSON. The idea was IMHO quite interesting because unlike virtually all other consolidated QA or CI systems that I came across before the actual data can be freely created, edited and moved around by conventional means and is not trapped in a complex database hidden behind proprietary APIs. A bundle can be written by any program that can output text, transmitted between systems by email, thumb drive or anything in between, uploaded to a dashboard, downloaded and re-sent somewhere else for processing.</p>
<p>Each bundle would contain one or more &#8220;test run&#8221; that describes the outcome of running a test somewhere. In addition to storing typical &#8220;pass/fail/skip/etc&#8221; status we wanted to be able to representing benchmarks and performance measurements. As soon as you think of benchmarks you will find the need to store the hardware and software context that describe the environment in which the test was performed. To formalize the format and validate bundles for correctness we have used <a href="http://tools.ietf.org/html/draft-zyp-json-schema-02">JSON Schema</a>. You can <a href="http://bazaar.launchpad.net/~linaro-validation/linaro-python-dashboard-bundle/trunk/view/head:/linaro_dashboard_bundle/schemas/dashboard_bundle_format_1.2.json">read the actual schema</a> if you are interested in that level of detail. The schema is maintained alongside helper APIs in a library called <a href="https://launchpad.net/linaro-python-dashboard-bundle">linaro-python-dashboard-bundle</a> (I really wish we could simple drop the &#8220;python&#8221; part now). Apart from what I already mentioned bundles can have arbitrary text or binary attachments, key-value attributes, references to code branches and a few other interesting features. So far we managed to map all of the tests and results we encountered in a meaningful way but if you think that, based on your experience, something is missing do let us know &#8211; the earlier we know the better.</p>
<p>If you are interested in looking at some real-life bundles you can see them using the integrated bundle viewer built into the dashboard. Note, that while bundle format is well-defined, various programs generate <em>different </em>bundles: LAVA dispatcher uses one bundle to store results of all the tests that were ran in one go on a single system (<a href="http://validation.linaro.org/lava-server/dashboard/streams/anonymous/lava-daily/bundles/bea57bc187496dda60a21432934b800712e5b920/">example</a>, remember to click on bundle viewer tab), a small script that processes measurements from various benchmarks built with specific version of the toolchain stores source code references and uses external attachments not to duplicate large amounts of data (<a href="http://validation.linaro.org/lava-server/dashboard/streams/anonymous/gcc/bundles/04e0bd44704435721a384fb615ef6aea42570520/">example</a>) while Abrek introspects software and hardware context for a particular test (<a href="http://validation.linaro.org/lava-server/dashboard/streams/anonymous/zyga/bundles/826e8c18b519e40db6aa51c22c65a0f2f62146da/">example</a>).</p>
<p>This Abrek/Launch Control duo was the smallest building block that allowed us to do testing and retrieve the results later. But that&#8217;s not the full story today.</p>
<p><em>Background note: a few months later Paul Larson invented the fantastic project name that we use today and we gradually transitioned from launch-control to LAVA Dashboard and from Abrek to LAVA Test.</em></p>
<p>To make testing reliable and predictable we wanted to run each test in a clean, pristine environment. This also allowed us to do simple Continuous Integration on the daily Linaro images that were being produced by various parts of the build system created by our infrastructure team. The details of how we actually do that are interesting but not essential here. The idea is to describe which image to deploy, which tests to install and run and pass this data to the <a href="https://launchpad.net/lava-dispatcher">LAVA Dispatcher</a>. The dispatcher would then encapsulate all the magic of automating the deployment. In theory anyone could implement the required APIs to have dispatchers running tests on development boards, silicon simulators, QEMU, virtual machines, off-the-shelf x86 boxes, servers and laptops. All that matters is the machine readable description of the test job.</p>
<p>While I purposefully skip the details, this was and still is one of the most challenging part of LAVA. Doing automated deployment and recovery is <strong>hard</strong>. There are lots of practical problems to solve, unexpected issues and hardware mis-design side-effects that make it very difficult to get this right. The details warrant a separate blog post which I will surely write. You may want to look at <a href="http://validation.linaro.org/lava-server/scheduler/job/55">example Android test job</a> and <a href="http://validation.linaro.org/lava-server/scheduler/job/383">example Ubuntu test job</a> straight from the history of our public scheduler instance.</p>
<p>As long as you have one board or other device and are happy with using lava-dispatcher to describe and deploy your test environment, lava-test to execute the test program and lava-dashboard to store and visualize the results you would not need more components. Since we were tasked with building and maintaining the Validation Lab that holds many different development boards, from all the Linaro members, we had to have another component that would allow us to manage the pool of available devices. This component is known as the LAVA Scheduler.</p>
<p>The scheduler has an extremely simple API: you can submit a job that will be passed down to the dispatcher that is responsible for a particular board. Apart from describing the actual test you can also specify which board or board class to use. Simple as that.</p>
<p>As we were developing the scheduler we quickly noticed that, as a web application, it would have to copy or somehow share various parts of the dashboard code base to get the level of integration we wanted. We have thus decided to split the dashboard into two parts: the actual dashboard-specific code and the generic webapp plumbing that allows us to reuse UI elements, RPC services, user database and a few other things. This component is now called LAVA Server. Whenever you install any of the web-facing parts you will also get the server to host them. In retrospective this decision was very good as it allowed us to quickly add new applications to the server and simply not have to worry about deployment complexity or integration issues.</p>
<p>As our server-side parts offer XML-RPC APIs we wanted to allow people to use them directly from the command line for experiments or simple scripting. We have created a set of command-line tools, called lava-<em>something</em>-tool by convention, that expose each XML-RPC method of the corresponding server-side component.</p>
<p>Today we have two such tools: lava-dashboard-tool and lava-scheduler-tool. Since we liked the concept lava-server we did the same thing here and wrote lava-tool to have a consistent command line tool framework.</p>
<p>This covers the core parts of LAVA. Remember that you can quickly install everything, apart from the dispatcher, from <a href="https://launchpad.net/~linaro-validation/+archive/ppa">our PPA</a>. You may also be interested in the server side API documentation by looking at the <a href="http://validation.linaro.org/lava-server/api/help/">API help page</a> of our public LAVA instance.</p>
<p>In the next installment I will take a closer look at LAVA Test and show you how to wrap a simple test program so that LAVA can use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linaro.org/linaro-blog/2011/08/12/lava-fundamentals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LAVA Introduction</title>
		<link>http://www.linaro.org/linaro-blog/2011/08/10/lava-introduction/</link>
		<comments>http://www.linaro.org/linaro-blog/2011/08/10/lava-introduction/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 14:43:24 +0000</pubDate>
		<dc:creator>Zygmunt Krynicki</dc:creator>
				<category><![CDATA[LAVA]]></category>
		<category><![CDATA[Linaro]]></category>
		<category><![CDATA[lava]]></category>

		<guid isPermaLink="false">http://www.linaro.org/linaro-blog/?p=372</guid>
		<description><![CDATA[Hi there. This is my first blog post for a long while and my very first post wearing my Linaro LAVA hat. Over the next several weeks I will introduce various topics related to LAVA, describe the overall architecture and &#8230; <a href="http://www.linaro.org/linaro-blog/2011/08/10/lava-introduction/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Hi there.</p>
<p><span>This is my first blog post for a long while and my very first post wearing my Linaro LAVA hat. Over the next several weeks I will introduce various topics related to LAVA, describe the overall architecture and design, listing all the participating components and finally drilling down to some practical examples.</span></p>
<p>TL;DR: LAVA-the-stack aims to make systematic, automatic and manual quality control more approachable for projects of all sizes.</p>
<p>Some people say I talk to much so I believe I may also write too much at times, I will gladly welcome all feeeback, please comment on what you find curious, interesting, lacking or inaccurate.</p>
<p>Currently LAVA is a brand. People use it to address topics ranging from test wrappers, data formats, the <a href="http://voices.canonical.com/michael.hudson/2011/07/25/what-the-linaro-validation-team-is-up-to/">validation lab test farm in Cambridge UK</a>, the official <a href="http://validation.linaro.org">validation website</a>, one of the <a href="https://launchpad.net/lava">dozen lava modules/projects</a> on Launchpad and everything in between. This is all good as it makes the brand stronger but it sometimes makes it hard to communicate successfully and unambiguously with others.</p>
<p>For me LAVA is a collection of participating components, the overall idea and evolving architecture that allows us to make testing, quality control and automation a little bit better than it is currently, that is&#8230; nowhere.</p>
<p>We, the free and open source community, have traditionally neglected quality. The perceived quality has improved over time, partially due to experience and improving awareness and partially to indirect tool support. Try to remember back before we had reliable build systems, distributed version control systems, sensible and widely deployed bug trackers. Times were fun indeed.</p>
<p>Good software feels good. It can have lots of bugs but as long as it feels good people are going to be happy using it. Bugs get fixed over time but that may not improve quality in any way. Quality is elusive. The distinctive properties vary with context and recipient. End user applications, system tools, developer tools, libraries, kernel drivers, packaging, documentation, artwork and design, community, translations, compatibility, migration path, feature set, web infrastructure, &#8230;even project name. All that, together, determines how we think of a particular piece of software.</p>
<p>To think that one can automate &#8220;quality&#8221; is naive. Quality is pretty much impossible to automate. It can be regarded as a process, much like some people look at security. Having said that, we are at the very early stages of working towards good quality. Usually a combination of excellence in development skills, taste and intuition coupled with hitting the right target audience/feature set combination is responsible for the most successful, &#8220;high quality&#8221; free software projects out there. There are some best practices (usually oscillating around libraries and tool kits, less frequently around programming languages), several libraries, few tools and virtually no automation.</p>
<p>Automation is hard to do, it takes time, it has a steep learning curve and almost always requires infrastructure, deployment plans, tinkering and even writing custom tools. This is where we fail. We need the git or bzr for quality, the launchpad, bugzilla for automation, the facebook for social benchmarking and feedback system. The desire to pursue quality should to be as natural as using a modern version control system, build system, documentation system, bug control system.</p>
<p>Our goal at the Linaro Validation team is to build a stack of tools and components that make automated testing and benchmarking, manual testing, continuous integration, reporting, analysis and data mining as useful, easy to deploy and extend as we can.</p>
<p>We may never get there but at least we&#8217;re trying and <strong>doing it in the open</strong>.</p>
<p>In the next post I will describe what components of LAVA exist today and how they relate to one another. Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linaro.org/linaro-blog/2011/08/10/lava-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
