6. Project Milestone 6: Details and Instructions - airavata-courses/TeamAlpha GitHub Wiki
Instructions to configure Jenkins for Milestone - 6
Before starting configuring Jenkins for Milestone-6, create a Job Named 'Airavata' in Jenkins as per the instructions at - https://github.com/airavata-courses/TeamAlpha/wiki/5.-Project-Milestone-5:-Details-and-Instructions
After you have done that then you can proceed to configure Jenkins for Milestone - 6
1. Configure jenkins to deploy 'User Registration' microservice:
Create a job named 'User_Registration' -
From dashboard click on 'New Item' to create new job for User Registration. Name it 'User_Registraion' and then select 'Freestyle project' and click 'OK'
Click on configure and go to 'Source Code Management' section. Select git and enter 'https://github.com/airavata-courses/TeamAlpha.git' in repository URL. Select your credentials from drop down.
Go to Build and add a build step -> 'invoke top level maven targets'
Enter 'clean install' as goal and in advanced option enter 'user.registration.micro/pom.xml' as POM path
Add another build step and select 'Execute Shell' and enter
sudo sh user.registration.micro/scripts/run.sh
Click on 'Save'
Now you need to trigger this job. Currently we are triggering this job when Airavata Job is successfully built. To configure that -
From Jenkins dashboard go to 'Airavata' Job and click configure.
Go to post build actions and select 'Build other projects' from Add post build action drop down.
Enter 'User_Registration' in projects to build field and select 'Trigger only if build is stable'
2. Configuring Jenkins to deploy 'Job_Monitor' microservice:
Create a job named 'Job_Monitor' -
From dashboard click on 'New Item' to create new job for Job monitoring. Name it 'Job_Monitor' and then select 'Freestyle project' and click 'OK'
Click on configure and go to 'Source Code Management' section. Select git and enter 'https://github.com/airavata-courses/TeamAlpha.git' in repository URL. Select your credentials from drop down.
Go to Build and add a build step -> 'invoke top level maven targets'
Enter 'clean install' as goal and in advanced option enter 'job.retrieval.micro/pom.xml' as POM path
Add another build step and select 'Execute Shell' and enter
sudo sh job.retrieval.micro/scripts/run.sh
Click on 'Save'
Now you need to trigger this job. Currently we are triggering this job when User_Registration Job is successfully built. To configure that -
From Jenkins dashboard go to 'User_Registration' Job and click configure.
Go to post build actions and select 'Build other projects' from Add post build action drop down.
Enter 'Job_Monitor' in projects to build field and select 'Trigger only if build is stable'
3. Configuring Jenkins to deploy 'Job_DB_Save' microservice:
Create a job named 'Job_DB_Save' -
From dashboard click on 'New Item' to create new job for micro service required to save job on DB. Name it 'Job_DB_Save' and then select 'Freestyle project' and click 'OK'
Click on configure and go to 'Source Code Management' section. Select git and enter 'https://github.com/airavata-courses/TeamAlpha.git' in repository URL. Select your credentials from drop down.
Go to Build and add a build step -> 'invoke top level maven targets'
Enter 'clean install' as goal and in advanced option enter 'job.db.save.micro/pom.xml' as POM path
Add another build step and select 'Execute Shell' and enter
sudo sh job.db.save.micro/scripts/run.sh
Click on 'Save'
Now you need to trigger this job. Currently we are triggering this job when Job_Monitor Job is successfully built. To configure that -
From Jenkins dashboard go to 'Job_Monitor' Job and click configure.
Go to post build actions and select 'Build other projects' from Add post build action drop down.
Enter 'Job_DB_Save' in projects to build field and select 'Trigger only if build is stable'
User Inputs : Below are the fields expected from users.
This fields are present in the file present at : https://github.com/airavata-courses/TeamAlpha/blob/master/Airavata_Remote_Job_Runner/src/main/resources/user_input.properties
private.key.path=path to the private key for which ssh is configured
private.key.passphrase=pass phrase for the key if set
user.name=username
user.job.file.path=path to the directory where job file is kept
user.job.file.name=job file name
user.job.remotefile.path=path to the directory on the server
retry.time.interval=time interval for successive request to monitor job status(milliseconds)
default.retry.attempts=default number of attempts (changes as per the required time provided by the server)
registration.microservice.endpoint=http://localhost:7890/userManagementService/addUser
job.retriev.microservice.endpoint=http://localhost:7891/jobManagementService/retrievJobs
job.db.save.microservice.endpoint=http://localhost:7892/jobSaveService/saveJob
Replace localhost with IP of VM if you are de[loying micro services on different VM's