Pages

Saturday, December 26, 2015

Jenkins Basics

Jenkins is an award winning, cross platform, continuous integration and delivery application that increases the productivity to a large extent.

We can use Jenkins to build and test our code continuously making it easier for developers to integrate changes to the project. This also allows to continuously deliver our software by providing ways that define the build pipe lines and integrating with the large number of testing and development technologies

Some of the important features of Jenkins are,
1) Jenkins provides a lot of features out of box by plug-ins and more can be added
2) Easy Installation - The installation of Jenkins is very easy , just run the command
java -jar jenkins.war, deploy it in a servlet container.
3) Easy Configuration -Jenkins does provide a GIU that allows to configure various options.
4) Plug-ins - Jenkins does provide a large base of plug-ins which allows to integrate all available Source Control Systems and other tools
5) 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.
6) Jenkins does allow options to configure the build - deploy pipe line thus allowing to build things , deploy them to various systems.

In this article we will see how we can configure Jenkins on a *nix based system.

1) Download the latest version of the Jenkins RPM from here
2) Start the Jenkins using

[root@vx111a Downloads]# service jenkins start
Starting jenkins (via systemctl):                          [  OK  ]
[root@vx111a Downloads]# service jenkins status
jenkins.service - LSB: Jenkins Continuous Integration Server
   Loaded: loaded (/etc/rc.d/init.d/jenkins)
   Active: active (running) since Mon 2015-11-30 16:58:41 IST; 2s ago
  Process: 9298 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/jenkins.service
           └─9325 java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war...

3) Open the Browser and enter the URL "http://localhost:8080/" to access Jenkins

Some of the important points of Jenkins are,
1) Jenkins will be launched as a daemon on Startup using the Script /etc/init.d/jenkins
2) A jenkins user will be created to run the service. If we want to run the jenkins service with a different user name, we need make certain changes to the jenkins locations and permissions
3) The jenkins log is places under the /var/log/jenkins/ with the name jenkins.log.
4) The configuration file /etc/sysconfig/jenkins will hold the configuration parameters for the jenkins

5) Jenkins run with the 8080 port. we can change this by making changes to the above defines configuration file. Some times firewall can disable the access. Change the access permissions to access jenkins

No comments :

Post a Comment