Pages

Friday, August 26, 2016

Jenkins Slave – Remote Host

As we already know that Jenkins besides acting as a continuous integration tool allows other configuration options including master – slave configuration. We already discussed master-slave configuration (Check Here for details). In this article we will see how we can configure Slave on a Remote Host using the Username and password.

1. Create a user name “Jenkins” on the remote machine with Password on the remote Machine (Ex- 172.16.202.95)

[root@devm local]# adduser jenkins
[root@devm local]# passwd jenkins
Changing password for user jenkins.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.

2. Create a home directory for the Jenkins Slave

[root@devm local]# cd /home/jenkins/
[root@devm jenkins]# mkdir jenkins-slave

3. Create a New Node in the Jenkins Master server with the below configuration,
a. Enter the Name of the Slave “JenkinsSlave1”
b. In the Remote root Directory – (enter the location that we created in the remote machine) /home/Jenkins/Jenkins-salve
c. In the Launch Method – Launch slave agents on Unix Machine via SSH
This gives Host and Credentials boxes under this where we need to enter the Host name and Select the User name and password that are added in the global credentials

The credentials are same as the one that we created on the remote machine above. Once saved, the Slave will automatically gets started and we can see the slave running on the remote machine. Make sure JAVA is configured and is available for the Jenkins to start or else we will see Java Not found exceptions.

In the next article we will see how we can configure a Jenkins Slave on a remote Host using SSH keys

More to Come, happy learning J

No comments :

Post a Comment