Jenkins

Jenkins - Distributed Builds

Jenkins - Distributed Builds

If larger and heavier projects need to be created regularly, multiple construction machines may be required. Furthermore, running all of these builds on a single machine may not be the ideal option. In such a case, other Jenkins computers can be configured as slave machines to relieve the burden on the master Jenkins server.

Sometimes you might also need several different environments to test your builds. In this case, using a slave to represent each of your required environments is almost a must.

You may also require numerous distinct environments to test your builds in some cases. Using a slave to represent each of your essential environments is almost a requirement in this situation.

A slave is a machine configured to offload construction projects from the master and once configured, this job allocation is pretty automatic. The project's setup determines the exact delegation behaviour; some projects may opt to "stick" to a certain machine during a build, whereas others may roam freely across slaves.

There is no need to install the whole Jenkins (package or compiled binaries) on a slave because each slave runs a separate software called a "slave agent." Slave agents can be started in various ways. Still, to function, the slave agent and Jenkins master must establish a bi-directional communication channel (for example, a TCP/IP socket).

Steps for setting up slaves/nodes are as given below:

Step 1 − Go to the ‘Manage Jenkins’ section and then ‘Manage Nodes section’.



Step 2 − Click on ‘New Node’


Step 3 – After giving a name to the node, choose the ‘Dumb slave’ option and click on Ok.


 

Step 4 − Enter the node slave machine's information. Because we are considering the slave machine to be a Windows system in the following example, the choice "Let Jenkins control this Windows slave as a Windows service" was chosen as the launch mechanism. We must additionally include the slave node's information, such as the node name and login credentials for the node machine. Save by clicking the Save button. Labels with the name "New Slave" can configure jobs to use this slave machine.


After completing the preceding procedures, the new node computer will initially be offline but will come online if all of the parameters in the previous screen were correctly entered. If necessary, the node slave machine can be made offline at any time.