|Entradas de Blog Apresentadas|
Continuous Integration of an OpenStack Dev/Test Environment
Manuel Silveyra 060001X4JV Visits (5012)
The software development process of many organizations is typically a series of sequential phases. The phases include requirements gathering, design, development, review, build, and various forms of testing (integration, acceptance, performance). One of the main problems with this development approach is that every phase is dependent on the successful completion of previous phases. Additionally, the configuration of separate development, build, and test phases are highly manual and prone to human error. This means that delays in early phases can negatively affect planned budgets and schedules.
Continuous Integration (CI) provides a way to automate the build and initial testing of software, thereby removing the need for separate build and test phases. CI fosters a more rapid and reliable development cycle by making it easier for developers to build and test incremental code changes more frequently, and it makes it possible to quickly identify and resolve any errors that may occur.
In this document we will describe the CI process which we used to develop and test components for Cloud Foundry on our OpenStack environment. Our CI process is managed by three main services: Git, Gerrit, and Jenkins.
Git – a distributed revision control and source code management system. Git makes it possible for developers to work with remote repositories locally and upload changes when ready.
Gerrit – a web-based software code review tool that integrates closely with Git and allows developers in a team to review each other's source code modifications and approve or reject those changes.
Jenkins – a web-based CI tool that integrates with Gerrit to automate the build and test of software that has been submitted to the Git repository. Builds can be started by various means, including being triggered by commits to Git or reviews on Gerrit.
CloudFoundry - is an open source cloud computing Platform as a service (PaaS) software.
Yeti - stands for "Yet Extraordinary Test Infrastructure" and is a collection of integration tests for the CloudFoundry platform.
A typical development scenario using our CI process involves the following seven steps:
1. The developer creates a software update to the local code repository and submits it to Gerrit.
2. Since Jenkins is configured to detect that an update has been submitted to Gerrit, it starts the CI process by performing an initial build and test of the submitted code.
3. If the initial build or tests fail, Gerrit is notified, otherwise Jenkins will deploy the Cloud Foundry code to OpenStack.
4. Jenkins runs a series of tests on the Cloud Foundry instance deployed to OpenStack using Yeti.
5. Jenkins updates Gerrit with the result of the Yeti tests performed on the deployed Cloud Foundry instance and cleans up any deployment artifacts on the OpenStack environment.
6. Upon successful completion, Gerrit notifies the development team of a software patch that is ready for review. Upon test failure, the developer is notified of the errors.
7. The development team reviews the code. If the code is accepted, Gerrit saves the changes to Git, and if the code is rejected, the developer is notified.
In the remaining series of posts we will detail how we setup our CI environment. The first article will describe how we installed and configured the server components. In the second article we will show how to setup a typical CI job in Jenkins, and in the final article we will describe how a user can setup their development system for use with the CI environment.