1

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 slave 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 ?

Thanks in advance.

acmoune
  • 2,981
  • 3
  • 24
  • 41

1 Answers1

3

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

s8k-37
  • 66
  • 3
  • Ok, I see that it depends on the Launch method. The default one (Launch agent by connecting it to the master) is a bit confusing. – acmoune Dec 04 '20 at 10:06
  • 2
    yes, no problem. If you run a windows slave, it is the other way round. You connect from the Slave to the master via the URL and download the jenkins installer. :) – s8k-37 Dec 04 '20 at 10:11
  • 1
    @s8k-37 beat me to the answer., though pls add this: You can actually setup multiple agents (slaves) on same host. Make sure to SSH using a separate user to the one Jenkins master is installed as otherwise there's a security vulnerability risk. Make sure the "Remote root directory" is unique; that's where the workspaces are created inside of (An agent needs to have a directory dedicated to Jenkins).. Recommend setting "Remoting Work directory" inside "Remote root directory" *where it stores the agent.jar, etc). ps::you can also run multiple masters on same host w/care, diff. user etc. – Ian W Dec 04 '20 at 11:18