DevOps Classroomnotes 02/May/2022

Jenkins (Contd)

  • Installing Jenkins Refer Here
  • Software and Hardware requirements for jenkins Refer Here
  • Basic Requirements
    Preview
  • Initially lets take a free tier eligible machine
    • AWS: t2.micro
      Preview
    • Azure: Standard_B1s
  • Login to the ubuntu VM
    Preview
  • Now install java 11 on ubuntu Refer Here
    Preview
  • Commands used
sudo apt update
sudo apt-cache search openjdk
sudo apt install openjdk-11-jdk -y
java -version
  • Now lets try to install jenkins on ubuntu Refer Here
  • Commands used
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee     /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]     https://pkg.jenkins.io/debian-stable binary/ | sudo tee     /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install fontconfig jenkins -y
sudo systemctl status jenkins.service
  • Verify Jenkins Service
    Preview
  • Now Navigate to http://<publicip>:8080
    Preview
  • Continue the installation
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview

Now lets see what has happened on the ubuntu vm to make jenkins work

  • Lets see the users in the linux system

    • command: sudo cat /etc/passwd. A new user called as jenkins is created and the group name is Jenkins with the home directory of /var/lib/jenkins
      Preview
  • In Jenkins we create jobs, Lets create one now
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
  • From the jenkins UI, no matter what user you are logged in as, the low level commands are executed as a jenkins user
  • Now lets try to do sudo apt update from the jenkins ui
    Preview
    Preview
  • Now build the job/project
    Preview
    Preview
  • From Jenkins UI we can do anything that the linux user jenkins can do.
  • From Jenkins UI if we need to do installations etc, we need sudo permissions without password.
  • So Lets configure linux jenkins user to have sudo permissions without password prompts
    Preview
  • Now lets explore the home directory of jenkins
    Preview
  • We have create a project called as hellojenkins
  • Lets explore the jobs folder
    Preview
    Preview
  • Now lets create a job which leads to creation of some files
    Preview
    Preview
    Preview
  • Exercise: Try to Create Jenkins on the Centos 7 Server
  • Note:

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
Animated Social Media Icons by Acurax Wordpress Development 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