Great, Stuart! Thats start of things i expect to see from Hudson (compared to the Jenkins branch).
Just wondering if the Gemini stuff is purely political or a technical advantage over its alternatives. ;)
Toni--On Tue, Mar 15, 2011 at 8:49 PM, Stuart McCulloch <mcculls@...> wrote:
Hi,The last few days I've been experimenting with Hudson on OSGi - seeing what breaks, what can be split into bundles, and how plugins might work as OSGi bundles. At the moment I'm using the Eclipse Gemini-Web project to load and auto-convert the Hudson WAR into a Web Application Bundle (WAB) - part of the OSGi Enterprise Specification from http://www.osgi.org/download/r4v42/r4.enterprise.pdf.I can now get Hudson up and running with the following instructions:1) Setup Gemini-Web using the instructions from http://wiki.eclipse.org/Gemini/Web2) Launch Equinox from the Gemini-Web setup using:java "-Dorg.osgi.framework.bootdelegation=sun.*,com.apple.*" -jar org.eclipse.osgi_3.6.0.v20100517.jar -console^ the bootdelegation setting is currently needed by XStream (expects to "sun.misc" to be visible) and JChart (needs to see the Apple LaF on OS X)3) Install the Hudson WAR, which will be auto-converted by Gemini into an OSGi WAB... warning it can take a long time to convert because it's ~35mb!osgi> install webbundle:file:/tmp/hudson.war?Web-ContextPath=hudsonBundle id is 40^ the webbundle: protocol does the wrapping, and we manually set the context path (won't be necessary when we add the header to the original WAR)4) Start the Hudson WAB:
osgi> start 405) Surf to http://127.0.0.1:8080/hudsonHere's a transcript of the console messages as Hudson starts up: https://gist.github.com/871249 (includes a list of the installed bundles)
Note: remote builds fail at the moment because hudson.remoting.Which.jarFile() currently doesn't know how to handle the "bundleresource:" URL protocol. I'm working on fixing that, then I'll move onto loading Hudson plugins as bundles which is where the real fun starts! Another interesting topic is how to slice Hudson into smaller bundles, which should speed things up (no need to convert the WAR). Having a selection of smaller bundles also means people could choose which features to install (ie. reduced footprint) and provide a way to patch individual components without having to update everything. The classic WAR would then be a merge/assembly of the individual bundles.My OSGi work will be available from https://github.com/mcculls/hudson/tree/OSGi - starting with the fix to Which.jarFile()--
Toni Menzel - http://www.okidokiteam.com
[Hudson-Dev] Re: Hudson on OSGi