The simplest answer to your "Can I run master and slave on the same machine" is 
"Yes".  The challenging part of the question is "Why?"

The subject line seems to hint that you are considering running a master and a 
slave on the same machine.  It certainly can be done.  Whether it should be 
done depends on your reason for wanting to use a slave.

The Jenkins master can run multiple jobs in parallel so long as you allow have 
enough executors defined on the master node to host your parallel jobs.  If the 
master machine has enough compute power to perform all the parallel jobs, then 
executing all the jobs on the master node is simpler because it is easier to 
administer one machine (the master) than two machines (the master and the 
slave).

If the master machine does not have enough compute power to perform all the 
parallel jobs, then additional computers can be added as slave nodes to add 
compute power.

Another use of master and slave is when different configurations are needed.  
For example, I have a master node that is 64 bit Linux and slave nodes for 32 
bit Linux, 32 bit Windows, and 64 bit Windows.  I couldn't run that 
configuration without master and slave setups.

I believe others have used a slave configuration to create a separate 
configuration even on the same machine.  That is not a technique I've used, but 
I've considered it, possibly using a slave running in a chroot environment on a 
Linux machine to simulate a different configuration without actually running on 
a different machine.

It is also possible to run a master and a slave on the same machine simply by 
configuring the slave node to use a different home directory than the master 
node.  I'm not sure why you would do that, but it can be done.

Mark Waite





>________________________________
> From: Varghese Renny <varghesekre...@gmail.com>
>To: jenkinsci-users@googlegroups.com 
>Sent: Tuesday, June 26, 2012 8:53 PM
>Subject: Can i run master and slave on same machine
> 
>
>
>I have a doubt regarding, if multipe jobs are there ,is it better to 
>distribute build on slave or
>do it on master itself?
>if i can do master and slave? how can i implement this?
>
>
>

Reply via email to