DevOps Classroom Series – 06/May/2020

Jenkins

  • Is Opensource CI/CD Engine
  • Unofficial Defintion: Jenkins is Scheduler on Steriods fine tuned for CI/CD Activites
  • Creating a Simple Cron Job in Linux Refer Here

Installing Jenkins

  • Major Setup: Preview

  • Steps for Jenkins Master installation

    sudo apt-get update
    sudo apt-get install openjdk-8-jdk -y
    wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
    sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > \
        /etc/apt/sources.list.d/jenkins.list'
    sudo apt-get update
    sudo apt-get install jenkins
    sudo service jenkins status
    
  • Quick Setup for Jenkins Master:

    • Only Sample Setup to quickly bring up Jenkins but will not work out in Enterprise Environments
    • Install Java 8
    • Navigate to here and download the generic war package Preview
    • Open Terminal and execute java -jar <path to the downloaded file
    • Navigate to http://localhost:8080

What happens when we install Jenkins as a Service on Linux Machine

  • Jenkins will be installed as a Linux daemon (service)
  • When Jenkins is installed a new user called as jenkins is created and whenever you run anything on the ui from jenkins, they will be translated to linux commands and will be executed as Jenkins User Preview
  • So ensure the Jenkins user has all the necessary previleges.
  • In Enterprises Jenkins User will be Some Service Account with admin Previleges
  • Jenkins Server Stores every thing in JENKINS HOME DIRECTORY which acts as Jenkins Database. In the above installation the Jenkins HOME DIRECTORY is /var/lib/jenkins

Leave a Reply

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

About learningthoughtsadmin