Jenkins Installation
Aim: Installation and Configuration of Jenkins
Procedure and Screenshots.
Jenkins is an open source automation server that has become a crucial component in the likes of Kubernetes and GitOps. Jenkins enables the continuous integration and delivery of software. Jenkins includes a number of plugins to help the automation of building and deploying your applications.
Steps for Installation:
- First of all, jenkins needs jdk, so on ubuntu vm of ours go ahead and issue:
sudo apt update && sudo apt install default-jdk
#if on ubuntu server, default-jdk-headless
#Once the installation finishes check the java version by,
java -version.
- Download and install the necessary GPG key with the command
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
- Add the necessary repository with the command
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
- Add the universe repository with the command
sudo add-apt-repository universe
-
Update apt with the command
sudo apt-get update
-
Install Jenkins with the command
sudo apt-get install jenkins -y
Allow the installation to complete.
How to access Jenkins?
-
Open a web browser and point it to http://SERVER_IP:8080 (where SERVER_IP is the IP address of the hosting server).
-
You will then be prompted to copy and paste a password that was created during the Jenkins installation. To retrieve that password, go back to the terminal window and issue the command:
sudo less /var/lib/jenkins/secrets/initialAdminPassword
Choose suggested plugins and then
Create the first user
Set the deafult path and you will be set to roll with jenkins.
Testing java applications on jenkins.
After correct configuration and proper build information