Miles to go …

June 17, 2008

Top 10 features of Hudson

Filed under: General — arungupta @ 11:45 pm


Kohsuke (aka Mr. Hudson) and I attended The Server Side Java Symposium, Las Vegas in Mar 2008. In one of the evenings we spent togehter, I decided to pick Kohsuke’s brain on top 10 features of Hudson. My notes were lost but luckily I found them so this article is slightly dated but most of the content is still very much valid. Newer features have been added since then anyway.

Here you go …

  1. Ease of installation & use – Hudson is downloaded as a single WAR and run just using “java -jar hudson.war” – no additional configuration or container. It can also be started by clicking on this link. There has been emphasis on a single web app with no need to run a Continuous Integration (CI) server or client. If started using “java -jar hudson.war”, then the default page looks like:

    More details about ease of installation & use are available in Hudson Docs.

  2. Fairly extensive ecosystem of plugins – You can easily write plugins to support tools/processes in your team. And after you contribute, they can be used by others as well.
    1. Update Center – for finding and installing plugins
    2. Source Code Control Plugins: Visual Source Safe, Git, Perforce and many others.
    3. Most of the plugins are small and can be created in spare time.
    4. Maven support for generating plugin templates. Read more about developing plugins in Extend Hudson.
  3. Distributed build support – This lets you use those empty sitting machines in a master/slave configuration and churn out the builds. Hudson “baby sits” the slave and performs some non-trivial work to monitor it such as clock synchronization, disk space monitoring and restarting the slave if it gets disconnected.
  4. Inter team support – Multiple teams working together with an inter-dependency require downstream projects to be automatically built. A complete chain of projects with upstream/downstream can be easily configured. Such projects also need to keep track of which version of this is used by which version of that. Hudson uses Finger printing to simplify this.
  5. Open source – Hudson is fully open-sourced under the MIT License.
  6. Maturity – 226th release was released on 6/17 and never lost data compatbility even once. The migration from older to newer version is seamless, it’s basically just redeploying the WAR and there is no extra configuration required.
  7. Extensive tools outside Hudson – This is possible because of programmable control interface. Some of the examples are:
    1. Hudson Tracker & Tray Application – Small application that sits in your task tray and monitor Hudson builds
    2. Trac plugin – Creates links from Hudson projects to Trac instances.
    3. Firefox Build Monitor plugin – Displays Hudson orbs on Firefox status bar panel to indicate the build status
  8. Permalink support – Hudson provides easily readable URLs for most of the pages such as “last successful build”, “promoted build”. These URLs can be used linked from anywhere.
  9. Localization – Localization is available in English, Japanese, Gemany, French, Turkish, Brazilian, Portugese, Russian. You can easily create your own localization bundle by following these instructions. There is even an IntelliJ plugin to internationalize existing code.
  10. Building blocks – Hudson builds on general-purpose building blocks which can be used for other projects as well:
    1. Stapler
      1. URL binding of domain objects
      2. JSON & XML generation
      3. Much of the implementation of remoting is in Stapler – take POJO and convert into XML
      4. IntelliJ plugin for Stapler
      5. View tier is pluggable – Hudson uses Jelly.
    2. Remote Access API
    3. Localizer – small runtime library to choose the locale with IDE plugin for i18n

So you still think you need another Continuous Integration tool ?

Download Hudson now!

Technorati: hudson top10 glassfish

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

June 16, 2008

TOTD #33: Building GlassFish v3 Workspace

Filed under: General — arungupta @ 11:45 pm

Reviving after a 2-week hiatus

