Can a Jenkins agent be on the same node as the Master?

3k Views Asked by At

I am just starting with Jenkins, and I am confused on the Remote root directory, the WorkDir and the Internal data directory, precisely on their full path, including Hostname.

The agent is supposed to be on a different node, but I don't see where we can specify a Hostname or IP address.

The examples Remote root directory I have seen so far looks like /var/jenkins, is it on the master node ? if not how or where do we specify the remote Hostname or IP address ?

Same for the Workir, is it remote or local ?

1

There are 1 best solutions below

3
On BEST ANSWER

Your jenkins master node can run builds and works as an slave too.

Remote root directory is on the slave. Manage the slaves is in section "Manage Nodes". Specify the hostname/IP Address in the launch method option: "via SSH"

To join a slave: https://medium.com/@chathurams.sa/step-by-step-guide-to-add-jenkins-slave-nodes-f2e756c8849e