Difference between revisions of "Jenkins Analysis"

From Gcube Wiki
Jump to: navigation, search
(Introduction)
(Introduction)
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
== Introduction ==
+
= Introduction =
 
+
A feasibility study has been done in 2016 to evaluate the option of using Jenkins instead of ETICS as integration tool.  
In the first period of the project a parallel activity started to analyze how to model gCube with an alternative Software Integration Tool: Jenkins.
+
 
<br>
 
<br>
 
Jenkins is the main tools adopted in the Java’s world for the Continuous Integration and Continuous Delivery. It’s supported from wide community Open-source and it’s possible to integrate with the other technology , for example Docker.  
 
Jenkins is the main tools adopted in the Java’s world for the Continuous Integration and Continuous Delivery. It’s supported from wide community Open-source and it’s possible to integrate with the other technology , for example Docker.  
Line 8: Line 7:
 
Developers can integrate their work by applying continuous merge for the changes made to the project. Jenkins allows an automatic build every time the developers commit their jobs and in real time to understand if the developers’ commit corrupt the software product.
 
Developers can integrate their work by applying continuous merge for the changes made to the project. Jenkins allows an automatic build every time the developers commit their jobs and in real time to understand if the developers’ commit corrupt the software product.
 
<br>
 
<br>
The comparison using the same:
+
The same hardware and software requirements has been used to compare ETICS with Jenkins:
  
* same virtual machine
+
* virtual machine hosted by ENG (bluebridge)
* same operating system Centos ,  
+
* operating system CentOS ,  
* same Servlet Container : Tomcat.  
+
* Servlet Container : Tomcat.  
* same project: a Jenkins instance has been configured at ENG infrastructure and configured to build some gCube components as preliminary tests to switch to the new integration system.
+
* the same project: a Jenkins instance has been configured at ENG infrastructure and configured to build some gCube components as preliminary tests to switch to the new integration system.
 
<br>
 
<br>
 
The version used for Jenkins is 1.6.09, the ETICS version used is 1.8.2-0.
 
The version used for Jenkins is 1.6.09, the ETICS version used is 1.8.2-0.
 
<br>
 
<br>
The main feature analyzed regarding the management :  
+
The main feature analysed regarding the management :  
  
 
* Configuration Project (How to model gCube in Jenkins, if possible),
 
* Configuration Project (How to model gCube in Jenkins, if possible),
Line 25: Line 24:
 
<br>
 
<br>
 
'''Configuration Project'''
 
'''Configuration Project'''
 +
 
In Jenkins, the terminology project or job is interchangeable: a software project is called project or job.
 
In Jenkins, the terminology project or job is interchangeable: a software project is called project or job.
  
Line 37: Line 37:
 
* one component is the smallest part for a project.
 
* one component is the smallest part for a project.
 
<br>
 
