Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Hudson-ci/Containers/Tomcat."

Line 76: Line 76:
 
{| width="1000" border="1" cellpadding="1" cellspacing="1"
 
{| width="1000" border="1" cellpadding="1" cellspacing="1"
 
|-
 
|-
| prompt &gt; cd /home/Hudson<br>prompt &gt; ls<br>hudson-3.0.0.war<br>prompt &gt; export HUDSON_HOME=/home/Hudson<br>prompt &gt; java -jar hudson-3.0.0.war<br>/home/hudson/hudson-3.0.0.war<br>War - /home/hudson/hudson-3.0.0.war<br>2013-03-14 11:47:17.892:INFO:oejs.Server:jetty-8.1.7.v20120910<br>2013-03-14 11:47:17.913:INFO:oejw.WebInfConfiguration:Extract jar:file:/home/hudson/hudson-3.0.0.war!/ to /home/hudson/war/webapp<br>2013-03-14 11:47:19.391:INFO:oejw.StandardDescriptorProcessor:NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet<br>2013-03-14 11:47:19.433:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/home/hudson/war/webapp/},file:/home/hudson/hudson-3.0.0.war<br>2013-03-14 11:47:19.433:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/home/hudson/war/webapp/},file:/home/hudson/hudson-3.0.0.war<br>Mar 14, 2013 11:47:19 AM org.eclipse.hudson.HudsonServletContextListener contextInitialized<br>INFO: Home directory: /home/hudson<br>Mar 14, 2013 11:47:21 AM org.eclipse.hudson.HudsonServletContextListener contextInitialized<br>INFO:  
+
| prompt &gt; '''''cd /home/Hudson'''''<br>prompt &gt; '''''ls'''''<br>hudson-3.0.0.war<br>prompt &gt; '''''export HUDSON_HOME=/home/Hudson'''''<br>prompt &gt; '''''java -jar hudson-3.0.0.war'''''<br>/home/hudson/hudson-3.0.0.war<br>War - /home/hudson/hudson-3.0.0.war<br>2013-03-14 11:47:17.892:INFO:oejs.Server:jetty-8.1.7.v20120910<br>2013-03-14 11:47:17.913:INFO:oejw.WebInfConfiguration:Extract jar:file:/home/hudson/hudson-3.0.0.war!/ to /home/hudson/war/webapp<br>2013-03-14 11:47:19.391:INFO:oejw.StandardDescriptorProcessor:NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet<br>2013-03-14 11:47:19.433:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/home/hudson/war/webapp/},file:/home/hudson/hudson-3.0.0.war<br>2013-03-14 11:47:19.433:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/home/hudson/war/webapp/},file:/home/hudson/hudson-3.0.0.war<br>Mar 14, 2013 11:47:19 AM org.eclipse.hudson.HudsonServletContextListener contextInitialized<br>INFO: Home directory: /home/hudson<br>Mar 14, 2013 11:47:21 AM org.eclipse.hudson.HudsonServletContextListener contextInitialized<br>INFO:  
 
================&gt;<br>Initial setup required. Please go to the Hudson Dashboard and complete the setup.<br>&lt;================<br>2013-03-14 11:47:21.184:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/home/hudson/war/webapp/},file:/home/hudson/hudson-3.0.0.war<br>Mar 14, 2013 11:47:21 AM hudson.util.CharacterEncodingFilter init<br>INFO: CharacterEncodingFilter initialized. DISABLE_FILTER: false FORCE_ENCODING: false<br>2013-03-14 11:47:21.212:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080  
 
================&gt;<br>Initial setup required. Please go to the Hudson Dashboard and complete the setup.<br>&lt;================<br>2013-03-14 11:47:21.184:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/home/hudson/war/webapp/},file:/home/hudson/hudson-3.0.0.war<br>Mar 14, 2013 11:47:21 AM hudson.util.CharacterEncodingFilter init<br>INFO: CharacterEncodingFilter initialized. DISABLE_FILTER: false FORCE_ENCODING: false<br>2013-03-14 11:47:21.212:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080  
  
 
|}
 
|}
  
<br>NOTE: This way of execution is only preferred in test environment, It is recommended to deploy Hudson as a application in containers as servlet. Tomcat container example is shown in later section.  
+
<br>NOTE: This way of execution is only preferred in test environment, It is recommended to deploy Hudson as a application in containers as servlet. Tomcat container example is shown in later section.
  
 
=== Access Hudson dash board  ===
 
=== Access Hudson dash board  ===

Revision as of 19:37, 17 May 2013

Hudson

Introduction

Hudson monitors the execution of repeated jobs, such as building a software project or jobs run by cron. Among those things, currently Hudson focuses on the following two jobs:

  1. Building/testing software projects continuously, just like CruiseControl or DamageControl. In a nutshell, Hudson provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases productivity.
  2. Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular e-mails that capture the output, and it is up to you to look at them diligently and notice when it broke. Hudson keeps those outputs and makes it easy for you to notice when something is wrong.

Features

Hudson offers the following features:


  1. Easy installation: Just java -jar hudson.war for testing. Use a native package or deploy it in a servlet container for production use. No additional install, no database.
  2. Easy configuration: Hudson can be configured entirely from its friendly web GUI with extensive on-the-fly error checks and inline help. There's no need to tweak XML manually anymore, although if you'd like to do so, you can do that, too.
  3. Change set support: Hudson can generate a list of changes made into the build from SCM systems like CVS, Subversion, Git and many others. This is done in a fairly efficient fashion, to reduce the load on the repository.
  4. Permanent links: Hudson gives you clean readable URLs for most of its pages, including some permalinks like "latest build"/"latest successful build", so that they can be easily linked from elsewhere.
  5. RSS/E-mail/IM Integration: Monitor build results by RSS or e-mail to get real-time notifications on failures.
  6. After-the-fact tagging: Builds can be tagged long after builds are completed
  7. JUnit/TestNG test reporting: JUnit test reports can be tabulated, summarized, and displayed with history information, such as when it started breaking, etc. History trend is plotted into a graph.
  8. Distributed builds: Hudson can distribute build/test loads to multiple computers. This lets you get the most out of those idle workstations sitting beneath developers' desks.
  9. File fingerprinting: Hudson can keep track of which build produced which jars, and which build is using which version of jars, and so on. This works even for jars that are produced outside Hudson, and is ideal for projects to track dependency.
  10. Plugin Support: Hudson can be extended via 3rd party plugins. You can write plugins to make Hudson support tools/processes that your team uses.

Industry standard products supported by Hudson

Hudson supports hundreds of standard products via plugins. To name a few

  • SCM vendors: Git, CVS, SVN, Perforce, Mercurial, Team Foundation
  • Build tools: Ant, mave, gradle, MSBuild, Nant, Rake
  • Unit Testing frameworks: JUnit, NUnit, Selenium, CppUnit, TestNg, XUnit
  • Code Coverage tools: Clover, Cobertura, Emma, Serenity, Sonar, NCover, Jacoco
  • Code Analysis Tools: Checkstyle, PMD, Dry, Findbugs, Warnings, CCM, Violations
  • Security Tools: LDAP, Active Directory, Crowd, OpenID
  • Applications servers: Weblogic, Glassfish, Tomcat, JBoss, IIS, JRebel
  • Virtual Environment: EC2, Virtual Box, VmWare, JCloud
  • Social communication: E-mail, IRC, Jabber, SMS, Twitter

Hudson Best Practices

Continuous Integration with automated test execution has seen broad adoption in recent years. The ideas behind Continuous Integration have changed how companies look at Build Management, Release Management, Deployment Automation, and Test Orchestration. This section provides a set of best practices for Hudson - A Continuous Integration Solution to provide executives, business managers, software developers and architects a better sense of the development progress and code quality of projects throughout the development lifecycle.


Hudson Installation

Note: the below steps are executed on Red hat Enterprise Linux.

Download

Download Hudson war file (version 3-0-0) from the below link
http://eclipse.org/hudson/download.php

Pre-requisites

Make sure Java version >=6 is installed by executing the below command

prompt >java -version
java version "1.6.0_32"
Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode)



Installation

Execute the below command to extract war file and start the Hudson basic setup process.


prompt > cd /home/Hudson
prompt > ls
hudson-3.0.0.war
prompt > export HUDSON_HOME=/home/Hudson
prompt > java -jar hudson-3.0.0.war
/home/hudson/hudson-3.0.0.war
War - /home/hudson/hudson-3.0.0.war
2013-03-14 11:47:17.892:INFO:oejs.Server:jetty-8.1.7.v20120910
2013-03-14 11:47:17.913:INFO:oejw.WebInfConfiguration:Extract jar:file:/home/hudson/hudson-3.0.0.war!/ to /home/hudson/war/webapp
2013-03-14 11:47:19.391:INFO:oejw.StandardDescriptorProcessor:NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
2013-03-14 11:47:19.433:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/home/hudson/war/webapp/},file:/home/hudson/hudson-3.0.0.war
2013-03-14 11:47:19.433:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/home/hudson/war/webapp/},file:/home/hudson/hudson-3.0.0.war
Mar 14, 2013 11:47:19 AM org.eclipse.hudson.HudsonServletContextListener contextInitialized
INFO: Home directory: /home/hudson
Mar 14, 2013 11:47:21 AM org.eclipse.hudson.HudsonServletContextListener contextInitialized
INFO:

================>
Initial setup required. Please go to the Hudson Dashboard and complete the setup.
<================
2013-03-14 11:47:21.184:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/home/hudson/war/webapp/},file:/home/hudson/hudson-3.0.0.war
Mar 14, 2013 11:47:21 AM hudson.util.CharacterEncodingFilter init
INFO: CharacterEncodingFilter initialized. DISABLE_FILTER: false FORCE_ENCODING: false
2013-03-14 11:47:21.212:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080


NOTE: This way of execution is only preferred in test environment, It is recommended to deploy Hudson as a application in containers as servlet. Tomcat container example is shown in later section.

Access Hudson dash board

The command extracts war file in HUDSON_HOME directory and starts the server. User is required to perform some basic setup required to complete the installation. Open browser and access the Hudson using below url.

                     http://yourhost:8080

Note: If url is not accessible, please disable firewall Or contact your administrator.

Hudson first basic setup screen
NOTE: I am still working on adding more content to this page. Please consider this stage as incomplete.

Back to the top