Thursday Feb 28, 2008

SailFin Build using Continuous Sanpshot

Why continuous snapshot?
What is continuous snapshot?
How to build using continuous snapshot?
What are the Check-In guidelines?

Why Continuous Snapshot

The current snapshot is generated once in 24 hrs and this makes it difficult for developers to use bootstrap command and work on top of that.

Continuous Snapshot

We now have a continuous snapshot for Sailfin being generated every 1 hr. This Image snapshot is a good stable base for the general developer community to work on. We are posting that Snapshot on external machine so user can work on top of that Snapshot. We are using Hudson to generate this snapshots. It takes 50 mins to build and 10mins to upload. This is available only for Linux and Windows.

Each Generated snapshot have different timestamp attached with name like 'sailfin-image-SNAPSHOT-(timestamp).jar' (e.g. sailfin-image-SNAPSHOT-200802181619.jar). Also, timestamp of the latest snapshot is stored in the sailfin/bootstrap/{os.name}.timestamp file. The contents of this timestamp file in your workspace would get you the appropriate snapshot version during build.

Build using continuous snapshot.

Note: This works on Linux and Windows OS only.
Commands to checkout SailFin Latest Snapshot and Doing build on top of that

  1. % cvs -d:pserver:naman_mehta@cvs.dev.java.net:/cvs co sailfin/bootstrap
  2. % cd sailfin/bootstrap
  3. % maven bootstrap-latest
    These commands checks out the sailfin dependency and latest sailfin image snapshot based on content stored in sailfin/bootstrap/{os.name}.timestamp file.
  4. % maven -Dmodules={module-name} checkout-sailfin
    These commands checks out the sailfin module that you wish to work on. Now you can make required changes in your module.
    or
    % maven -Dmodules={module-name} checkout-glassfish
    These commands checks out the glassfish module that you wish to work on. Now you can make required changes in your module.
  5. % maven -Dmodules={module-name} build-sailfin
    These commands builds your sailfin module. If any fails you need to fix them.
    or
    % maven -Dmodules={module-name} build-glassfish
    These commands builds your glassfish module. If any fails you need to fix them.
  6. % maven configure-runtime
    This command creates the domain. Now you can run the mandated tests on your module.

Check-In Guidelines

  1. Check if the build is broken or if the QLs do not have a 100% pass rate. You can verify this by looking mails from Hudson A or Hudson B also you can find build status on (URL: http://70.42.188.20:8280/hudson/job/SailFinBuild/). If the build is broken or OL is failfing then wait for the build to become normal again. If not go ahead to step 2.
  2. % cd $WS/sailfin/bootstrap
  3. % maven clobber
    These commands removes publish/glassfish folder from your workspace.
  4. % maven bootstrap-latest
    These commands checks out latest sailfin image snapshot based on content stored in sailfin/bootstrap/{os.nam}.timestamp file.
  5. % cd $WS/sailfin/{module-name}
  6. % cvs -nq update
    Resolves the conflicts if it is generated by CVS.
  7. % maven -Dmodules={module-name} build-sailfin or maven -Dmodules={module-name} build-glassfish
    Resolve the issue if build fails.
  8. % Run the mandated tests for your module. If there are test failures, you need to fix them else you can check-in your code.

Monday Feb 18, 2008

Sailfin Build Monitoring on Hudson.

Introduction
Building and Monitoring SailFin Builds
Hudson Details

Introduction

SailFin is the name for the open source development project having full-featured Telco Application Server with load balancing, clustering and failover and administration features. SailFin adds SIP and Telco related capabilities on top of Sun Java System Application Server (SJS AS). SJS AS is developed as project GlassFish (http://glassfish.dev.java.net). SailFin is an affiliated member of GlassFish community in java.net.

You can find SailFin Project home page here - https://sailfin.dev.java.net/
You can find complete build instructions here - How to build SailFin?

We have deployed Web Application Hudson, which is open source java.net project by itself. Hudson is deployed on Glassfish Server for SailFin build monitoring. Hudson application monitors executions of repeated jobs, such as building a software project or jobs run by cron.


Building and Monitoring SailFin Builds

The job "SailFinBuild" is created on the publicly available host : http://70.42.188.20:8280/hudson/job/SailFinBuild/

Essentially, it executes following shell commands configured in hudson application.

Commands to checkout SailFind and doing build

% cvs -d:pserver:naman_mehta@cvs.dev.java.net:/cvs co sailfin/bootstrap
% cd sailfin/bootstrap
% maven checkout bootstrap-all build configure-runtime

These commands above checks out the sources using maven tool, which is build tool for SailFin workspace, downloads all binary components and builds all source modules and finally it configures the server image to be able to run and deploy applications on SailFin Server.

Commands to run glassfish QL Tests

% APS_HOME="$WORKSPACE/glassfish/appserv-tests"
% export APS_HOME
% S1AS_HOME="$WORKSPACE/publish/glassfish"
% export S1AS_HOME
% maven run-telco-quicklook

These commands above checks out Quicklook test for glassfish which covers most of the component level tests, and sets required variables like APS_HOME, S1AS_HOME and runs the tests using "maven run-telco-quicklook".

Commands to run SailFin QL Tests

% cd $WORKSPACE
% cvs -d :pserver:naman_mehta@sailfin.dev.java.net:/cvs co sailfin/sailfin-tests
% SF_HOME="$WORKSPACE/publish/glassfish"
% export SF_HOME
% WS_HOME="$WORKSPACE/sailfin/sailfin-tests"
% export WS_HOME
% HOST_IP_ADDRESS="70.42.188.20"
% export HOST_IP_ADDRESS
% ANT_OPTS="-Xmx1024m"
% export ANT_OPTS
% cd $WS_HOME
% ant setup
% ant setup-jain-sip
% ant start-domain
% ant all

These commands above checks out Quicklook test for SailFin which covers most of the component level tests, and sets required variables like SF_HOME, WS_HOME, HOST_IP_ADDRESS and runs the tests using "ant all".

After each successful build Hudson would archieve glassfish and SailFin QL reports. User can find those reports in the Latest Artifacts, Glassfish QL as gf_ql_results.html and SailFin QL as sf_ql_results.txt.


Hudson Details

We can find most of the Features and Benefits of Hudson application from its project home page, Hudson on java.net. But main features that I wanted to specify here are "Build Monitoring" and "Console Output".

On Hudson home page, user can find summary of the build. Which build is currently running? What is the last success and last duration? What is the last failure? On the left pannel user can find which build number is running currently.


Hudson Home Page


On Hudson homepage click on the current running build and click on "Console Output" to see the complete build log.



Console Output for Build


The output of the last build can be found from its "Build History" by going "SailFinBuild" home page.



SailFinBuild Home Page


About

Naman

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today