DevOps Classroom Series – 24/Jul/2021

Configuring Jenkins Node with username and ssh key

  • Create a new redhat vm
  • Enable password authentication for the redhat vm
  • Create a jenkins user with sudo permissions
  • Install jdk 11 and maven on redhat vm
sudo dnf install java-11-openjdk-devel maven -y
  • Now login into jenkins server/master as jenkins user and create a key-pair
ssh-keygen

Preview

  • Now copy the ssh-key (public-key) to redhat node using ssh-copy-id Preview
  • Now jenkins master can login into redhat node with username
  • Now lets configure the jenkins node (redhat) from manage nodes Preview Preview Preview Preview
  • Now we know how to add linux machines as nodes to the jenkins server using ssh.

When to build the project?

  • In jenkins we can configure when to build the project using Build Triggers section Preview
  • Build after other project is build will lead to upstream and downstream jobs Preview
  • Build periodically helps us in running jenkins job periodically like a cron job or scheduler. To configure this jenkins periodic builds the use cases might be
    • Build the project once in every hour
    • Build the project on every friday at 11:00 PM
  • To configure Build Periodically we will have a cron sequence
MINUTE HOUR DOM MONTH DOW
* * * * * => every minute
  • For working with cron expression Refer Here
  • Configure the job to run every hour Preview
  • Poll SCM => will build the project when there are some changes in the git repository. To configure poll scm we need to configure how frequently jenkins will poll git repository

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube