<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Ampercent &#187; Linux</title> <atom:link href="http://www.ampercent.com/category/linux/feed/" rel="self" type="application/rss+xml" /><link>http://www.ampercent.com</link> <description></description> <lastBuildDate>Wed, 08 Feb 2012 12:24:08 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/><xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Continuous Integration and it&#8217;s implementation using Hudson</title><link>http://www.ampercent.com/continuous-integration/1955/</link> <comments>http://www.ampercent.com/continuous-integration/1955/#comments</comments> <pubDate>Thu, 16 Apr 2009 13:52:04 +0000</pubDate> <dc:creator>demo</dc:creator> <category><![CDATA[Linux]]></category><guid isPermaLink="false">http://www.ampercent.com/uncategorized/continuous-integration-and-its-implementation/1955/</guid> <description><![CDATA[<p>It is perhaps one of the mostly discussed term in industry. In a basic SDLC of a product we perform a lot of steps to ensure the error-less delivery of product. We design it carefully, we code it with utmost sincerity, build it properly, deploy it and test it and finally release it. After release, [...]</p><p><p style="background-color:#FFFFE0; border:1px solid #FFFFE0;padding:5px;"><b><a href="http://www.ampercent.com/continuous-integration/1955/">Continuous Integration and it&#8217;s implementation using Hudson</a></b> originally published on <b><a href="http://www.ampercent.com">Ampercent</a></b></p></p>]]></description> <content:encoded><![CDATA[<p>It is perhaps one of the mostly discussed term in industry. In a basic SDLC of a product we perform a lot of steps to ensure the error-less delivery of product. We design it carefully, we code it with utmost sincerity, build it properly, deploy it and test it and finally release it. After release, there comes a scenario of maintenance i.e. fixing of bugs and issues then release goes on with different version.<span id="more-1955"></span></p><h2>What is Continuous Integration?</h2><p><strong>Several Developers Working On Modules</strong> : In a big software project what happens when several developers are working on different modules, each module is growing independently and finally to be integrated at a certain point of time? Is it a good step to proceed that after developing all modules it is right to be integrated? Say, when when you are integrating a module with another one. A developer might commit new code into it. Result? Integration fails.</p><p>Let me give me another classic example which will make the life easy!! In a big project there are several phases like, development, build, deploy and test. These activities are repeated for different modules. For a certain module, a  release package is in testing phase and an issue arises. A new comer developer fix it by committing new code which ultimately fails the build. What happens to the testing and deployment phase? The team come to know that it has to be modified after a long time by investigating the change log. So any mistake can affect the entire work flow. So it is the solution?<br /> <strong>Can we design a process which is completely automatic ?</strong></p><p>What I mean  is, it automatically builds the code i.e. create the release package by checking out from your repository with the latest code,  deploy and test it if there is any fail intimate it by e-mail to developers? It would be pretty good idea, if all this happens at night when developers are sleeping at home and in the morning when they get back to the desk knows what happened last night !! Folks, This is we refer as Continuous Integration or sometime  a Nightly Build of projects. Which is nothing but a continuous flow from your end-to-end activity, ensuring your project build. So that if your PM asks about the latest status  you can refer the latest one.Definitely it is an automatic process.</p><h2>Continuous Integration Tools</h2><p>There exists a lot  of  CI tools , Likely Cruise Control, Hudson, Lunt Build etc. I will give a basic idea how to proceed and implement the idea of Continuous Integration (CI). I will prefer the Hudson as  CI server because it has lot of flexibility, good cross platform performance, easy set up and configuration.<br /> The hudson release comes as hudson.war which you have to deploy in any of the servlet container say, Tomcat, JBOSS etc. Let me provide you the technical details/requirements of Hudson set up.</p><h2>Installation</h2><h3>Unix and Mac Installation</h3><p>Hudson needs Java J2SE 1.5 or later to run. Hudson is released as a single WAR file. The easiest way to use Hudson is to use Hudson&#8217;s built in Winstone servlet container. <a href="http://java.net/projects/hudson/">Download Hudson</a> and execute Hudson by running java -jar hudson.war. This is basically the same setup as the test drive except that Hudson log messages will be sent to the console window.<br /> Alternatively, if you have a servlet container that supports Servlet 2.4/JSP 2.0 or later, such as Glassfish, Tomcat 5, JBoss, Jetty 6, etc. Then, you can deploy Hudson&#8217;s WAR file as you would any other war file. Container specific documentation is available if you choose this route.<br /> Top of page</p><h3>Windows Installation</h3><p>If you&#8217;re running on Windows you might want to run Hudson as a service so it starts up automatically without requiring a user to log in. The easiest way is to install Tomcat as a service, and then deploy Hudson to it.<br /> You can install Hudson as Windows service or java wrapper. Refer to the HUDSON WIKI for more information. I am simply providing the information from that wiki.</p><h3>Execution</h3><p>As mentioned above, the easiest way to execute Hudson is through the built in Winstone servlet container. You can execute Hudson like this:<br /> 1. $ java -jar hudson.war</p><p>2. Of course, you probably want to send the output of Hudson to a log file, and if you&#8217;re on Unix, you probably want to use nohup:<br /> $ nohup java -jar hudson.war &gt; $LOGFILE 2&gt;&amp;1</p><p>3. To see Hudson, simply bring up a web browser and go to URL http://*myServer:8080{*} where myServer is the name of the system running Hudson.</p><p>For windows, after deploying the war file in servlet container, start the service and fire your browser with the URL http://localhost:8080/hudson (If you have deployed it in tomcat deploy it in WEBAPPS/ and your tomcat should listen to 8080 port if you have any changes in the configuration change the URL accordingly).<br /> If you have still doubt refer to the <a href="http://java.net/projects/hudson/">Hudson official home page</a> . It is not worthy to provide the granular details of technical details of the Hudson installation here in this small scope.</p><h2>Continuous Integration and Hudson :</h2><p>All build Hudson identifies as a single job which is nothing but a single unit for build. Each offers you as configuration page. In this configuration page you can configure a single job, what are the artifacts to be checked out (namely SVN URL ), What are the build triggers , Timings (using this you can make it as a cron you can schedule a job to be run every night at 12am or every Wednesday night at 10PM or every 13th of month aat any time or MON-WED in each week anything you can do it.).Then what are the build steps – whether to execute a ant script or series of shell commands or maven target. Set the post build actions also what you want to be happened once this built is completed. Any other project to execute? Notify by mailing you if build fails? Publish Javadoc utlity? Run Junit test case? Anything anything!!</p><dl><dt><img class="size-full wp-image-1954" src="http://cdn.ampercent.com/wp/wp-content/uploads/post/hudson.jpeg" alt="huson dashboard" width="337" height="261" /></dt></dl><h2>How to Implement CI in Hudson ?</h2><p>What if we create job A for building the package (simply check out your module from repository say SVN and build it using any build script). Create another job B which deploys the artifact into your functional domain. Create another job C which performs the testing (may be running JUNIT test case). String all these, Say job A calling B calling C. That is once A job is completed it calls B once B completed calls C. A-&gt;B-&gt;C, you will get an email if any of this activity fails. Configure the job like that way.<br /> Not only that , you can simply configure your build job to run every night at a certain time if build breaks you will be notified. This is also another essence of CI.. Get a dedicated build server for you project, set up Hudson, start integrating your project. Happy Building !!.</p><p><p style="background-color:#FFFFE0; border:1px solid #FFFFE0;padding:5px;"><b><a href="http://www.ampercent.com/continuous-integration/1955/">Continuous Integration and it&#8217;s implementation using Hudson</a></b> originally published on <b><a href="http://www.ampercent.com">Ampercent</a></b></p></p>]]></content:encoded> <wfw:commentRss></wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/13 queries in 0.016 seconds using disk: basic
Object Caching 417/431 objects using disk: basic
Content Delivery Network via cdn.ampercent.com

Served from: www.ampercent.com @ 2012-02-08 20:04:33 -->
