CSC/ECE 517 Fall 2014/ch1a 16 va: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 109: Line 109:


=== Go ===
=== Go ===
[[File:Go.png|right|frame|A Go Pipeline <ref>[http://marcovaltas.com/img/posts/blog_pipeline.png A Go Pipeline]</ref>]]
[[File:Go.png|right|frame|A Go Pipeline <ref>[http://marcovaltas.com/img/posts/blog_pipeline.png A Go Pipeline]</ref>.The figure shows visual feedback provided to the user with the help of colors Red (Indicating Build Failure) and Green (Indicating Build Success).]]
Go is an open source tool, built by ThoughtWorks Studios, that is used to support continuous delivery. It helps create and manage automated deployment pipelines. It supports automating the entire build-test-release process from check-in to deployment.<ref>[http://martinfowler.com/articles/go-interview.html Open-Sourcing ThoughtWorks Go] by Martin Fowler | 25 March, 2014</ref><br>
Go is an open source tool, built by ThoughtWorks Studios, that is used to support continuous delivery. It helps create and manage automated deployment pipelines. It supports automating the entire build-test-release process from check-in to deployment.<ref>[http://martinfowler.com/articles/go-interview.html Open-Sourcing ThoughtWorks Go] by Martin Fowler | 25 March, 2014</ref><br>
<br>
<br>
Line 127: Line 127:
<br>
<br>
<br>
<br>
=== Hudson ===  
=== Hudson ===  
[[File:Hudson.png|right|frame|Hudson's Build Status Screen <ref>[https://jazz.net/library/content/articles/rtc/2.0/build-hudson/ Using the Hudson build integration system with Rational Team Concert] by Jim D'Anjou, Jazz Jumpstart Team, IBM | October 21, 2009</ref>]]
[[File:Hudson.png|right|frame|Hudson's Build Status Screen <ref>[https://jazz.net/library/content/articles/rtc/2.0/build-hudson/ Using the Hudson build integration system with Rational Team Concert] by Jim D'Anjou, Jazz Jumpstart Team, IBM | October 21, 2009</ref>]]

Revision as of 16:18, 25 September 2014

Continuous Integration Pipelines


Introduction

Continuous Integration Pipeline is a software development technique, which focuses on automating major portions of the build, test and deployment tasks. In CI pipelining, any change made by the developer to their projects’ shared source code repository automatically triggers a build. Later on, when the build and automated unit-tests are successful, the application is automatically deployed to a production-like environment where more rigorous testing can be done. <ref>Continuous Integration and Continuous Delivery (Building Real-World Cloud Apps with Azure) by By Tom Dykstra, Rick Anderson and Mike Wasson | June 12, 2014</ref>.This technique allows the contributors of the project to build, test and deploy their code, easily and quickly, that too with greatly reduced risk. Thus, the CI pipelining ultimately ensures the rapid delivery of a quality software product.

Drawbacks of the Traditional Software Development Practices

Consider the following workflow that demonstrates the development to deployment phase in a traditional software development lifecycle:

1. Initially, the developers will code their individual modules.
2. Once the development is completed, the various modules are integrated together.
3. Once the merge is completed, the entire product is deployed in the testing environment.
4. Once the testing is completed, the product becomes release ready and is later on deployed in the production environment.

Generally, the above workflow is very risky to follow, since many severe issues may arise in above mentioned steps. These are stated below:

  • Longer Integration Times: The code written by different developers might not integrate successfully with each other, resulting in build failures. Since, many code modules are integrated in one go, it is very difficult and time consuming to detect and resolve the cause of the build failure.
  • Longer Testing Times: Once the complete product is ready, it may take a lot of time to perform the complete end-to-end testing of the software. Also, if a bug arises in the code, it may be difficult to resolve it, since many code modules might be involved in the flow in which the bug has occurred, further delaying the time required for testing the software.
  • Longer Deployment Times: Since the complete product is released in one go, it might take a longer time to get the system up-and-running in the production environment.

Working of a Continuous Integration Pipeline

CI pipelining significantly reduces the risks posed by taking the traditional approach during the development to deployment phase of a software. It also reduces the time involved in resolving these issues.

The typical workflow of the development to deployment phase in a CI pipeline is as follows: <ref name="Martin">An Article on Continuous Integration by Martin Fowler | 1 May, 2006</ref><ref name="ThoughtWorks">ThoughtWorks-Continuous Integration</ref>

Source - Wikipedia<ref>Continuous Delivery (Wikipedia)</ref>


1. Developers (Part of the Delivery team) will take the current code base from a shared code repository (which is maintained for their project in a version control system) on which they will write their own code.
2. When the changes are done, the developers integrate their code with the shared code repository. This should happen frequently (at least once a day).
3. An automated build is run, every time a developer integrates his changes. Unit tests and Integration tests are also performed in this phase. If either of the build or the tests fail, the development team is notified to fix the errors. The development team is also notified on a successful build.
4. Once the build and the above tests succeed, the software is automatically deployed to a testing environment where more rigorous testing can be done.
5. If the in-depth testing succeeds, the software product with the new functionality becomes release-ready. If the testing fails, the development team is notified to fix the errors. The development team is also notified if the tests are successful.
6. As soon as the customer requires the new functionality in the software, the release-ready build is deployed into the production environment.

Advantages of Continuous Integration Pipelines

By implementing CI pipelining in software project the following advantages are achieved:<ref name="Martin"></ref><ref name="ThoughtWorks"></ref><ref>Multi-Stage Continuous Integration</ref>

  • If any bugs are present in the code, they are detected early. Hence, the effort needed in removing the bug reduces significantly, since a comparatively smaller part of the system is affected and the concerned developers have recently worked on the code, so it is fresh in their minds.
  • Integration, testing and deployment of comparatively smaller code is easier, less time-consuming and less risky.
  • CI pipelining ensures that a “stable and working” build of the software is available at all times.
  • CI pipelining ultimately helps the company to quickly release bugs fixes and enhancements to the customers of their software product.
  • CI pipelining makes continuous deployment of the software to the production environment easier. Since, continuous deployment helps customers get bug fixes and enhancements to the software frequently, developers get continuous feedback on the bug fixes and enhancements that they have made to the software. Thus, customers and developers get an opportunity to interact frequently, which is one of the most important factors in developing a good software.

Continuous Integration Tools

Some of the most commonly used continuous integration tools are as follows:


CruiseControl

Build Status Page in CruiseControl <ref name="cc"></ref>. The figure shows visual feedback provided to the user with the help of colors Red (Indicating Build Failure) and Green (Indicating Build Success)

CruiseControl is a free, open-source, continuous integration tool. CruiseControl is written in Java but is used on a wide variety of projects. Its web-interface provides the users with the details and the current status of each build. Its configuration is written in XML.<ref name="cc">CruiseControl Tool</ref><ref name="compare">The Best Continuous Integration Tools by Vlad Kofman | 18 February, 2009</ref>

Advantages:<ref name="cc"></ref>

  • CruiseControl contains many plug-ins for publishing notifications regarding the status of the build via e-mail and instant messaging.
  • Build results in CruiseControl, are color-coded so that the users are provided with instant visual feedback about the status of their build.

Disadvantages:<ref name="compare"></ref>

  • CC does not have a configuration User Interface. It requires editing the XML files directly to change configurations.
  • The User Interface of CC is very primitive.
  • The learning curve for CC is high.


Apache Continuum

5 June, 2014</ref>.The figure shows visual feedback provided to the user with the help of color Green (Indicating Build Success)

Apache Continuum is an enterprise-ready continuous integration server. It has a web-based user-interface that helps in monitoring the current status of a build. Continuum comes as a standalone application and also as a war file. <ref name="cont">Apache Continuum Tool/</ref><ref>What is Continuum and how do i install it? by Deron Eriksson</ref>

Advantages: <ref name="compare"></ref><ref name="ibm">Choosing a Continuous Integration Server by Paul Duvall | 5 September, 2006</ref>

  • Continuum offers Role-based security. This feature gives the administrator control over what aspects of the build can be seen by different users.
  • Setup and Configuration of Continuum is fairly straight forward.
  • The learning curve for Continuum is low.

Disadvantages: <ref>CI Tool Comparison April 2, 2010 </ref>

  • Continuum does not have a very wide variety of plug-ins and extensions.



Travis CI

10 September, 2013</ref>. The line highlighted in Red is a part of the real-time log that indicates Build Failure.

Travis is an open-source, continuous integration service which is used for GitHub Projects. Travis supports development in many languages such as C, C++, Java, Ruby etc. Several open source projects including Ruby-on-Rails are using Travis. Travis is configured by adding a .travis.yml file to the root directory of a GitHub repository.<ref>Travis CI (Wikipedia)</ref>

Advantages:<ref>CI with Travis by Kamran Ayub</ref>

  • Travis CI provides real time logging. You can watch the output of the builds continuously.
  • Travis CI’s user-interface is fairly easy to use.

Disadvantages:<ref>A Blog on Travis-CI by Kai Inkinen | 7 October, 2013</ref>

  • Travis CI is free only for open source projects. For all non-public projects, a user needs to use Travis Pro for a subscription fee.



Go

A Go Pipeline <ref>A Go Pipeline</ref>.The figure shows visual feedback provided to the user with the help of colors Red (Indicating Build Failure) and Green (Indicating Build Success).

Go is an open source tool, built by ThoughtWorks Studios, that is used to support continuous delivery. It helps create and manage automated deployment pipelines. It supports automating the entire build-test-release process from check-in to deployment.<ref>Open-Sourcing ThoughtWorks Go by Martin Fowler | 25 March, 2014</ref>

Advantages: <ref>Continuous Delivery with Go by Robert Valk | 30 June 2014</ref>

  • The installation of Go is very quick and easy.
  • The administrative User-Interface of Go is very refined.

Disadvantages: <ref>Discussion on Go</ref>

  • The learning curve for Go is higher.
  • The custom e-mail notifications in Go are not configurable enough.





Hudson

October 21, 2009</ref>

Hudson is a free continuous integration tool written in Java. It supports various SCM tools including CVS, Subversion, Git, Perforce, Clearcase and RTC, and can execute Apache Ant and Apache Maven based projects, as well as arbitrary shell scripts and Windows batch commands. Hudson became a popular alternative to CruiseControl and other open-source build servers in 2008.<ref>Hudson (Wikipedia)</ref>
Advantages:<ref name="compare"></ref>

  • Hudson has a very short learning curve.
  • The User-Interface of Hudson is very refined.
  • The entire configuration can be done via its User-Interface.
  • It can be adapted to be used with many development languages.

Disadvantages:<ref>Pros/Cons of CI Systems - A StackOverflow Discussion</ref>

  • There is no way in Hudson to mass manage the build results.
  • The web User-Interface of Hudson sometimes gets slower.
  • Some of Hudson’s plug-ins eat a lot of memory.





See Also

  1. Comparison of Various Continuous Integration Software
  2. Extreme Programming

References

<references/>

Further Reading

  1. An article on Continuous Integration By Mike Jackson
  2. A video on Continuous Integraion by PHP UK Conference | 2013
  3. An article on Robust continuous integration environment By Shanky Town
  4. CI- Pipeline case study By IndicThreads
  5. The Original Article on continuous integration By Martin Fowler