How to Add Jenkins Slave to Master

FoxuTech
2 min readOct 26, 2018

--

Still now we have setup the Jenkins and executed some sample now. This helps only building/running job only on master server. If we have parallel build or multiple jobs needs to be perform single server won’t help much, either we may need more hardware or additional server. For that Jenkins is giving master-slave feature, which helps to run then build or jobs on multiple servers.

Jenkins Master Slave

In this post we should like to demonstrate how to create a master-slave environment in Jenkins. Jenkins makes it possible to configure multiple nodes as slave.

Refer Our Jenkins Articles on Jenkins Page

To achieve this with following easy steps,

  1. Setup Jenkins Master
  2. Installing Slave Linux and Windows
  3. Adding new slave node on Jenkins master

Step1: Setup Jenkins Master

You can install Jenkins on any machine windows/linux. In our case we would like to take CentOS 7, For Ubuntu follow Jenkins Installation

Install Jenkins in Redhat/centos 7

# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
# rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

Install jenkins

# yum install jenkins

Install java

# yum install java-1.8.0-openjdk

Setup firewall

# firewall-cmd –zone=public –add-port=8080/tcp –permanent
# firewall-cmd –reload

Start Jenkins

# systemctl restart jenkins.service

Step2: Installing Slave Linux and Windows

Install java using following command,

# yum install java -y

Add Jenkins user to authenticate slave server, you can any user name.

# useradd Jenkins 
# passwd Jenkins

Step3: Follow this URL for complete URL.

https://foxutech.com/how-to-add-jenkins-slave-to-master/

--

--

FoxuTech
FoxuTech

Written by FoxuTech

Discuss about #Linux, #DevOps, #Docker, #kubernetes, #HowTo’s, #cloud & IT technologies like #argocd #crossplane #azure https://foxutech.com/

No responses yet