Jenkins – Installing and setting up continuous integration tool

What is Jenkins?

Jenkins is a powerful application that allows continuous integration and continuous delivery of projects, regardless of the platform you are working on. It is a free source that can handle any kind of build or continuous integration. You can integrate Jenkins with a number of testing and deployment technologies.

Features of Jenkins-

Jenkins offers the following major features out of the box, and many more can be added through plugins –

  1. Easy installation: Just run java -jar jenkins.war, deploy it in a servlet container. No additional install, no database. Prefer an installer or native package? We have those as well.
  2. Easy configuration: Jenkins can be configured entirely from its friendly web GUI with extensive on-the-fly error checks and inline help.
  3. Rich plugin ecosystem: Jenkins integrates with virtually every SCM or build tool that exists.
  4. Extensibility: Most parts of Jenkins can be extended and modified, and it’s easy to create new Jenkins plugins. This allows you to customize Jenkins to your needs.
  5. Distributed builds: Jenkins can distribute build/test loads to multiple computers with different operating systems. Building software for OS X, Linux, and Windows? No problem.

Installing Jenkins on Ubuntu –

What does this package do?

  • Jenkins will be launched as a daemon up on start. See /etc/init.d/jenkins for more details.
  • The ‘jenkins’ user is created to run this service.
  • Log file will be placed in /var/log/jenkins/jenkins.log. Check this file if you are troubleshooting Jenkins.
  • By default, Jenkins listen on port 8080. Access this port with your browser to start configuration.
  • If your /etc/init.d/jenkins file fails to start jenkins on port 8080, edit the /etc/default/jenkins to replace the line –

    by

Setting up Apache Proxy for port 80 to 8080 –

This configuration will setup Apache2 to proxy port 80 to 8080 so that you can keep Jenkins on 8080.

The following steps should only be done if you do not want the default site to stay in place. ¬†All the steps described above should work without this step in a normal virtual hosted environment on a Debian/Ubuntu installation –

If you get ERROR: Site default does not exist! then try this instead:

And if all else fails just have a look if there is a default site set up at all:

Create a file called jenkins.conf in /etc/apache2/sites-available –

And finally execute below commands –

Accessing Jenkins –

To see Jenkins, simply bring up a web browser and go to URL http://myServer:8080 where myServer is the name of the system running Jenkins.

jenkins-1-700x383

For first time, it will ask to set credentials of jenkins user from a file after that you have to login by entering jenkins user. After that it will ask to install some suggested plugins or other plugins, installation of the suggested plugins makes a lot of sense as otherwise some really basic features are missing –

getting-started-setup

The following screenshot gives an idea on what is installed here –

jenkins-install-suggested-plugin

Now you can configure Jenkins and can start building projects.

You can find more help here – https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu

Comments