Jenkins Master Slave Configuration | Jenkins distributed architecture

preview_player
Показать описание
Jenkins Master-Slave Configuration

Agenda:
Understanding Jenkins Master and Slave Architecture
Setting Up Jenkins Slaves using Master Private and Public ssh keys
Setting Up Jenkins Slaves using a simple machine login credentials method (Not-recommended)

Jenkins Master Responsibilities:
Scheduling build jobs.
Monitor the slaves (possibly taking them online and offline as required).
Recording and presenting the build results.

Jenkins Slave Responsibilities:
Slaves can run on a variety of operating systems.
The job of a Slave is to do as they are told to, which involves executing build jobs dispatched by the Master.

**************************************************************************
Steps to create Jenkins Linux Slaves:

Generate SSH Key in the Jenkins master server:

On the Jenkins master server, log in to the Jenkins user and generate the ssh key.

su jenkins
ssh-keygen

Setup Credentials on Jenkins
Open your Jenkins dashboard and click on the 'Credentials' menu on the left.
And click the 'global' domain link.

Now click 'Add Credentials'.

Now choose the authentication method.
Kind: SSH Username with private key
Scope: Global
Username: jenkins
Private key: Enter directly and paste the 'id_rsa' private key of Jenkins user from the master server.
Click 'OK'.

And the Jenkins credential with ssh auth key method have been created.

Set up Slave Nodes

Now we will setup the slave nodes server by installing java on those servers and create a new Jenkins user.

Now install java OpenJDK using apt command below.

sudo apt install openjdk-8-jdk -y

After the installation is complete, check the installed java version.

java -version

Add New Jenkins User

adduser jenkins

Now that we have added Jenkins user to the slave machine
we have to go back to the master machine and copy the public key.

Copy the SSH Key from Master to Slave

Type the Jenkins user password.

TO verify just Type the Jenkins username and password in the slave machine.

Add New Slave Nodes
On the Jenkins dashboard, click the 'Manage Jenkins' menu, and click 'Manage Nodes'.

Click the 'New Node'.

Type the node name 'slave01', choose the 'permanent agent', and click 'OK'.

Now type node information details.
Description: slave01 node agent server
Remote root directory: /home/jenkins
Labels: slave01
Launch method: Launch slave agent via SSH, type the host IP address '10.0.15.21', choose the authentication using 'Jenkins' credential.

Now click the 'Save' button and wait for the master server to connect to all agent nodes and launch the agent services.

**************************************************************************

Continuous Integration vs Continuous Delivery vs Continuous Deployment in an Easy Way

My GitHub Project for Jenkins pipeline demo:

Jenkins Installation Video:

Docker Installation Video:

**************************************************************************
"Shahed - Indian Fusion" is free to use anywhere as long as you credit Shahed.
**************************************************************************
Рекомендации по теме
Комментарии
Автор

Nice session 👍 Thank you so much for sharing it knowledge

chandrashekhar
Автор

Excellent explanation. Thanks


can we use the SSH Key connection method for slave on Windows machine?

virochan
Автор

For slave Jenkins Ec2 instances launch?

malleshdappu
Автор

Bro, sincere thanks to you for making such a simple explanation video on Jenkins Master Slave Architecture.

SkyMusiz
Автор

Server rejected the 1 private key(s) for ec2-user ??? how to solve this error plzzz ??

nayankalapgarvlogs
Автор

Can we use jenkins, which is already used on a ubuntu server, to aws ec2 instance for deployment

JitendraSingh-epfp
Автор

Should there be a remote desktop connection maintained between the master and slave while the job is running? also, if there are internet issues in the master machine will the execution in slave be affected?

sonavanarasu
Автор

100 marks to your content, explanation and presentation. would request you to make more videos on jenkins please.

deepeshprasad
Автор

Content is excellent. Only the background noise is annoying.

shishirroy
Автор

Excellent content..Do you give training on Jenkinsfile

bharathinayak
Автор

Content is superb... Akash I am looking more on Jenkins pipeline... I know you have made video but if you can go to advance level in another video just concentrating on pipeline

.

ADITYACOOL