Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In what scenario do I need to use slave node with jenkins?

I'm new to Jenkins and Continous Integration, and I noticed that it supports master / slave nodes. I really don't know what that means.

Can someone please tell in what scenario do I need slave agent?

like image 618
Gerald Hughes Avatar asked Mar 11 '14 15:03

Gerald Hughes


2 Answers

Here is a scenario:

Our main Jenkins master is running on Windows machine (yes I know... I know...). We are doing iOS mobile development. There are some things that can only be done using Xcode (which only runs on Mac OS). I have a Jenkins Slave running on that Mac, that takes care of executing those tasks that can only run on a Mac.

Why not just setup a new instance on that Mac? Cause that job is tied together with other jobs (on Master) in dependencies and the flow. Even promotions on those Xcode tasks are run on Master.

like image 83
Slav Avatar answered Oct 02 '22 07:10

Slav


Jenkins' Master / Slave architecture is used to manage distributed builds.

There are many different scenarios you might want to use a distributed build system. It is all based on your projects load and dependencies.

Pretty much, the Master is what you're probably currently using, and is responsible for scheduling builds, dispatching jobs to slaves, and monitoring the results, but can also execute jobs itself. A slave is a java executable that sits on a remote server waiting for instructions from the master (to execute build).

To use this functionality in Jenkins, go to "Manage Jenkins" screen, and click on "Manage Nodes"

https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds

For a more in depth summary of distributed builds with Jenkins, as well as some scenarios where this system would be useful, and how to implement it, please read chapter 11: Distributed Builds of Jenkins: The Definitive Guide by John Ferguson Smart
http://wakaleo.com/books/jenkins-the-definitive-guide/download-jtdg-pdf

like image 41
Cole9350 Avatar answered Oct 02 '22 08:10

Cole9350