Monday, June 15, 2009

Continuous Integration-Hudson-Architecture-Install

Continuous Integration (CI)
The term "continuous integration" refers to a process that builds and tests code on a frequent basis.
  • Continuous integration servers constantly monitor source code repositories
  • As soon as new changes/commits are detected, they initiate a new build cycle.
  • Build cycle actually involves code compilation and, in addition, may involve various tests and code analysis.
  • If the process encounters errors, it notify the build master
Openbravo leading professional web-based Open Source ERP! decided to use Continuous Integration, a software development practice to make its team integrate their work often. I explored on few CI tools like Cruise Control (CC), Buildbot and Hudson. I liked Hudson for reason likely
  • Installation and Configuration (friendly web GUI with extensive on-the-fly error checks , in-line help.)
  • Extensibility through plugin
  • Permanent links (gives you clean readable URLs for most of its pages)


Hudson Architecture
Hudson a continuous integration tool, which schedules the job process as cron job,
  • It is primarily a set of Java classes likely where Hudson is the root Object model, it has 'project class' and 'build class' and some 'interfaces' to perform some part of build like scm
  • Hudson classes are bound to Staple (Stapler is a library that "staples" your application objects to URLs, making it easier to write web applications. The core idea of Stapler is to automatically assign URLs for your objects, creating an intuitive URL hierarchy.)
  • To render a html pages hudson uses Jelly (is a tool for turning XML into executable code. So Jelly is a Java and XML based scripting and processing engine)
  • It uses file system to store, data directories are stored in HUDSON_HOME as plain text like the console-output (few as java properties file format, Majority of them uses Xstream, eg : project configuration, or various records of the build)
  • Hudson can be installed either by running the hudson.jar file(ex. java -jar hudson.jar) or just by deploying it in a servlet container.

How I deployed

I deployed Hudon tomcat on port 8080 and redirected to port 80 (default) using mod_jk and apache on a gentoo operating system

  • deploy the war file in tomcat directory
  • Add "-D JK" to /etc/conf.d/apache2, in the APACHE2_OPTS line.
  • Add "JkMount /* ajp13", at the end, before to /etc/apache2/modules.d/88_mod_jk.conf
check Openbravo's Continuous Integration system here


1 comment:

  1. great post priya... liked the way you have written.

    - sree

    ReplyDelete