Setting up the Jenkins Secondary Nodes
Before setting up the Jenkins secondary nodes, you must configure the Master or primary server.
To configure the Master or primary server
Navigate to Jenkins, click Manage Jenkins, and select Configure Global Security.
Set TCP Port for Agents to Random.
To append the secondary node machines
Navigate to Manage Jenkins, Manage Nodes, and select New Node from the Jenkins home page.
Enter the Node name
[machine_name.domainname.com]
and check the Permanent Agent option.Click OK and then set the fields shown in the following table.
Field Name Value Name
machine_name.domainname.com
Description
N/A
Remote Root Directory
C:\jenkins-slave
Labels
Machine or pool name
Usage
It is recommended to utilize this node to the maximum extent.
Launch Method
Choose suitable option from dropdown and configure accordingly, or leave it default as Launch agent by connecting it to the master.
Availability
Keep this secondary node online.
Click Save.
-
Go to Manage Jenkins, and select Manage Nodes (in the Jenkins home page).
-
To disable, drill down on master node and click a button to make the node temporarily offline.
Note: Since running the Test Automation on master node works in invisible mode, we need to disable master and create another node explicitly. -
Once master node is made offline, create a node for the same machine as detailed in the section below for secondary node machines.
-
Navigate to Manage Jenkins > Manage Nodes and Clouds. Click on the secondary node created. If not already running and online, follow the options to launch the agent on the node. Typically, copying the
agent.jar
to the machine and running the command which looks like following:"java -jar agent.jar -jnlpUrl http://abc.xyz.com:8080/computer /<node name>/slave-agent.jnlp -secret a4e3897e8e7720f07495e05332525a62e4d896e32147083cfe2e2dd461ece350 -workDir "c:\jenkins-slave""