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:
-
Steps for Jenkins Master installation
- Refer here for steps
- Refer Video Content Section for help in creating vm’s in cloud.
- Create a VM and ssh into the vm and execute the following commands
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
- Navigate to the http://ipadress:8080
- Install Selected Plugins and create a user
-
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
- 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
- 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