Multiple OSX Build agents auto starting

I work for a company that is running dozens of build agents for various platforms and have had mac minis running the OSX buiuld agents until now. 1 per mac mini.

We've bought mac pros to increase our building power and I've been asked to set them up. To maximise our build power we'd like to run 1 agent per core on the macs like we do on windows but I've run into an issue.

After following the instructions on confluence I was able to get 1 agent running from launchdeamons but when I try to start more they are compaining that an agent is already loading.

Anyone with good OSX knowledge would share how to do this?

Comment actions Permalink


Have you checked that all the requirements from this section are met?

Comment actions Permalink

I've got a working solution now but not tidy enough that I'd document for the wiki.

The main problem I ran into is that the generic procedure for other OSs of copy buildAgent directory and update the properties to use different working directories doesn't work for mac osx. The builds themselves are happy but the initilization script provided with the agent generates errors and I'll paraphrase because I'm at home "Agent already running".

To get around this I edited the script to launch agents as buildagent2, 3, 4 etc which in turn requires renaming the plists you put in the launchd library folder to 2 3 4 as well.

This works but is a bit messy as every time the agent updates it overwrites some of these files so I'm using a bit of a messy hack of a script to detect that change and overwrite them again and then restart the agents.

An initialisation script to run multiple agents on the same machine using the variables in the file is what's really required. It could be done, but my shell scripting may not be up to it. If I get some time to revisit this and clean it up I'll post my solution.


Please sign in to leave a comment.