This TOTD (Tip Of The Day) provides complete instructions on how to checkout/build GlassFish v3 workspace.

  1. Check out the workspace as …

    ~/workspaces/glassfish >svn checkout https://svn.dev.java.net/svn/glassfish-svn/trunk/v3
    Error validating server certificate for ‘https://svn.dev.java.net:443′:
     - The certificate is not issued by a trusted authority. Use the
       fingerprint to validate the certificate manually!
    Certificate information:
     - Hostname: *.dev.java.net
     - Valid: from Thu, 09 Aug 2007 06:44:32 GMT until Sat, 09 Aug 2008 06:44:32 GMT
     - Issuer: Equifax Secure Inc., US
     - Fingerprint: e9:12:f6:a0:36:fe:7d:b0:07:dd:8b:d6:c3:b6:29:ff:ba:02:03:46
    (R)eject, accept (t)emporarily or accept (p)ermanently? t
    Authentication realm: <https://svn.dev.java.net:443> CollabNet Subversion Repository
    Password for ‘arungupta’:  <YOUR PASSWORD HERE>
    A    v3/deployment
    A    v3/deployment/javaee-core
    A    v3/deployment/javaee-core/src
    A    v3/deployment/javaee-core/src/main
    . . .
    A    v3/packager/packages/glassfishv3-ejb/build.properties
    A    v3/packager/packages/glassfishv3-ejb/build.xml
    A    v3/packager/packages/glassfishv3-ejb/glassfishv3-ejb.spec.tmpl
    A    v3/packager/packages/README
     U   v3
    Checked out revision 21054.
  2. The directory structure looks like:

    ~/workspaces/glassfish/v3 >ls -la
    total 24
    drwxr-xr-x  25 arungupta  arungupta    850 Jun 16 15:03 .
    drwxr-xr-x   3 arungupta  arungupta    102 Jun 16 14:58 ..
    drwxr-xr-x  10 arungupta  arungupta    340 Jun 16 15:03 .svn
    drwxr-xr-x  17 arungupta  arungupta    578 Jun 16 15:00 admin
    drwxr-xr-x  10 arungupta  arungupta    340 Jun 16 15:01 admingui
    drwxr-xr-x   6 arungupta  arungupta    204 Jun 16 15:01 build
    drwxr-xr-x  15 arungupta  arungupta    510 Jun 16 15:00 common
    drwxr-xr-x   9 arungupta  arungupta    306 Jun 16 15:03 connectors
    drwxr-xr-x   7 arungupta  arungupta    238 Jun 16 14:59 core
    drwxr-xr-x  10 arungupta  arungupta    340 Jun 16 14:58 deployment
    drwxr-xr-x  10 arungupta  arungupta    340 Jun 16 15:01 distributions
    drwxr-xr-x   9 arungupta  arungupta    306 Jun 16 15:01 ejb
    drwxr-xr-x   8 arungupta  arungupta    272 Jun 16 15:02 extras
    drwxr-xr-x   6 arungupta  arungupta    204 Jun 16 15:00 installer
    drwxr-xr-x  27 arungupta  arungupta    918 Jun 16 15:01 javaee-api
    drwxr-xr-x   5 arungupta  arungupta    170 Jun 16 15:02 osgi-platforms
    drwxr-xr-x  13 arungupta  arungupta    442 Jun 16 15:03 packager
    drwxr-xr-x   6 arungupta  arungupta    204 Jun 16 14:58 persistence
    -rw-r–r–   1 arungupta  arungupta  11866 Jun 16 15:03 pom.xml
    drwxr-xr-x   6 arungupta  arungupta    204 Jun 16 15:02 registration
    drwxr-xr-x   7 arungupta  arungupta    238 Jun 16 15:02 security
    drwxr-xr-x   8 arungupta  arungupta    272 Jun 16 15:01 tests
    drwxr-xr-x   8 arungupta  arungupta    272 Jun 16 14:58 transaction
    drwxr-xr-x  15 arungupta  arungupta    510 Jun 16 15:02 web
    drwxr-xr-x   5 arungupta  arungupta    170 Jun 16 14:58 webservices
  3. Set the Maven options as …
    export MAVEN_OPTS=-Xmx512m

    And build the distribution as …

    ~/workspaces/glassfish/v3 >mvn -U install
    [INFO] Scanning for projects…
    [INFO] Reactor build order:
    [INFO]   GlassFish Build Utilities
    [INFO]   GlassFish v3 Maven2 plugin
    [INFO]   Maven extension for building GlassFish
    [INFO]   GlassFish Parent Project
    . . .
    [INFO] ————————————————————————
    [INFO] BUILD SUCCESSFUL
    [INFO] ————————————————————————
    [INFO] Total time: 5 minutes 56 seconds
    [INFO] Finished at: Mon Jun 16 15:33:46 PDT 2008
    [INFO] Final Memory: 57M/121M
    [INFO] ————————————————————————

    You need to use “mvn -U clean install” for a previously built workspace.

  4. Unzip the created distribution as:
    ~/testbed/glassfish/v3/snapshot >unzip ~/workspaces/glassfish/v3/distributions/glassfish/target/glassfish-10.0-SNAPSHOT.zip
    Archive:  /Users/arungupta/workspaces/glassfish/v3/distributions/glassfish/target/glassfish-10.0-SNAPSHOT.zip
       creating: glassfish/
       creating: glassfish/docs/
    . . .
      inflating: glassfish/lib/templates/keyfile 
      inflating: glassfish/lib/templates/logging.properties 
      inflating: glassfish/lib/templates/login.conf 
      inflating: glassfish/lib/templates/profile.properties 
      inflating: glassfish/lib/templates/server.policy

    The unzipped distribution directory looks like:

    ~/testbed/glassfish/v3/snapshot/glassfish >ls -la
    total 592
    drwxr-xr-x  14 arungupta  arungupta     476 Apr 23 16:37 .
    drwxr-xr-x   3 arungupta  arungupta     102 Jun 16 15:40 ..
    -rw-r–r–   1 arungupta  arungupta  250464 Jun 16 15:24 3RD-PARTY-LICENSE.txt
    -rw-r–r–   1 arungupta  arungupta    4603 Jun 16 15:24 COPYRIGHT
    -rw-r–r–   1 arungupta  arungupta   36116 Jun 16 15:24 LICENSE.txt
    -rw-r-
    -r–   1 arungupta  arungupta     271 Jun 16 15:24 README
    drwxr-xr-x   8 arungupta  arungupta     272 Jun 16 15:33 bin
    drwxr-xr-x   6 arungupta  arungupta     204 Jun 16 15:33 config
    drwxr-xr-x   7 arungupta  arungupta     238 Jun 16 15:33 docs
    drwxr-xr-x   3 arungupta  arungupta     102 Jun 16 15:33 domains
    drwxr-xr-x   5 arungupta  arungupta     170 Jun 16 15:33 felix
    drwxr-xr-x   9 arungupta  arungupta     306 Jun 16 15:32 javadb
    drwxr-xr-x  11 arungupta  arungupta     374 Apr 23 16:37 lib
    drwxr-xr-x  74 arungupta  arungupta    2516 Jun 16 15:33 modules

    Start GlassFish as …

    ~/testbed/glassfish/v3/snapshot/glassfish >bin/asadmin start-domain -v
    Jun 16, 2008 3:44:54 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
    INFO: JVM invocation command line:
    /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
    -cp
    /Users/arungupta/testbed/glassfish/v3/snapshot/glassfish/modules/glassfish-10.0-SNAPSHOT.jar
    -XX:+UnlockDiagnosticVMOptions
    -XX:NewRatio=2
    . . .
    INFO: Started bundle org.glassfish.common.container-common [85]
    Jun 16, 2008 3:44:56 PM com.sun.enterprise.v3.admin.adapter.AdminConsoleAdapter setContextRoot
    INFO: Admin Console Adapter: context root: /admin
    Jun 16, 2008 3:44:56 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Glassfish v3 started in 1594 ms
    Jun 16, 2008 3:44:56 PM com.sun.enterprise.glassfish.bootstrap.ASMainFelix launchOSGiFW
    INFO: Framework successfully started

