Skip to main content

Hudson now available in IPS package

Posted by kohsuke on July 15, 2008 at 11:01 AM PDT

In addition to Debian, OpenSUSE, and FreeBSD packages, Hudson is now available as an IPS package for users who run on OpenSolaris, and here is how you can use it:

First, you need one-time set-up to hook up Hudson's IPS repository to your local system. The following two commands tell IPS to add with the nick name "hudson" and update the local package list with this new repository. ('pfexec' is Solaris speak for 'sudo'):

$ pfexec pkg set-authority -O hudson
$ pfexec pkg refresh

You can then install Hudson like this:

$ pfexec pkg install hudson
$ pfexec /usr/sbin/svccfg import /var/svc/manifest/application/hudson.xml

The 1st command installs Hudson, then the 2nd command tells SMF to manage Hudson as a service. If you then go to http://localhost:8080/ you should see Hudson running. Change /var/svc/manifest/application/hudson.xml and run the svccfg import if you need to change the launch parameter, such as JVM size, HTTP port number, and so on.

To update to a newer Hudson, you do:

$ pfexec pkg refresh
$ pfexec pkg install hudson
$ pfexec svcadm restart hudson

If you are interested in creating OpenSolaris packages too, you might find my experience here and here interesting. Also, ideally I don't want you to worry about svcadm and svccfg, but several RFEs in IPS is blocking me from doing that.

Related Topics >>


P.S. There's a bug in IPS right now which prevents installing from alternate repositories so the above won't work. Fortunately there is a workaround which is to specify the authority name, so assuming above config you can do pkg install pkg://hudson/hudson and that should work. See some more on this at my blog

Yes, it's yours. I made a few changes to yours, and one of the changes is to increase the time out until SMF decides to kill the process.

AFAICT, even if the time out is reached, SMF kills the process first before starting a next one, so you never have two instances running.

And no, you are my Solaris expert :-), and I haven't found any other way.

Is the solaris svc manifest you use in that package the same as the one I outlined on my site? The reason I ask is that I have frequently run into trouble with setting up Java app servers with SMF Manifests. Basically, if the JVM is non-responsive (a common reason to want to restart the service) the manifest has trouble determining that the service is still running and tries to start a second instance. If you've found a better way, I'll point people over to this since I get a lot of google queries about it.