Multiple Slaves on same machine Jenkins

Having multiple slave/build executors running on the same machine can sometimes solve your build problem.

NewSecondSlave

  1. Goto Manage Jenkins/Manage Nodes
  2. Press New Node
  3. Fill the name

 

Fill in the slave information :
MySecondSlaveSetup

 

After pressing save you get the standard Java launch screen. Remember to move press the launch button only in a browser of your actual slave machine.

Lanuch

Pressing the Launch button will download the JNLP file. This file contains all the information that the slave and the master requires. Download it.

After downloading move to the folder where the file was placed. Copy the file to let’s say D:\Slaves\SecondSlave\

In this folder, also place the Jenkins file :

jenkins-slave.exe

jenkins-slave.xml

slave.jar (needed by the service)

open the downloaded JNPL file in any editor, after a bit of formatting you will see a very long argument looking like a hash, line 9. Copy the hash

page4

Open the Jenkins-slave.xml file in your favorite editor.

jenkins-slave.xml-changes

Change the id, name and set the hash as secret. After all these change open a command line and run the jenkins-slave.exe with argument install:

execute.jenkins.slave

This will install the service on your slave machine, using the name given in the Jenkins-slave.xml

service.list

Be aware that installing the service will not start it, you have to start it manually, but you probably want to assign a user account to the service.

Also note that the assigned account to the service will be the user that will be running your compiler. This means that all all applications will be using the accounts settings such as nuget config and iis credentials.

* * *

One response to “Multiple Slaves on same machine Jenkins

Leave a comment