Managing Jenkins Master and Slave Nodes


A master represents basic installation of Jenkins and it handles all tasks for build system. It can satisfy all user requests and it has capacity to build projects on its own. A slave is a system that is set up to reduce burden of build projects from the master but delegation behavior depends on the configuration of each project. Delegation can be configured specific to build job. On Jenkins dashboard, go to Manage Jenkins. Click on Manage Nodes link. It will provide information on all nodes as shown in below figure.

Jenkins Nodes

To create a slave node click on the New Node.

Dumb Slave Jenkins

Provide Name, Description, Labels etc. Select Launch slave agents via Java Web Start as Launch method. Provide Label; in our case it is java8.

Java Web Start as Launch method

Click on Save. It will open a page that gives details on how to launch slave node.

launch slave node

Open terminal on Windows machine and run javaws http://192.168.13.128:8080/computer/WindowsNode/slave-agent.jnlp

run javaws

It will open a dialogue box for downloading application.

downloading application

Run Jenkins Remoting Agent.

Small window for Jenkins slave agent will open.

Jenkins slave agent

Slave WindowsNode will be connected via JNLP agent.

3471_07_09

On Jenkins dashboard, go to Manage Jenkins. Click on Manage Nodes link. It will provide information on all nodes as shown in below figure. Verify both the nodes in Build Execution Status section of left most sidebar.

Jenkins dashboard, go to Manage Jenkins

If we want to run selective build job on to specific node then we can configure it build job wise as shown in below screenshotfigure. Check Restrict where this project can be run and provide Label expression given to specific node on the job configuration page.

3471_07_11

Click on Build Now to execute build. Verify the console and find Building remotely on WindowsNode we configured in above section.

3471_07_12
It will checkout the code on slave and perform operations on the specific node only.

Such configuration is useful where we want to run build job in specific set of runtime environment which is available on specific node.

Leave a comment

Your email address will not be published. Required fields are marked *