Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • You want more configurability between the configured nodes. Say you have one node set to be used as much as possible, and the other node do to be used only when needed.
  • You may have multiple Jenkins master installations building different things, and so this configuration would allow you to have slaves for more than one master on the same box. That's right, with Jenkins you really can serve two masters.
  • You may wish to leverage the easiness of starting/stopping/replacing virtual machines, perhaps in conjunction with Jenkins plugins such as the Libvirt Slaves Plugin.
  • You wish to maximize your hardware investment and utilization, at the same time minimizing operating cost (e.g. utility expenses for running idling slaves).

...

  • Add the first slave node in Jenkins and give it its own working dir (e.g. jenkins-slave-a).
  • Go to the slave page from the slave box and launch by JNLP, then use the menu to install it as a service instead.
  • Once the service is running, you'll get jenkins-slave.exe and jenkins-slave.xml in your slave's work dir.
  • Bring up windows services and stop the Jenkins Slave service.
  • Open a shell prompt, cd into the slave work dir.
  • First run "jenkins-slave.exe uninstall" to uninstall the one that the jnlp-launched app installed. This should remove it from the service list.
  • Now edit jenkins-slave.xml. Modify the id and name values so that your mutliple multiple slaves are distinct. I called mine jenkins-slave-a and Jenkins Slave A.
  • Run jenkins-slave.exe install and then check the Windows service list to ensure it is there. Start it up, and watch Jenkins to see if the slave instance becomes active.
  • Now repeat this process for a second slave, beginning with configuring the new node in the master config.

...