Version 67.1 by David Avendasora on 2010/08/29 12:06

Hide last authors
David Avendasora 66.1 1 [[Hudson>>http://hudson-ci.org/]] is an "extensible continuous integration server". It monitors repeated executions of jobs, such as building software projects, and can be used to build WebObjects applications and frameworks. Hudson is an open source project, and can be used at no cost. An introductory presentation on building WebObjects projects with Hudson was given by Mike Schrag at WOWODC-West in 2009, and the video can be [[purchased from wocommunity.org>>http://www.wocommunity.org/apps/WebObjects/WOCommunity.woa/wa/recordings]].
Pascal Robert 37.1 2
David Avendasora 66.1 3 == Setting up Hudson ==
David Avendasora 64.1 4
David Avendasora 66.1 5 There are a couple different ways to run Hudson. The easiest is to run it as a standalone application.
David Avendasora 64.1 6
David Avendasora 66.1 7 === Standalone Installation ===
David Avendasora 64.1 8
David Avendasora 66.1 9 {{info}}
10 These instructions are based on David Avendasora's setup. You may have different preferences as to where to install Hudson at or where to set its home directory to.
11 {{/info}}
Pascal Robert 37.1 12
David Avendasora 66.1 13 1. Create a ##/Developer/Hudson/Home## directory.
14 1. [[Download Hudson>>http://hudson-ci.org/latest/hudson.war]], saving ##hudson.war## file to ##/Developer/Hudson##.
15 1. Launch Hudson with the following command in Terminal.app:
Pascal Robert 37.1 16
David Avendasora 66.1 17 {{code}}
Pascal Robert 37.1 18
David Avendasora 66.1 19 java -DHUDSON_HOME=/Developer/Hudson/Home -jar /Developer/Hudson/hudson.war
Pascal Robert 37.1 20
David Avendasora 66.1 21 {{/code}}
Pascal Robert 37.1 22
David Avendasora 66.1 23 {{info}}
Pascal Robert 37.1 24
David Avendasora 66.1 25 Hudson uses a built-in servlet container in stand-alone mode. If you have Tomcat running on the computer already, you should use the {{\-}}{{{}{-}httpPort{-}}} and {{\-ajp13Port}} options to change which ports Hudson uses.
26 {code}
27 java -DHUDSON_HOME=/Developer/Hudson/Home -jar /Developer/Hudson/hudson.war -httpPort=9080 --ajp13Port=9009
28 {code}
Pascal Robert 37.1 29
David Avendasora 66.1 30 {{/info}}
Pascal Robert 37.1 31
David Avendasora 66.1 32 1. Point your browser to: [[http://localhost:8080/]] 
33 1. Start setting up jobs
34
Pascal Robert 37.1 35 === Servlet Container Installation on Mac OS X (10.5, 10.6) ===
36
37 1. Install Tomcat from [[http://www.macports.org]] with the command
38
39 {{noformat}}
40
41 sudo /opt/local/bin/port install tomcat6
42
43 {{/noformat}}
44
45 1. Create an administrative user in ##/opt/local/share/java/tomcat6/conf/tomcat-users.xml##.
46
47 {{code value="xml"}}
48
49 <?xml version='1.0' encoding='utf-8'?>
50 <tomcat-users>
51 <role rolename="manager"/>
52 <role rolename="admin"/>
53 <user username="tomcat" password="tomcat" roles="admin,manager"/>
54 </tomcat-users>
55
56 {{/code}}
57
58 {{panel bgColor="#F7D6C1"}}
59
60 Don't forget to change the username and password after you have finished checking out the build server and start using it in production.
61
62 {{/panel}}
63
64 1. Start Tomcat.
65
66 {{noformat}}
67
68 sudo launchctl load -w /Library/LaunchDaemons/org.macports.tomcat6.plist
69
70 {{/noformat}}
71
David Avendasora 66.1 72 1. [[Download Hudson>>http://hudson-ci.org/latest/hudson.war]], saving ##hudson.war## somewhere for later.
73 1. Create a folder for Hudson to work in: ##/opt/local/var/db/hudson##
74 1. Change ownership of that folder: ##chown www:_www /opt/local/var/db/hudson##
Pascal Robert 37.1 75 1. Add the following to ##/opt/local/share/java/tomcat6/conf/setenv.local##:
76
77 {{noformat}}
78
David Avendasora 66.1 79 export HUDSON_HOME=/opt/local/var/db/hudson
Pascal Robert 37.1 80 export JAVA_OPTS=-Djava.awt.headless=true
81
82 {{/noformat}}
83
David Avendasora 66.1 84 1. Install Hudson in Tomcat: go to [[http://localhost:8080]], login with the user and password that you have created in ##tomcat-users.xml##, and upload ##hudson.war## to the Tomcat server.
85 1. Goto [[http://localhost:8080/hudson]] and you can start configuring your Hudson build server.
Pascal Robert 37.1 86
87 === {{color value="#000000"}}{*}Servlet Container Installation on Mac OS X Server (10.6)*{{/color}} ===
88
89 1. Tomcat is by default installed on Mac OS X Server.
90 1. Create an administrative user in&nbsp;##/Library/Tomcat/conf/tomcat-users.xml##.
91
92 {{code value="xml"}}
93
94 <?xml version='1.0' encoding='utf-8'?>
95 <tomcat-users>
96 <role rolename="manager"/>
97 <role rolename="admin"/>
98 <user username="tomcat" password="tomcat" roles="admin,manager"/>
99 </tomcat-users> 
100
101 {{/code}}
102
103 {{panel bgColor="#F7D6C1"}}
104
105 {color:#000000}Don't forget to change the username and password after you have finished checking out the build server and start using it in production.&nbsp;{color}
106
107 {{/panel}}
108
109 1. The way to start it depends on the version. The current way is to go to the Web Settings in Server Admin, Settings, General, check the Tomcat checkbox. Restart the WebServer.&nbsp;
David Avendasora 66.1 110 1. {{color value="#003366"}}[{{/color}}{{color value="#003366"}}Download Hudson{{/color}}http:~/~/hudson-ci.org/latest/hudson.war, saving&nbsp;##hudson.war##&nbsp;somewhere for later.
111 1. Create a folder for Hudson to work in:&nbsp;##/Library/hudson##
112 1. Change ownership of that folder:&nbsp;##chown appserver:sys /Library/Hudson##
113 1. Add the following to&nbsp;##/Library/Tomcat/bin/setenv.sh##:
Pascal Robert 37.1 114
David Avendasora 66.1 115 {{noformat}}
Pascal Robert 37.1 116
David Avendasora 66.1 117 export HUDSON_HOME=/Library/Hudson
Pascal Robert 37.1 118 export JAVA_OPTS=-Djava.awt.headless=true
119
David Avendasora 66.1 120 {{/noformat}}
Pascal Robert 37.1 121
David Avendasora 66.1 122 1. Make sure that you are using UTF8 in the Connector, by adding
Pascal Robert 37.1 123
David Avendasora 66.1 124 {{noformat}}
Pascal Robert 37.1 125
David Avendasora 66.1 126 URIEncoding="UTF-8"
127
128 {{/noformat}}
129
130 to the Connector in /Library/tomcat/conf/server.xml in such a way:
131
132 {{noformat}}
133
David Avendasora 54.1 134 <Connector port="8080" protocol="HTTP/1.1"
Ramsey Gurley 50.1 135 connectionTimeout="20000"
136 redirectPort="8443" URIEncoding="UTF-8"/>
Pascal Robert 49.1 137
David Avendasora 66.1 138 {{/noformat}}
Pascal Robert 49.1 139
David Avendasora 66.1 140 1. Install Hudson in Tomcat: go to [[http://localhost:8080]], login with the user and password that you have created in tomcat-users.xml, and upload hudson.war to the Tomcat server.
Pascal Robert 49.1 141
David Avendasora 66.1 142 1. Goto [[http://localhost:8080/hudson]]&nbsp;and you can start configuring your Hudson build server.
143
Ramsey Gurley 50.1 144 == Building WO Apps ==
145
David Avendasora 66.1 146 * Check out [[^setupWorkspace.sh]]