whitepaper Continuous integration with JBoss...
Transcript of whitepaper Continuous integration with JBoss...
www.redhat.com
whitepaper
Continuous integration with JBoss trading, a referenCe enterprise appliCation
JBoss® Trading application is a reference enterprise application that includes both integra-tion and performance tests for JBoss Enterprise Application Platform 6 from Red Hat®. This paper highlights the components of an automated build, test, and report system — a continu-ous, integrated environment.
What is a continuous integration environment?
A continuous integration environment is comprised of a set of components responsible for the assembly and distribution of software artifacts. Working together, these components streamline the process of building, testing, and reporting to alleviate the burden of managing a complex software project.
There are three primary components to a continuous integration environment: a build tool, an artifact repository, and a continuous integration tool.
Source code is committed to a version control system such as Subversion. The continuous integration tool, which is configured to poll the source control repository and pull the latest revisions, is triggered. The continuous integration tool then uses a build tool to produce soft-ware artifacts. During the build process, some artifacts may be required that are not avail-able locally; those artifacts will be retrieved from the artifact repository. In some cases, the local repository will need to contact a remote repository to retrieve the required artifacts. After these artifacts are retrieved, the build process can continue. The build process may contain multiple steps, including testing code and generating reports. Once the build process completes successfully, the generated artifacts are transferred and stored in the artifact repository.
More information on the JBoss
Trading application, includ-
ing configuration to support a
continuous integration envi-
ronment, can be found on the
How to JBoss blog.
http://howtojboss.com/
jboss-trading/
whitepaper COnTInuOuS InTEgRATIOn WITH JBOSS TRADIng, A REfEREnCE EnTERPRISE APPlICATIOn
2www.redhat.com
Build and test process
1. Developer modifies the source code and configuration files and pushes them to the source control repository.
2. The continuous integration server pulls source code and configuration files from the source control repository.
3. The continuous integration server runs the build manager.
4. The build manager builds the application from the source and configuration files.
5. The build manager deploys the application to an application server for integration testing.
6. The build manager generates reporting data.
7. The continuous integration server parses the reporting data.
8. The continuous integration server pushes the application to a repository manager.
Developer
Version control system
Source
Source
Continuous integration server
Repository manager
Report data
Build manager Application
Application server
COnTInuOuS InTEgRATIOn WITH JBOSS TRADIng, A REfEREnCE EnTERPRISE APPlICATIOn
whitepaper
3www.redhat.com
version control system
The JBoss Trading application is hosted on gitHub.
A version control system such as git allows multiple developers to collaborate on proj-ects simultaneously.
https://github.com
http://git-scm.com
Developer
GitHub (Git)
Source
Source
Continuous integration server
Repository manager
Report data
Build manager Application
Application server
whitepaper COnTInuOuS InTEgRATIOn WITH JBOSS TRADIng, A REfEREnCE EnTERPRISE APPlICATIOn
4www.redhat.com
continuous integration server
Jenkins is a continuous integration tool used to manage the building and deploy-ment of project artifacts.
Continuous integration is important to a project because it builds and tests the proj-ect whenever modifications are made. This is essential, because as multiple develop-ers work on a project, the codebase can become stale and the likelihood of issues increases with every check-in.
If the project is built only once at the end of the day, it makes it difficult to trace back the origin of any issues, because a large number of check-ins can occur during the course of the day. However, in a continu-ous integration environment the project is built on a constant basis, and developers and project managers can be alerted the moment issues arise.
This not only saves time, but also prevents headaches for everyone involved. In addition to performing builds, Jenkins can also run external scripts, distribute builds among multiple instances, and provide an extensive collection of third-party plug-ins to extend functionality.
www.jenkins-ci.org
Developer
Version control system
Source
Source
Jenkins
Repository manager
Report data
Build manager Application
Application server
COnTInuOuS InTEgRATIOn WITH JBOSS TRADIng, A REfEREnCE EnTERPRISE APPlICATIOn
whitepaper
5www.redhat.com
Build manager
A number of packages are available to build Java projects, such as Apache Ant, Apache Ivy, gradle, and Apache Maven. In addition to being a simple build tool, Maven is a project management tool. Some of its prominent features are ease of setup, multiple project support, and dependency management. Maven’s depen-dency management support is one of the prime reasons that it is selected for this environment.
http://maven.apache.org
Developer
Version control system
Source
Source
Continuous integration server
Repository manager
Report data
Maven Application
Application server
whitepaper COnTInuOuS InTEgRATIOn WITH JBOSS TRADIng, A REfEREnCE EnTERPRISE APPlICATIOn
6www.redhat.com
repository manager
Software packages utilized and gener-ated by Maven during the build process are known as artifacts. Projects depen-dent on an external artifact must retrieve them from a repository. A standalone user will typically configure Maven to refer to a single repository, like the Maven Central Repository, to obtain the artifacts they need.
However, in a multi-user, enterprise-wide project, this is impractical. What happens if artifacts need to be obtained from multiple repositories?
This is one of the issues that can be solved by installing and configuring a local Maven repository like Sonatype nexus. There are a number of advantages to hosting a local repository. first, by proxying multiple repositories, nexus can provide artifacts from multiple repositories when they are required. nexus also conserves network
bandwidth because once external artifacts are retrieved, nexus will cache it in its own reposi-tory. Subsequent requests utilize the cached artifact instead of connecting to the external repository.
www.sonatype.org/nexus
Developer
Version control system
Source
Source
Continuous integration server
Nexus
Report data
Build manager Application
Application server
Copyright © 2012 Red Hat, Inc. Red Hat, Red Hat Enterprise linux, the Shadowman logo, JBoss, MetaMatrix, and RHCE are trademarks of Red Hat, Inc., registered in the u.S. and other countries. linux® is the registered trademark of linus Torvalds in the u.S. and other countries.
www.redhat.com #9437357_0612
SaLeS aND iNQUirieS LatiN aMeriCa
+54 11 4329 7300
www.latam.redhat.com
NOrth aMeriCa
1–888–REDHAT1
www.redhat.com
eUrOpe, MiDDLe eaSt
aND aFriCa
00800 7334 2835
www.europe.redhat.com
aSia paCiFiC
+65 6490 4200
www.apac.redhat.com
Red Hat was founded in 1993 and is headquartered in Raleigh, nC. Today, with more than 70 offices around the world, Red Hat is the largest publicly traded technology company fully committed to open source. That commitment has paid off over time, for us and our custom-ers, proving the value of open source software and establishing a viable business model built around the open source way.
aBOUt reD hat