How to add a Mac Slave as a service?

Issue

I would like to add a Mac slave as a service.

Environment

  • CloudBees Jenkins Enterprise
  • MAC OSX

Resolution

For a MAC you can use either use Java Web Start or just config them as Unix slaves with launch method Launch slave agents on Unix machines via SSH.

If you decide to use Java Web Start, then the set-up is not straight forward as you will need to manually create the service. Moreover, when you upgrade Jenkins you will need to manually upgrade slave.jar, which is automatically upgraded in the case of the ssh slaves. For these reasons, we recommend to use the ssh approach for Mac slaves.

Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Erik Purins

    The manual creation of service link is dead. https://web.archive.org/web/20160705053818/http://www.parsed.io/setup-a-mac-slave-for-jenkins/ is the last copy I can find.

  • 0
    Avatar
    Carlos leonardo camilo Vargas Huamán

    Thank you very much for the great information. 

    I just have a question. I currently have a macOS High Sierra(my localhost machine). It was really amazing to be able to connect from my Jenkins master node to my macOS slave node through the Launch Agent via Java Web Start launch method. But I actually wanted to connect to my Unix slaves via SSH but I didn't get any result. In fact I can say that is so difficult to do it when working with macOS.

    I've tried a lot of things:

    1. I've enabled the Preferences -> Sharing -> Remote Login -> Allow access for : All users. When I simply open my terminal: ssh username@private_ip

    I always get ssh_exchange_identification: Connection closed by remote host message. I've used the -v parameter the see the log and I always get errors like related to key_load_public. In conclusion, starting from this error all the others attempts I make have no results :(

    In a nutshell, the only way to connect o macOS slave is via Launch Agent via Java Web Start? 

Please sign in to leave a comment.