DevOps Classroomnotes 26/Feb/2023

Jenkins and Maven Contd..

  • Setting different Java or other tools in jenkins
  • Manage Jenkins => Global Tool Configuration => JDK
    Preview
    Preview

Lets create a jenkins freestyle project to build game of life

  • General Section: General information about project
    Preview
  • Source Code Management: This section is about version control information of the project
    Preview
  • Build Triggers: When to trigger the build
    Preview
  • Build Environment:
    Preview
  • Build Steps: What has to be done to build the project
    Preview
  • Post Build Actions: What has to be done After Build
    Preview
  • Save the project now
  • Lets explore home directory of jenkins JENKINS_HOME
    Preview
  • Lets view the contents of config.xml. This file is representation of the job which we configured in the free style i.e. UI
    Preview
  • When we build the project, jenkins create a folder with project’s name in workspace, this folder is referred as workspace for the job
    Preview
  • Lets configure for Game of life
    Preview
    Preview
    Preview
    Preview
  • When we run the project we get unit test results (Postbuild actions => Publish Test Results)
    Preview
    Preview
    Preview
    Preview
  • To show the artifact we can use (Post Build Actions => Archive the artifacts)
    Preview
    Preview
    Preview
    Preview

Plugin in Jenkins

  • A plugin to jenkins is an additional functionality provided.
  • Installing plugin will add functionality for jenkins not installation on the jenkins master node
  • To Manage Plugins
    Preview
    Preview

Build Executors

  • A Build Executor on a Jenkins node determines how many projects can be built parallely
    Preview
  • A individual project by default gets only one executor, if you want to change this, Execute concurrent builds in the General section
    Preview
  • Every node in Jenkins can be configured with number of executors
    • Manage Nodes => Select the Node => Configure => Number of executors
      Preview

Jenkins Distributed Builds

  • Jenkins has two types of nodes
    • Master node: This is the node where we install jenkins
    • Node: This is the node on which we can run the job which matches the label defintion.
      Preview
  • Adding more nodes increases number of executors which means we can build more projects

Lets add one node which is linux (ubuntu) to the master

  • This vm has username and password. we can also configure username and key based ubuntu instances
  • In jenkins we have credentials which supports
    • username and password
    • username and key
  • Manage Jenkins => Manage Credentials
    Preview
    Preview
    Preview
  • To configure node: Manage Jenkins => Manage Nodes
    Preview
    Preview
    Preview
  • Ensure on the node JDK 11 and above is installed
    Preview
  • Now lets check whether spring petclinic works on node 1 or not
    Preview
    Preview
    Preview
    Preview

Exercise

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

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