You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


This short document is about the steps to deploy Hudson onto Apache Geronimo 2. Hudson is a....go and read it on its web site. No need to duplicate their stuff here.

Geronimo 2.0.2 uses XStream 1.1.3. Hudson requires some methods of XStream that are available in earlier versions and to deploy hudson successfully onto Geronimo, it's recommended to delete xstream-1.1.3.jar from Geronimo's home directory and place xstream-1.2.2.jar instead. The latest releases of Geronimo have the file already replaced and there's no need to bother about it anymore if you're on Geronimo 2.0.2+.

The plan

The plan configures a security realm hudson-realm as well as /hudson as a context for hudson.war.

hudson-geronimo-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0">
  <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
    <moduleId>
      <groupId>hudson</groupId>
      <artifactId>hudson</artifactId>
      <version>1.153</version>
      <type>war</type>
    </moduleId>
    <dependencies>
      <dependency>
        <groupId>org.apache.geronimo.configs</groupId>
        <artifactId>j2ee-security</artifactId>
        <type>car</type>
      </dependency>
    </dependencies>
  </environment>

  <context-root>/hudson</context-root>

  <security-realm-name>hudson-realm</security-realm-name>
  <security>
    <default-principal realm-name="hudson-realm">
      <principal name="anonymous" class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" />
    </default-principal>
    <role-mappings>
      <role role-name="admin">
        <realm realm-name="hudson-realm">
          <principal name="AdminGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" />
        </realm>
        <principal name="system" class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" />
      </role>
    </role-mappings>
  </security>
</web-app>

Starting Geronimo

Type it in on the command line.

jlaskowski@dev /cygdrive/c/geronimo-jetty6-jee5-2.0.2
$ ./bin/geronimo.sh run -vv
Using GERONIMO_BASE:   c:\geronimo-jetty6-jee5-2.0.2
Using GERONIMO_HOME:   c:\geronimo-jetty6-jee5-2.0.2
Using GERONIMO_TMPDIR: c:\geronimo-jetty6-jee5-2.0.2\var\temp
Using JRE_HOME:        c:\apps\java5\jre
...
Geronimo startup complete

Deploying hudson.war

Download hudson.war from its releases web page.

You can deploy hudson.war from the web console of Geronimo, but there's another way to do the same - executing deploy command on the command line.

jlaskowski@dev /cygdrive/c/geronimo-jetty6-jee5-2.0.2
$ ./bin/deploy.sh -u system -p manager deploy hudson.war hudson-geronimo-plan.xml
Using GERONIMO_BASE:   c:\geronimo-jetty6-jee5-2.0.2
Using GERONIMO_HOME:   c:\geronimo-jetty6-jee5-2.0.2
Using GERONIMO_TMPDIR: c:\geronimo-jetty6-jee5-2.0.2\var\temp
Using JRE_HOME:        c:\apps\java5\jre
    Deployed hudson/hudson/1.153/war @ /hudson

The Geronimo console shows deployment progress as follows:

hudson home directory: C:\Documents and Settings\jlaskowski\.hudson
2007-11-08 08:53:12 hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 3448
2007-11-08 08:53:12 hudson.model.Hudson load
INFO: Took 31 ms to load

Running the webapp

Point the browser of your choice to http://localhost:8080/hudson. You should see hudson's welcome page.

Setting up a new Maven2 job in hudson works fine too.

  • No labels