DevOps Classroomnotes 02/May/2022

Jenkins (Contd)

  • Installing Jenkins Refer Here
  • Software and Hardware requirements for jenkins Refer Here
  • Basic Requirements
  • Initially lets take a free tier eligible machine
    • AWS: t2.micro
    • Azure: Standard_B1s
  • Login to the ubuntu VM
  • Now install java 11 on ubuntu Refer Here
  • 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
  • Now Navigate to http://<publicip>:8080
  • Continue the installation







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
  • In Jenkins we create jobs, Lets create one now






  • 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

  • Now build the job/project

  • 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
  • Now lets explore the home directory of jenkins
  • We have create a project called as hellojenkins
  • Lets explore the jobs folder

  • Now lets create a job which leads to creation of some files


  • 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 comment

Turn on JavaScript to leave a comment.

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
Exit mobile version
%%footer%%