Friday, October 23, 2009

How to install and configure Hudson on solaris 10?

1) Create the user and group in solaris to run Hudson service.
groupadd hudgroup
useradd -g hudgroup -d /home/hudadm -m hudadm
Note: hudadm is the username and hudgroup is the group name which will run hudson process.

2) set JAVA_HOME env variable
export JAVA_HOME=/usr/j2se/bin

3) copy the below file hudson.xml to /var/svc/manifest/application. We are going to run hudson as part of solaris SMF. We are going to define it as an application in SMF.







eout_seconds="0"/>



Hudson Continuous Build Server


4) import the hudson.xml file to SMF repository.
svccfg import /var/svc/manifest/application/hudson.xml

5) Start the service.
svcadm enable svc:/application/hudson:default

6) Check whether service is running properly or not.
bash-3.00# svcs -l svc:/application/hudson:default
fmri svc:/application/hudson:default
name Hudson Continuous Build Server
enabled true
state online
next_state none
state_time Sat Oct 24 11:57:23 2009
logfile /var/svc/log/application-hudson:default.log
restarter svc:/system/svc/restarter:default
contract_id 98
dependency require_all/none svc:/milestone/multi-user-server (online)


7) If it shows online in "state" and "dependency" then hudson is running fine.

Note:
Above hudson.xml file has been written hudson listen on 8090 port. So use http://hostname:8090/ to start hudson in any browser. Use xmllint to parse the hudson.xml file in case if you need to write your own xml file and compile it.


No comments:

Post a Comment