running on the other side of a firewall. It works no matter what operating system your slave is running
on, however it is more commonly used for Windows slaves. It does suffer from a few major drawbacks:
the slave node cannot be started, or restarted, automatically by Jenkins. So, if the slave goes down, the
master instance cannot restart it.
When you do this on a Windows machine, you need to start the Jenkins slave manually at least once.
This involves opening a browser on the machine, opening the slave node page on the Jenkins master,
and launching the slave using a very visible JNLP icon. However, once you have launched the slave,
you can install it as a Windows service.
There are also times when you need to do this from the command line, in a Unix environment. You
may need to do this because of firewalls or other networking issues, or because SSH is not available
in your environment.
Lets step through both these processes.
The first thing you need to do in all cases is create a new slave. As for any other slave node, you do this
by clicking on the New Node menu entry in the Nodes screen. When entering the details concerning
your slave node, make sure you choose “Launch slave agents via JNLP” in the Launch Method field
(see Figure 11.7, “Creating a slave node for JNLP”). Also remember that if this is to be a Windows slave
node, the Remote FS root needs to be a Windows path (such as C:\jenkins-slave). This directory
does not have to exist: Jenkins will create it automatically if it is missing.
Figure 11.7. Creating a slave node for JNLP
Once you have saved this configuration, Next, log on to the slave machine and open the Slave node
screen in a browser, as shown in Figure 11.8, “Launching a slave via Java Web Start”. You will see
a large orange Launch button—if you click on this button, you should be able to start a slave agent
directly from within your browser.