This article is part of a series to demonstrate what a continuous delivery pipeline in the cloud can look like. My colleagues Alexandra Klimova, Ronald Hötschl and I have worked on this demo and want to give you a brief overview of continuous delivery, its advantages and how it can be put to action. You will not need any hardware to setup your own delivery pipeline – “It’s all in the Cloud”. Everything you get to see is running on Amazon EC2 WebServices and open source tools. All you need is time for the articles and a credit card & phonenumber to get yourself registered for the Amazon Cloud Services. If you do not want to use Amazon WebServices you can also use your own servers or other virtualization software like VMWare.
Here is a list of upcoming articles in this series on continuous delivery.
- Part 1: Continuous Delivery Overview
- Part 2: Getting started with Amazon EC2
- Part 3: Configure your Continuous Integration Server
- Part 4: Provisioning your Test, Staging and Production environments
- Part 5: Configure your Continuous Delivery Pipeline
- Part 6: Create a Dashboard of your Systems
Continuous Delivery is about automation of the software development process. It combines three core disciplines continuous integration, continuous testing and continuous deployment.
Continuous integration has become part of the software development process in most companies. Apart from building software artefacts it also contains version control and dependency management. Continuous testing has become more and more popular as a result of better integration in CI servers like Jenkins, CruiseControl and Bamboo. Continuous deployment on the other hand has become a bottleneck for releasing software since development and operation teams are historically separated within most organizations. As part of the DevOps movement, it has become crucial for software developers to evolve towards a full stack developer and to understand the needs and problems of operation teams, and vice versa.
What are the key benefits of continuous delivery?
- low-risk releases
- faster return on investment in software projects
- improvement of competitiveness and responsiveness
- quality improvement of new software versions
What are the main steps of continuous delivery?
These are the main steps that will be covered in the following articles:
- Build – compile, unit test, version, package
- Quality – metrics, documentation
- Test – acceptance-, regression- and performancetests
- Provision environments – deployment to test- and staging environment
- Production – green/blue deployment to production
Use Case: “You have a bookstore and want to manage your books online. Customers should find books that are available for rent and new books can be added as well.”
You need a web application for your business logic and presentation layer and a database to store the data of the bookstore. It does not matter if you start from scratch with a “green field project” or add new features to an existing application. In any case as a developer you always have the same expectations from your business:
- new features should be released as soon as possible without compromising code quality, test coverage and stability
- source code needs to be tested
- features need to be acceptance tested so that new features do not break existing features
- application needs to be performance tested so that new features do not slow down the application
- source code artefacts and database changes should be versioned so that you can go back to any version of your application at any time (rollback szenario)
- new releases should be deployed to user acceptance environments
Application & Technologies
The demo uses the following technologies. All technologies and frameworks are open source and widely used:
- Web Application (Java [JDK], Spring [SPR], Hibernate [HIB], MySQL [MYSQL], Maven [MVN])
- Unit Tests (jUnit) [JUN]
- Acceptance Tests (jBehave) [JBE]
- Performance Tests (jMeter) [JME]
- Environment provisioning (puppet) [PUP]
- Jenkins CI Server [JEN]
- Artifactory [ART]
- Sonar [SON]
The complete environment is hosted in the cloud using Amazon EC2 WebServices. We are trying to expose advantages and disadvantages of the tools that we use. The environments represent real world production environments. We are using 6 AWS instances throughout the continuous delivery pipeline. The diagram below explains the main dependencies between the environments.
- CI Server Master (CentOS 64bit) – triggers jobs on the CI Server slave and provisions all environments
- CI Server Slave (Ubuntu 32bit) – for acceptance and performance tests
- Acceptance/UAT/Production Green/Production Blue environments (CentOS 64bit)
Here is a screenshot of the final continuous delivery pipeline.
Are you curious? Stay tuned for part II …
[JH] Book: Continuous Delivery by Jez Humble and David Farley
[CD] Continuous Delivery: www.continuousdelivery.com
[PSD] Professional Scrum Developer course
[JEN] Jenkins CI Server jenkins-ci.org
[JDK] Java JDKwww.oracle.com
[SPR] Springsource www.springsource.org
[HIB] Hibernate ORM www.hibernate.org
[MYSQL] MySQL Database www.mysql.de
[MVN] Apache Maven maven.apache.org
[JUN] jUnit www.junit.org
[JBE] jBehave Acceptance Testing jbehave.org
[JME] Apache jMeter jmeter.apache.org
[PUP] Puppet Provisioning www.puppetlabs.com
[SON] Sonar Source Code Quality Management www.sonarsource.org
[ART] JFrog Artifactory www.jfrog.com