<br>
The Jenkins project start with the creation of a new project (or job) as reported on the official jenkins documentation ([
+
The Jenkins project start with the creation of a new project (or job) as reported on the official Jenkins documentation [
https://jenkins.io/doc/]). No distinction from HEAD and Release project. The ETICS project start with the creation of a new project creating before the HEAD and then the release project.
+
https://jenkins.io/doc/]. No distinction from HEAD and Release project. The ETICS project start with the creation of a new project creating before the HEAD and then the release project.
  
It’s very simple configure Jenkins through the use of the same web-interface (as administrator):
+
It’s very simple configure Jenkins through the use of the same web-interface; after that, Jenkins is ready to use and integrate with every SCM (VCS, GIT, …) or existence build tools. It’s possible to create a new project in few minutes.
 +
It has been created two directory : one for the release and one for the Head.
 +
[[File:Configuration.png| 600px |center]]
 +
<p align=center>
 +
Figure - Jenkins Configuration
 +
</p>
 +
Every configuration includes the list of subdirectories for every subsystems of the release.The structure of the Head and Release configuration is provided in the following figures:
 +
[[File:GCubeReleases.png| 600px |center]]
 +
<p align=center>
 +
Figure - Jenkins Releases Structure
 +
</p>
 +
[[File:GCubeHead.png| 600px |center]]
 +
<p align=center>
 +
Figure - Jenkins Head Structure
 +
</p>
 +
A subsystem can be include one or more job as showed in the following figure:
 +
[[File:ReleaseComponent.png| 600px |center]]
 +
<p align=center>
 +
Figure - Jenkins Release Component
 +
</p>
 +
The following figure provides how the dependency for a job are represented:
 +
[[File:Dependency.png|600px|center]]
 +
<p align=center>
 +
Figure - Jenkins Dependency
 +
</p>
 +
'''Role and Permission'''
  
[[File:ConfiguraJeknis.jpg]]
 
 
Figure - Jenkins’ configuration.
 
 
Now , Jenkins is ready to use and integrate with every SCM (VCS, GIT, …) or existence build tools. It’s possible to create a new project in five minutes.
 
'''Role and Permission'''
 
 
To manage Role and Permission , in Jenkins, it’s necessary to install Role Plugin (ref. https://wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin).
 
To manage Role and Permission , in Jenkins, it’s necessary to install Role Plugin (ref. https://wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin).
 
<br>
 
<br>
Line 56: Line 75:
 
* Release Manager and  
 
* Release Manager and  
 
* Subsystem Manager.
 
* Subsystem Manager.
 
+
[[File:Jenkins_one.png|center]]
 
+
<p align=center>
[[File:Rolemanagement.jpg]]
+
 
+
 
Figure - Jenkins' Role Management
 
Figure - Jenkins' Role Management
 
+
</p>
 
For every role specific permission are assigned:  
 
For every role specific permission are assigned:  
 
* Developer can modify/create only own job configuration(only components developed in a specific subsystems),  
 
* Developer can modify/create only own job configuration(only components developed in a specific subsystems),  
Line 68: Line 85:
 
* Functional Tester can assign job to the testers but he/she can only read the job configuration.
 
* Functional Tester can assign job to the testers but he/she can only read the job configuration.
 
* Deployment Tester can only read the job configuration to test.
 
* Deployment Tester can only read the job configuration to test.
 
+
<br>
 
After, it's possible to add the specific users to whom it want to provide authorization:
 
After, it's possible to add the specific users to whom it want to provide authorization:
 
+
<br>
[[File:Authorizationmanagement.jpg ]]
+
[[File:Authorizationmanagement.jpg|center‎]]
 
+
<p align=center>
 
Figure - Jenkins' Authorization Management
 
Figure - Jenkins' Authorization Management
 
+
</p>
 
'''MultiBranch versioning'''
 
'''MultiBranch versioning'''
 
<br>
 
<br>
Line 93: Line 110:
 
* to insert the type of file to archive (jar, war, and so on).
 
* to insert the type of file to archive (jar, war, and so on).
  
The following table provides a summary about the main topics for the Jenkins:
+
The following table provides a summary about the main topics (analysed) for Jenkins:
<center>
+
  
{|  border="1" cellspacing="0" cellpadding="0" class="Table1" 
+
 
 +
{|  border="1" cellspacing="0" cellpadding="0"  
 
|  style="text-align:center;width:6.736cm; background-color:#0000FF"  |<span style="color:white;"> '''Feature'''</span>
 
|  style="text-align:center;width:6.736cm; background-color:#0000FF"  |<span style="color:white;"> '''Feature'''</span>
 
|  style="text-align:center;width:9.172cm; background-color:#0000FF" | <span style="color:white;">'''Jenkins'''</span>
 
|  style="text-align:center;width:9.172cm; background-color:#0000FF" | <span style="color:white;">'''Jenkins'''</span>
 
|-   
 
|-   
|  style="text-align:left;width:6.736cm; "  | Software project (job).
+
|  style="text-align:left;width:6.736cm; "  | '''Software project (job)'''
 
|  style="text-align:left;width:9.172cm; "  | The words job and project are interchangeable.
 
|  style="text-align:left;width:9.172cm; "  | The words job and project are interchangeable.
 
|-  class="Table12"
 
|-  class="Table12"
|  style="text-align:left;width:6.736cm; "  | OpenSource
+
|  style="text-align:left;width:6.736cm; "  | '''OpenSource'''
 
|  style="text-align:left;width:9.172cm; "  | It’s an open source software with MIT license.
 
|  style="text-align:left;width:9.172cm; "  | It’s an open source software with MIT license.
 
|-   
 
|-   
|  style="text-align:left;width:6.736cm; "  | Plugin
+
|  style="text-align:left;width:6.736cm; "  | '''Plugin'''
 
|  style="text-align:left;width:9.172cm; "  | Widely choice of plugin. The risk is to install plugin unuseful.
 
|  style="text-align:left;width:9.172cm; "  | Widely choice of plugin. The risk is to install plugin unuseful.
 
|-  class="Table12"
 
|-  class="Table12"
|  style="text-align:left;width:6.736cm; "  | Support.
+
|  style="text-align:left;width:6.736cm; "  | '''Support'''
 
|  style="text-align:left;width:9.172cm; "  | Widely community and documentation.
 
|  style="text-align:left;width:9.172cm; "  | Widely community and documentation.
 
|-  class="Table16"
 
|-  class="Table16"
|  style="text-align:left;width:6.736cm; "  | Easy Usage.
+
|  style="text-align:left;width:6.736cm; "  | '''Easy Usage'''
 
|  style="text-align:left;width:9.172cm; "  | It’s very friendly to use the first time.
 
|  style="text-align:left;width:9.172cm; "  | It’s very friendly to use the first time.
 
|-   
 
|-   
|  style="text-align:left;width:6.736cm; "  | Notification.
+
|  style="text-align:left;width:6.736cm; "  | '''Notification'''
 
|  style="text-align:left;width:9.172cm; "  | Widely tools are supported: Email, Android, GoogleCalendar, Twitter...
 
|  style="text-align:left;width:9.172cm; "  | Widely tools are supported: Email, Android, GoogleCalendar, Twitter...
 
|-   
 
|-   
|  style="text-align:left;width:6.736cm; "  | Integration IDE.
+
|  style="text-align:left;width:6.736cm; "  | '''Integration IDE'''
 
|  style="text-align:left;width:9.172cm; "  | Eclipse, IntelliJIdea, NetBeans.
 
|  style="text-align:left;width:9.172cm; "  | Eclipse, IntelliJIdea, NetBeans.
 
|-   
 
|-   
|  style="text-align:left;width:6.736cm; "  | Installation.
+
|  style="text-align:left;width:6.736cm; "  | '''Installation'''
|  style="text-align:left;width:9.172cm; "  | Very simple to instal.Mandatory pre-requisites are : 1) the last version of java; 2) RAM&gt;=2GB; space disk : no minimum requirement; 3) it recommended to have a sufficient space disk for the archiving of the build; 4) Java container: the WAR file can be run in any container that supports Servlet &gt;= 2.4 / JSP &gt;= 2.0 (in our case Tomcat).
+
|  style="text-align:left;width:9.172cm; "  | Very simple to instal.Mandatory pre-requisites are : '''1)''' the last version of java; '''2)''' RAM&gt;=2GB; space disk : no minimum requirement; '''3)''' it recommended to have a sufficient space disk for the archiving of the build; '''4)''' Java container: the WAR file can be run in any container that supports Servlet &gt;= 2.4 / JSP &gt;= 2.0 (in our case Tomcat).
 
|-  
 
|-  
|  style="text-align:left;width:6.736cm; "  | Configuration.
+
|  style="text-align:left;width:6.736cm; "  | '''Configuration'''
 
|  style="text-align:left;width:9.172cm; "  | It’s possible having the first simple automatic build with the simple steps.  
 
|  style="text-align:left;width:9.172cm; "  | It’s possible having the first simple automatic build with the simple steps.  
 
|-   
 
|-   
|  style="text-align:left;width:6.736cm; "  | Customization.
+
|  style="text-align:left;width:6.736cm; "  | '''Customization'''
 
|  style="text-align:left;width:9.172cm; "  | The official site provide customization and feature bacis, plugin:https://jenkins-ci.org/.  
 
|  style="text-align:left;width:9.172cm; "  | The official site provide customization and feature bacis, plugin:https://jenkins-ci.org/.  
 
|-   
 
|-   
|  style="text-align:left;width:6.736cm; " | Operating System.
+
|  style="text-align:left;width:6.736cm; " | '''Operating System'''
 
|  style="text-align:left;width:9.172cm; " | It’s possibile to install Jenkins in Window, Linux , OS_X. The complete list is provided in the official site: https://jenkins-ci.org/.
 
|  style="text-align:left;width:9.172cm; " | It’s possibile to install Jenkins in Window, Linux , OS_X. The complete list is provided in the official site: https://jenkins-ci.org/.
|- class="Table11"
+
|-  
|  style="text-align:left;width:6.736cm; "  | Log Error.
+
|  style="text-align:left;width:6.736cm; "  | '''Log Error'''
 
|  style="text-align:left;width:9.172cm; "  | Not better supported.
 
|  style="text-align:left;width:9.172cm; "  | Not better supported.
 
|-  class="Table11"
 
|-  class="Table11"
|  style="text-align:left;width:6.736cm; "  | SCM.
+
|  style="text-align:left;width:6.736cm; "  | '''SCM'''
|  style="text-align:left;width:9.172cm; "  | Jenkins is ready to use and integrate with every SCM (VCS, GIT, …) or existence build tools.But mainly Jenkins support with many plugin Jenkins. But it works better with the GIT.
+
|  style="text-align:left;width:9.172cm; "  | Jenkins is ready to use and integrate with every SCM (VCS, GIT, …) or existence build tools.But mainly Jenkins support with many plugin Jenkins. But it works better with GIT.
 
|-   
 
|-   
|  style="text-align:left;width:6.736cm; "  | Distributed Release.
+
|  style="text-align:left;width:6.736cm; "  | '''Distributed Release'''
|  style="text-align:left;width:9.172cm; "  | Jenkins can distribute build/test to multiple terminal (servers,desktop, computers) with different OS:(ref. </span><span>https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins</span><span>).
+
|  style="text-align:left;width:9.172cm; "  | Jenkins can distribute build/test to multiple terminal (servers,desktop, computers) with different OS:(ref. https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins).
 
|-  
 
|-  
|  style="text-align:left;width:6.736cm; "  | Multi-Branch Release.
+
|  style="text-align:left;width:6.736cm; "  | '''Multi-Branch Release'''
 
|  style="text-align:left;width:9.172cm; "  | The version Jenkins used (1.6.09) doesn’t support the MultiBranch versioning . This will be supported in the Jenkins 2.0.
 
|  style="text-align:left;width:9.172cm; "  | The version Jenkins used (1.6.09) doesn’t support the MultiBranch versioning . This will be supported in the Jenkins 2.0.
 
|-   
 
|-   
|  style="text-align:left;width:6.736cm; "  | Backup Management.
+
|  style="text-align:left;width:6.736cm; "  | '''Backup Management'''
|  style="text-align:left;width:9.172cm; "  | A tiny plug-in backup allows to store the main directories and files of Jenkins: job, xml files, scripts.
+
|  style="text-align:left;width:9.172cm; "  | A tiny plug-in backup (https://wiki.jenkins-ci.org/display/JENKINS/thinBackup) allows to store the main directories and files of Jenkins: job, xml files, scripts.
 
|}
 
|}
 
+
<br>
Table - Jenkins Feature</center>
+
We can conclude that, although Jenkins is the Software Integration Tools more used in the Java’s world community, this tools will be not used for the integration activities of the BlueBridge project for the following reason:
 
+
*It is not possible to keep track about the version of the jobs (version control).  
===Conclusion===
+
*Multi-branch version is not supported as well as  
Although Jenkins is the Software Integration Tools more used in the Java’s world community, some constraints in its use for the gCube:
+
*Use of the downstream/upstream jobs it’s very simple but the risk is to repeat the build more and more time (in particular for the job with no specific configuration because it recalls other parametrized trigger plug-in).
- For the version control is not possible to keep track about the version of the jobs.  
+
- Multi-branch version is not support as well as
+
- Use of the downstream/upstream jobs it’s very simple but the risk is to repeat the build more and more time (in particular for the job with no specific configuration but it recalls other parametrized trigger plug-in).
+
- Jenkins supports many tools and software (proprietary or not) through the use of the plug-ins, but the risk would be to install useless plug-ins and that will never be used.
+
Moreover, it becomes very complex and you need to spend much effort to figure out how to make the GCUBE structure so as occurs at the time ETICS simple and readable.
+

Latest revision as of 15:03, 15 December 2016

Introduction

A feasibility study has been done in 2016 to evaluate the option of using Jenkins instead of ETICS as integration tool.
Jenkins is the main tools adopted in the Java’s world for the Continuous Integration and Continuous Delivery. It’s supported from wide community Open-source and it’s possible to integrate with the other technology , for example Docker.
Developers can integrate their work by applying continuous merge for the changes made to the project. Jenkins allows an automatic build every time the developers commit their jobs and in real time to understand if the developers’ commit corrupt the software product.
The same hardware and software requirements has been used to compare ETICS with Jenkins:

  • virtual machine hosted by ENG (bluebridge)
  • operating system CentOS ,
  • Servlet Container : Tomcat.
  • the same project: a Jenkins instance has been configured at ENG infrastructure and configured to build some gCube components as preliminary tests to switch to the new integration system.


The version used for Jenkins is 1.6.09, the ETICS version used is 1.8.2-0.
The main feature analysed regarding the management :

  • Configuration Project (How to model gCube in Jenkins, if possible),
  • Role and Permission (Security Management),
  • MultiBranch versioning ,
  • Artefacts and Downstream/Upstream.


Configuration Project

In Jenkins, the terminology project or job is interchangeable: a software project is called project or job.

In ETICS, a software project is called project. The terminology job has the same meaning used in the Unix/Linux Operating System.

A Jenkins project is a container that includes other projects (jobs) : the project’s hierarchical structure is the same used of the Linux directories.

A ETICS project is a container that it can split in subsystems and/or components:

  • one project is defined from one or more subsystems and/or components,
  • one subsystem is the set of one or more subsystem and /or components,
  • one component is the smallest part for a project.


The Jenkins project start with the creation of a new project (or job) as reported on the official Jenkins documentation [ https://jenkins.io/doc/]. No distinction from HEAD and Release project. The ETICS project start with the creation of a new project creating before the HEAD and then the release project.

It’s very simple configure Jenkins through the use of the same web-interface; after that, Jenkins is ready to use and integrate with every SCM (VCS, GIT, …) or existence build tools. It’s possible to create a new project in few minutes. It has been created two directory : one for the release and one for the Head.

Configuration.png

Figure - Jenkins Configuration

Every configuration includes the list of subdirectories for every subsystems of the release.The structure of the Head and Release configuration is provided in the following figures:

GCubeReleases.png

Figure - Jenkins Releases Structure

GCubeHead.png

Figure - Jenkins Head Structure

A subsystem can be include one or more job as showed in the following figure:

ReleaseComponent.png

Figure - Jenkins Release Component

The following figure provides how the dependency for a job are represented:

Dependency.png

Figure - Jenkins Dependency

Role and Permission

To manage Role and Permission , in Jenkins, it’s necessary to install Role Plugin (ref. https://wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin).
Now, it’s possible to manage Role and Permission as ETICS and described in the “Software Integration and Distribution Roles” wiki page (ref. https://wiki.gcube-system.org/gcube/Software_Integration_and_Distribution:_Roles):

  • Development Tester,
  • Functional Tester,
  • Developer,
  • Release Manager and
  • Subsystem Manager.
Jenkins one.png

Figure - Jenkins' Role Management

For every role specific permission are assigned:

  • Developer can modify/create only own job configuration(only components developed in a specific subsystems),
  • Subsystem Manager can modify/create own job configuration (consist of own subsystems and components),
  • Release Manager is Administrator for that project (he/she can add role/permission to all project’s users)
  • Functional Tester can assign job to the testers but he/she can only read the job configuration.
  • Deployment Tester can only read the job configuration to test.


After, it's possible to add the specific users to whom it want to provide authorization:
center‎

Figure - Jenkins' Authorization Management

MultiBranch versioning
In Jenkins, the multi-branch versioning is not supported. It needed wait the version 2.0 to have the support to the multi-branch versioning.

Downstream and Upstream
Jenkins support the Downstream and Upstream job through the use of plug-ins “Trigger/call builds on other projects” [more details on the official jenkins documentation “ Parameterized Trigger Plugin “ https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin].
The use of this plug-in allows to get started other jobs with the same parameters for the existing configuration but at the same the risk is having the trigger job run more than one.
Artefacts
It’s necessary to install the Artefact Post-Build Plugin to manage the artefacts.
After this, It’s very simple to archive the artefacts as long as:

  • to create and select in the post-build action of the job configuration : “archive the artefacts”,
  • to insert the type of file to archive (jar, war, and so on).

The following table provides a summary about the main topics (analysed) for Jenkins:


Feature Jenkins
Software project (job) The words job and project are interchangeable.
OpenSource It’s an open source software with MIT license.
Plugin Widely choice of plugin. The risk is to install plugin unuseful.
Support Widely community and documentation.
Easy Usage It’s very friendly to use the first time.
Notification Widely tools are supported: Email, Android, GoogleCalendar, Twitter...
Integration IDE Eclipse, IntelliJIdea, NetBeans.
Installation Very simple to instal.Mandatory pre-requisites are : 1) the last version of java; 2) RAM>=2GB; space disk : no minimum requirement; 3) it recommended to have a sufficient space disk for the archiving of the build; 4) Java container: the WAR file can be run in any container that supports Servlet >= 2.4 / JSP >= 2.0 (in our case Tomcat).
Configuration It’s possible having the first simple automatic build with the simple steps.
Customization The official site provide customization and feature bacis, plugin:https://jenkins-ci.org/.
Operating System It’s possibile to install Jenkins in Window, Linux , OS_X. The complete list is provided in the official site: https://jenkins-ci.org/.
Log Error Not better supported.
SCM Jenkins is ready to use and integrate with every SCM (VCS, GIT, …) or existence build tools.But mainly Jenkins support with many plugin Jenkins. But it works better with GIT.
Distributed Release Jenkins can distribute build/test to multiple terminal (servers,desktop, computers) with different OS:(ref. https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins).
Multi-Branch Release The version Jenkins used (1.6.09) doesn’t support the MultiBranch versioning . This will be supported in the Jenkins 2.0.
Backup Management A tiny plug-in backup (https://wiki.jenkins-ci.org/display/JENKINS/thinBackup) allows to store the main directories and files of Jenkins: job, xml files, scripts.


We can conclude that, although Jenkins is the Software Integration Tools more used in the Java’s world community, this tools will be not used for the integration activities of the BlueBridge project for the following reason:

  • It is not possible to keep track about the version of the jobs (version control).
  • Multi-branch version is not supported as well as
  • Use of the downstream/upstream jobs it’s very simple but the risk is to repeat the build more and more time (in particular for the job with no specific configuration because it recalls other parametrized trigger plug-in).