Scripts to create and run a Jenkins slave via Java Web Start (JNLP) on OS X as a Launch Daemon.
bash <( curl -L https://raw.githubusercontent.com/royingantaginting/jenkins-slave-osx/master/install.sh )
OS X slaves created with this script:
- Start on system boot
- Run as an independent user
bash <( curl -L https://raw.github.com/rhwood/jenkins-slave-osx/master/install.sh ) [options]
The install script has the following options:
--java-args="ARGS"to specify any optional java arguments. Optional; the installer does not test these arguments.--master=URLto specify the Jenkins Master on the command line. Optional; the installer prompts for this if not specified on the command line.--node=NAMEto specify the Slave's node name. Optional; this defaults to the OS X hostname and is verified by the installer.--user=NAMEto specify the Jenkins user who authenticates the slave. Optional; this defaults to your username on the OS X slave and is verified by the installer.--token=TOKENto specify the Jenkins user token who authenticates the slave. Optional; the installer prompts for this if not specified on the command line
Simply rerun the installer. It will reinstall the scripts, but use existing configuration settings.
The file Library/Preferences/org.jenkins-ci.slave.jnlp.conf in /var/lib/jenkins (assuming an installation in the default location) can be used to configure this service with these options:
JAVA_ARGSspecifies any optional java arguments to be passed to the slave. This may be left blank.JENKINS_SLAVEspecifies the node name for the slave. This is required.JENKINS_MASTERspecifies the URL for the Jenkins master. This is required.JENKINS_USERspecifies the Jenkins user used to bind the master to the slave. This is required.HTTP_PORTspecifies the nonstandard port used to communicate with the Jenkins master. This may be left blank for port 80 (http) or 443 (https). These settings are initially set by the installation script, and only need to be changed if that script is invalidated. The slave must be restarted for changes to take effect.