And you’ll see the default page as shown below:

Hurrah!

This starts GlassFish v3 using Apache Felix as the OSGi platform. Alternatively, you can start GlassFish using the command “java -jar modules/glassfish-10.0-SNAPSHOT.jar”. The complete instructions are available on GlassFish Wiki.

Please leave suggestions on other TOTD (Tip Of The Day) that you’d like to see. A complete archive is available here.

Technorati: totd glassfish v3 felix osgi

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

June 2, 2008

Mihir Gupta is born … ta da!

Filed under: General — arungupta @ 10:41 am

I’m glad to announced that yesterday afternoon there was a new addition to our family.

Mihir Gupta, our 2nd son, was born.

Big brother is “extremely happy” and waiting for young one to come home. And mom and dad are revising their skills :)

Date Jun 1, 2008
Weight 7 lb 3 oz
Length 20.5 inches

“Mihir” means Sun and he is glowing our lives for the past few hours now.


The whole family is excited for the new one’s arrival. This blog will take a short vacation to take care of the new born.

Technorati: personal mihir

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

Tic Tac Toe using Rails and Grails on GlassFish v3

Filed under: web2.0 — arungupta @ 2:00 am

GlassFish v3 is a modular (OSGi compliant), embeddable (runs in-VM) and extensible (hosts non-Java applications) Application Server. The “extensible” part was demonstrated during JavaOne 2008 by deploying Rails, Grails and Django sample application on GlassFish v3 Technology Preview 2. This blog announces the availability of Rails, Grails and (of course!) Java EE version of the demo code.

The sample application is a simple multi-player game that can be played on Internet and deployed on GlassFish. One of the simplest multi-player game is Tic-Tac-Toe. The complete instructions to checkout, build, deploy and run the sample are available here. The demo can certainly be improved by using the best practices from Rails and Grails and I’ll work on them in next few days.

The demo is played in 2 different browser windows (tested on Firefox, Safari & IE). The clicks in the grid on one browser are displayed on the other browser (propagated using GlassFish Comet) and row and column winners are shown.

Some points highlighted by the demo are:

  • GlassFish v3 supports deployment of Rails and Grails applications, in addition to traditional Java EE apps.
  • GlassFish v3 has a completely modular architecture as evident by the pluggability of JRuby/Rails.
  • Features of the underlying GlassFish runtime can be accessed.
    • Any click in the grid is pushed to the endpoint and then propagated to all the clients using GlassFish Comet. So effectively, now you can build Comet-enabled applications using Rails and Grails.
    • Rails application is deployed as a composite application where Serlvet is bundled with the application and accessed from the View.

Check out the demo now!

You can learn about the support of different Dynamic Languages on GlassFish on glassfish-scripting.dev.java.net. Send us feedback on webtier@glassfish.dev.java.net or GlassFish WebTier Forum.

Technorati: conf javaone javaone08 jruby ruby rubyonrails grails javee glassfish v3 netbeans

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot
« Newer Posts

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.
Powered by WordPress