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

No comments:

Post a Comment

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 ...