Tuesday, June 29, 2021

Jenkins Learning Task 10 - How to add Slave Nodes in Jenkins

How to add Slave Nodes/SSH build agents in Jenkins


1. Add Git server(mnode01) and App server(mnode02) as SSH build agent/slave nodes in Jenkins. The slave nodes name must be Git_mnode01, App_mnode02 respectively.

2. Add labels as below
    Git_mnode01: mnode01
    App_mnode02 : mnode02

3. Remote root directory for Git_mnode01  must be /home/kumar/jenkins and App_mnode02 must be /home/john/Jenkins 

4. Make sure slave nodes are online and working properly.

Pre-Requisite

* This Task based on the Learning LAB, which I have set up with 3 servers.
mnode01 is my git server, mnode02 is my app server and master is my Jenkins server.
* Should have ssh connection between servers.
* You might need to install some plugins and restart Jenkins service. 

Solution

Step 1: Install Java on all Node servers ( app, git servers)
Step 2: Install SSH build agent plugin in Jenkins,
Step 4: Setup the slave nodes in jenkins.


Verification:
    Refresh the nodes list. You should see the newly added nodes with the system statistics details.

Check below the sample solution video for the above task.


PLEASE SUPPORT ME BY
LIKE || SUBSCRIBE || COMMENTS  on MY YOUTUBE CHANNEL AND BLOG 

STAY TUNED FOR MORE VIDEOS.......

#Learn    #Practice    #Re-Learn    #Improve    #Motivate
#Continue-Learning    #Apply    #Get-Help    #Help-Others

Tuesday, June 22, 2021

Jenkins Learning Task 09 - Schedule a job in Jenkins

 Schedule a job in Jenkins


1. Create a Jenkins job named logs-copy.

2. Configure it to periodically build every 5 minutes to copy the Apache logs (both access_log and error_logs) from mnode02 (from default logs location) to location /data on mnode01 Server.

Note: * This is a learning task and you can try to do it in your own learning environment. I have done a sample solution using VirtualBox with Ubuntu OS.

Pre-Requisite

* This Task based on the LAB which I have set up with 3 servers.
mnode02 is my app server mnode01 is my git server and master is my jenkins server
* Should have ssh connection between servers.
* You might need to install some plugins and restart Jenkins service. 

Solution

Step 1: Enable password-less sudo in-app server and git server
Step 2: Enable password-less SCP 
Step 3: Install SSH Plugins in Jenkins
Step 4: Setup Credentials for SSH users
Step 5: Add SSH Hosts in Jenkins
Step 6: Create a Scheduled Build Job


Verification:
ssh to  mnode01  server and got to /data dir and check the logs are available.

Check below the sample solution video for the above task.




PLEASE SUPPORT ME BY
LIKE || SUBSCRIBE || COMMENTS  on MY YOUTUBE CHANNEL AND BLOG 

STAY TUNED FOR MORE VIDEOS.......

#Learn    #Practice    #Re-Learn    #Improve    #Motivate
#Continue-Learning    #Apply    #Get-Help    #Help-Others

Docker Learning Task 02 - How to create a basic docker network

 How to create a basic docker network 1. Create a docker network named  mynetwork . 2. Configure it to use bridge drivers. 3. Set it to use ...