Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm setting up a Hudson build slave on an OS X machine. I'm using launchd to start the slave using the following plist in `/Library/LaunchDaemons/':

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
                       "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>KeepAlive</key>
        <true/>
        <key>Label</key>
        <string>org.hudson-ci.jnlpslave</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/bin/java</string>
                <string>-jar</string>
                <string>/Users/Shared/Hudson/slave.jar</string>
                <string>-noCertificateCheck</string>
                <string>-jnlpUrl</string>
                <string>file:///Users/Shared/Hudson/slave-agent.jnlp</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
</dict>
</plist>

I'm currently putting the slave.jar and slave-agent.jnlp files in /Users/Shared/Hudson but this seems like an unnecessarily user-visible location. What's the convention? Where should I be putting these JARs for a daemon?

share|improve this question

1 Answer 1

Where Do Apps usually write their data? How about the home directory of the user, that the slave runs under?

I have question regarding the slave.jar. Isn't the most current version of the slave.jar downloaded when executing the jnlp file?

share|improve this answer
    
Peter, on OS X, the launchd daemon runs the process, but does not have a home folder. GUI (Cocoa) apps use /Library/Application Support/[app.bundle.id]/, but I don't know if this is the best answer for this situation (hence the question). –  Barry Wark Nov 24 '10 at 23:42
    
javaws would download the Jar, but cannot run headless. In this case, we use java -jar slave.jar -jnlpUrl ... so that it can run headless. –  Barry Wark Nov 24 '10 at 23:43
1  
A Apple developer page states: "It is also possible to run additional copies of launchd, most often run by a non-root user. When non-root users load jobs, the launchd daemon handling their jobs runs with their non-root privileges, giving an extra layer of security." I would strongly recommend to you not running it under root. So the user that launchd runs under (lets say Hudson) can have a Home directory that is used for all the Hudson files. Work;s like a charm for me. -- see developer.apple.com/macosx/launchd.html –  Peter Schuetze Nov 29 '10 at 17:31
1  
Regarding javaws. You confused me, because you copy the jnlp file, which in your case is completely unnecessary. Did you think about launching the SSL client via SSH? Pros: less configuration issues, slave can be launched on demand, you will always have the newest slave.jar –  Peter Schuetze Nov 29 '10 at 17:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.