{"id":1027,"date":"2009-02-05T18:54:21","date_gmt":"2009-02-06T02:54:21","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=1027"},"modified":"2009-02-05T18:59:55","modified_gmt":"2009-02-06T02:59:55","slug":"investigating-alternate-continuous-integration-software","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/investigating-alternate-continuous-integration-software\/","title":{"rendered":"Investigating Alternate Continuous Integration Software"},"content":{"rendered":"<p>Ever since I figured out that <a href=\"http:\/\/multimedia.cx\/eggs\/asking-the-right-question\/\">FATE falls into the category of continuous integration (CI) software<\/a>, I have been evaluating alternate, established, mature software packages that might be able to supplant <a href=\"http:\/\/fate.multimedia.cx\/\">FATE<\/a> for managing <a href=\"http:\/\/ffmpeg.org\/\">FFmpeg<\/a> automated building and testing. I don&#8217;t think it&#8217;s fair to say that I have been disappointed with the offerings I have found out there; it&#8217;s just that many other software packages have apparently approached this problem from a slightly different angle, with a slightly different set of assumptions, and slightly different resources on which to deploy a solution.<\/p>\n<p>For starters, when I read the overviews for a number of these packages, I am never quite sure if they actually do what FATE already does. Many packages brag about their amazing abilities to perform continuous builds on many platforms. I might be missing something crucial here, but that fact alone doesn&#8217;t impress me. From my perspective, and in my experience, automating the build among multiple independent machines is <em>the easy part<\/em>. The difficult part is managing tests and aggregating the results back to a central location.<\/p>\n<blockquote><p>\nAside: Sometimes I back up and wonder: Why aren&#8217;t our tests integrated into the build process? Oh yeah, they are: &#8216;make test&#8217;. But why can&#8217;t that general test be made to cover all the functionality? Because the &#8216;make test&#8217; regression suite depends on the existence of both an encoder and a decoder for a particular format. FFmpeg covers a large amount of formats that it can only decode, not encode (and no one is going to step up to write even naive corresponding encoders for these formats in the near future, nor would I argue that they should). Therefore, it becomes necessary to test asymmetric decoder (and demuxer) functionality using individual tests as I designed FATE to do.\n<\/p><\/blockquote>\n<p>I designed FATE such that a client program would run on diverse platforms, constantly check for and rebuild new FFmpeg code, run a battery of tests, and log the results of the build and tests (including status, stdout, stderr, and performance stats) back to a central server. I wanted the client to be written in Python and use only the (expansive) standard Python library, if possible. More stringent were the server requirements: I needed something that operated via HTTP backed by PHP or Perl &#8212; because that&#8217;s what my web host provides, at least if I want to talk to MySQL (Ruby is also an option; so is Python as long as the CGI script doesn&#8217;t need to talk to MySQL).<\/p>\n<p><em>&#8220;But you could host the central server at home on your own broadband and use whatever configuration you want.&#8221;<\/em> Actually, administering things like web and email services is something I would rather pay a few dollars per month for someone else to do on my behalf. I am quite adamant about this. I feel the same way about laundry.<\/p>\n<p><em>&#8220;If FATE ain&#8217;t broke, why fix it?&#8221;<\/em> Well, it is sort of broken, or at least incomplete. Many of these packages already boast features like email notifications and even IRC notifications, in addition to better web interfaces&#8211; features that I would like to implement when time permits. And at the very least, surveying other CI software might give me ideas about how to improve FATE.<\/p>\n<p>Can existing CI packages solve my problems? <!--more--><\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/buildbot-logo.png\" alt=\"BuildBot logo\" title=\"BuildBot logo\" width=\"236\" height=\"73\" class=\"aligncenter size-full wp-image-1043\" \/><br \/>\n<\/center><\/p>\n<p>First, there&#8217;s <a href=\"http:\/\/buildbot.net\/\">BuildBot<\/a>. I like the <a href=\"http:\/\/www.websters-online-dictionary.org\/Cu\/Cut+of+his+Jib.html\">cut of its jib<\/a>. It&#8217;s written in Python so I have a fighting chance of understanding its inner workings. But more importantly, its documentation isn&#8217;t terribly buzzwordish and gets straight to the point: <a href=\"http:\/\/buildbot.net\/repos\/release\/docs\/buildbot.html#Introduction\">&#8220;The BuildBot is a system to automate the compile\/test cycle required by most software projects to validate code changes.&#8221;<\/a> It has an architecture similar to FATE and could probably accomplish what FATE does. The dealbreaker is that the server requires a little too much in the way of resources. I need to be able to install an entire Python package on the server, something I lack the privileges to do and something my provider is reticent to do.<\/p>\n<p>BuildBot uses the paradigm of the source control repository pushing changes to the BuildBot central server via one channel or another. Then, build slaves query the server for specific build assignments. Actually, I think this is a fairly common paradigm for CI based on my survey (even more common seems to be the model of the central server connecting to build slaves and ordering builds, something that definitely isn&#8217;t going to happen in FATE&#8217;s topology). Following this model would be useful for ensuring that each FATE client builds every single change. I don&#8217;t really know if that would be useful or not, though; mostly, I think it would just create a huge backlog for the slower machines on the farm. However, revising FATE such that clients fulfill build orders from the central server might create a method for developers to check source into a testing branch and put in a special request for the code to be built on all FATE platforms for validation.<\/p>\n<p>Now that I think about it, maybe that&#8217;s just the kind of thing that various CI packages are bragging about when it comes to automated building.<\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/cabie.gif\" alt=\"Cabie logo\" title=\"Cabie logo\" width=\"315\" height=\"226\" class=\"aligncenter size-full wp-image-1045\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/cabie.gif 315w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/cabie-300x215.gif 300w\" sizes=\"auto, (max-width: 315px) 100vw, 315px\" \/><br \/>\n<\/center><\/p>\n<p>Check out the first item on <a href=\"http:\/\/cabie.tigris.org\/\">Cabie&#8217;s<\/a> feature list, prominently displayed on their home page: &#8220;Written in EXTREMELY EASY TO READ PERL&#8230;&#8221; Now why would the author feel it necessary to stipulate &#8212; forcefully &#8212; that this Perl code is readable? Maybe Perl has a reputation. I won&#8217;t hold the language against the overall package, though; if it&#8217;s written well enough, I shouldn&#8217;t have to hack it anyway. The dealbreaker comes early in <a href=\"http:\/\/www.yolinux.com\/TUTORIALS\/CabieBuildSystem.html\">this setup tutorial<\/a>: &#8220;The remote build servers must have network mounted (NFS or SAMBA for MS\/Win) file access which allows the web server access to the build logs and converted postbuild HTML pages.&#8221; Okay, that&#8217;s not happening. Next.<\/p>\n<p><a href=\"https:\/\/hudson.dev.java.net\/\">Hudson<\/a> comes to me by way of <a href=\"http:\/\/www.xuggle.com\/\">Xuggle<\/a>, which has something to do with FFmpeg and Java. Unsurprisingly, Hudson is built in Java, which is pretty much a dealbreaker by itself. Java doesn&#8217;t run on near enough platforms as Python. Plus, I&#8217;m pretty sure I can&#8217;t run a Java servlet on my web host.<\/p>\n<p>I can&#8217;t discount the idea of a Java-based build client entirely, though. There is always the opportunity to run the client on a platform that does support Java, only to interact (probably via SSH) with the actual build\/test machine to get work done. I am in the process of revising FATE to support this very model so that it can be used to test, e.g., the ARM\/Linux platform. A lot of these CI systems seem to be single-language affairs, however, so a Java-based client implies a Java-based server. I might be the only one crazy enough (or necessity-driven enough) to have developed a CI system based on 2 languages.<\/p>\n<p><a href=\"http:\/\/code.google.com\/p\/xinc\/\">Xinc is a CI system written in PHP<\/a>. I honestly don&#8217;t know at which level the system operates, or what it tests. I used to think that PHP was restricted to server-side web page processing and was stunned the day I realized I could run a snippet of PHP code from the Unix command line. Watching the <a href=\"http:\/\/www.slideshare.net\/arnoschn\/continuous-integration-and-php\">Xinc slideshow<\/a> grants me a little more clue &#8212; PHP functions on both the client and the server &#8212; and leads me to believe that maybe, just maybe, Xinc is similar to what I want for FATE.<\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2009\/02\/cruisecontrol-logo.png\" alt=\"CruiseControl logo\" title=\"CruiseControl logo\" width=\"195\" height=\"42\" class=\"aligncenter size-full wp-image-1048\" \/><br \/>\n<\/center><\/p>\n<p>It turns out that Xinc actually stands for Xinc Is Not CruiseControl. What is CruiseControl? It&#8217;s a popular name associated with CI. I think the<a href=\"http:\/\/cruisecontrol.sourceforge.net\/\"> Java-based CruiseControl<\/a> claims to be the original CI system. There are also <a href=\"http:\/\/confluence.public.thoughtworks.org\/display\/CCNET\/Welcome+to+CruiseControl.NET\">.NET-based<\/a> and <a href=\"http:\/\/cruisecontrolrb.thoughtworks.com\/documentation\/getting_started\">Ruby-based<\/a> versions of CruiseControl. Java and .NET generally disqualify a CI system from consideration, but what about the Ruby thing? Let&#8217;s look for a dealbreaker there&#8230; ah, found it in the <a href=\"http:\/\/cruisecontrolrb.thoughtworks.com\/documentation\/getting_started\">Getting Started guide<\/a>: &#8220;Dashboard and all builders need to run on the same computer.&#8221; Again, not making any statements about the quality of the software, just acknowledging that the designers obviously have a different set of requirements than I do.<\/p>\n<p>If I understand the ancestry correctly, Tinderbox is the spiritual predecessor of <a href=\"http:\/\/buildbot.net\/\">BuildBot<\/a>. There are several iterations of the software but the latest is <a href=\"http:\/\/www.johnkeiser.com\/mozilla\/tbox3.html\">Tinderbox 3<\/a>. The feature page lists that the backend database server is required to be PostreSQL, and I&#8217;m pretty sure that&#8217;s a dealbreaker. Further, I get the impression that the thing is only set up for builds, no tests (though I suppose tests can be an implicit part of builds). Here&#8217;s one interesting idea I took away from the Tinderbox page: Tinderbox attempts to &#8220;keep multiple build machines even&#8211;i.e. if there are 6 machines uploading builds to this machine, it will try to keep the builds at the same frequency for them&#8211;one build per hour, or one build per three hours, etc.  This way each machine has the same coverage.&#8221; Their auto-updating feature for client software is also tantalizing.<\/p>\n<p>I checked out as many other open source CI packages as I could find but they all seemed to be .NET-based or Java-based. Do I really impose such unique requirements for a CI system? Maybe so, and maybe other people have that same set of requirements because I am starting to get requests from other projects about using FATE as a general CI system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What can possibly be better than FATE?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[133,108],"class_list":["post-1027","post","type-post","status-publish","format-standard","hentry","category-fate-server","tag-continuous-integration","tag-fate"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=1027"}],"version-history":[{"count":18,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1027\/revisions"}],"predecessor-version":[{"id":1049,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1027\/revisions\/1049"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=1027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=1027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=1027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}