Setting up a Jenkins slave is more easy then you might think.
On the server that needs to be run as the slave, you only need the following:
– an account that Jenkins can use to run the jobs (typically a user called ‘jenkins’)
– a folder in which Jenkins can store the required files (typically: /jenkins)
On the Jenkins master, you can add a new Node with the following settings:
– name : slave
– remote root directoty : the Jenkins folder on the slave (typically: /jenkins)
– select : only build jobs with label restrictions matching this node
– host : the slave’s hostname or ip-adress
– credentials : setup the credentials of the slave (username/password or username with private key)
If there is a job that you want to run on this machine, then in the job configuration enable the ‘Restrict where this project can be run’ option and use the label expression ‘slave’
That’s it, the job will now be executed on the slave.