Jenkins – Intro and Installation

jenkins

Jenkins is a Continuous Integration System, and can be made to work as a continuous delivery hub for projects. It is a java based program, ready to run out-of-the-box. that gives a GUI base dashboard to manage the application.

Continuous feed back process is one system in which every develper get feedback on the run, when they commit a change in their code, rather than waiting all the way till all developers complete their codes and a full build is created and tested, which happens in a traditional approach. Locating the cause of a bug is easier by this approach since the developer will have to focus only on the piece of code they made between the last two commits.

In a Continuous Integration System, a Continuous Integration Server receives the piece of code that is commited and uploaded, may be to a repository like Git, and it does the build, testing, deployment and provides the feed back. Commonly used continuous integration tools in present days are: Jenkins, Buildbot, Travis CI, Babboo, etc.

Jenkins is a tool written in Java, and accomodates plugins that will allow integration of various DevOps stages. Jenkins support Git, Maven, Puppet, Ansible, etc. At the time of installtion of Jenkins itself we have option to select a widely available choice of plugins. There are several plugins available for Testing, Notification, Report creation, Compiling, deployment, etc.

Installing Jenkins on a CentOS 7 linux host:

  • The latest copy of Jenkins as on Mar 2018 requires installation of “java-1.8.0-openjdk” package. Ensure this is the only Java version installed.
  • Download files required to download packages required to access the required rpm packages by using the command “wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo“, and “rpm –import https://pkg.jenkins.io/redhat/jenkins.io.key“.
  • Ensure firewall is turned off for testing purpose and so is Selinux.
  • Install jenkins “yum install jenkins -y
  • Start Jenkins using the command “systemctl start jenkins“.
  • Verify is Jenkins is listening to the default TCP port 8080, by using the command “netstat -na | grep 8080“.
  • Access the Jenkins dashboard using the URL “http://<jenkins server IP>:8080“.
  • Jenkins ver. 2.110 may prompt you for an installation authentication, and the location where password is stored will be displayed on the screen.