Continuous integration, delivery and deployment Primož Gabrijelčič thedelphigeek.com Primož Gabrijelčič thedelphigeek.com.

Slides:



Advertisements
Similar presentations
Continuous Integration in a Java Environment. Developers / Time.
Advertisements

Continuous Integration (CI) By Jim Rush Version Control Build Test Report.
1. What is Subversion? Why do we need CM? Basic concepts Repositories Options Setup Clients Options Setup Operation Troubleshooting Slide 2.
Version Control 1.  Version control (or revision control) is the term for the management of source files, and all of the intermediate stages as development.
Validata Release Coordinator Accelerated application delivery through automated end-to-end release management.
How to Optimize Your Existing Regression Testing Arthur Hicken May 2012.
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Damien Guard (BSc, MBCS) Guernsey Software Developer Forum Change management with Subversion.
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
Improving Software Quality with Continuous Integration
Continuous Integration for Databases Learn how to automate your build and test Steve Jones Red Gate Software Part II of the Continuous Delivery for Databases.
Patterns & practices Symposium 2013 Introducing Git version control into your team Mark
Introduction to Continuous Integration Mike Roberts.
 Definitions  Background/History  Continuous Delivery › How to practice Continuous Delivery  Continuous Integration  Continuous Integration Tools.
#RefreshCache CI - Daily Builds w/Jenkins – an Open Source Continuous Integration Server Nick Airdo Community Developer Advocate Central Christian Church.
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
CONTINUOUS INTEGRATION, DELIVERY & DEPLOYMENT ONE CLICK DELIVERY.
THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.
Continuous Delivery Ajey Gore Head of Technology ThoughtWorks India.
Craig Berntson Chief Software Gardener Mojo Software Worx Branches and Merges are Bears, Oh My!
© 2012 IBM Corporation Rational Insight | Back to Basis Series SCM introduction Chu Shu June 2012.
Craig Berntson
Creating a Maintainable Software Ecosystem Jeremy D. Miller November 27th, 2007.
Version Control with Subversion Quick Reference of Subversion.
1 Lecture 19 Configuration Management Software Engineering.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Version control Using Git Version control, using Git1.
1 SEG4912 University of Ottawa by Jason Kealey Software Engineering Capstone Project Tools and Technologies.
2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or.
…using Git/Tortoise Git
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Continuous Processes By Kelvin Zhu CSCI577B Spring 2013.
Copyright © 2015 – Curt Hill Version Control Systems Why use? What systems? What functions?
Computer Science and Engineering The Ohio State University  Widely used, especially in the opensource community, to track all changes to a project and.
South Florida Enterprise and Strategy Architects Special Interest Group (SF ESA SIG) June 19, 2007 Lawrence Port Otive LLC
Sofia Event Center May 2014 Branimir Giurov C# MVP Solution Architect BulPros Consulting Continuous Integration of Sharepoint 2013 Solutions with.
CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage
UHCS 2005, slide 1 About Continuous Integration. UHCS 2005, slide 2 Why do you write Unit Test ? Improve quality/robustness of your code Quick feedback.
Continuous Integration CruiseControl.Net. Best Practices Use version control; Automate the build; Build should be self tested; Developers must commit.
Build automation. Prerequisites for Continuous Integration (CI)  Version Control System  Build automation  Notification on build result sent to related.
(1) Introduction to Continuous Integration Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of.
(1) Introduction to Continuous Integration Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of.
Version Control and SVN ECE 297. Why Do We Need Version Control?
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
Build and Deployment Process Understand NCI’s DevOps and continuous integration requirements Understand NCI’s build and distribution requirements.
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
Cruise Training Introduction of Continuous Integration.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Process changes: Internal processes of CASA, external contributions, release schedule Mark G. Rawlings, CASA Build & Test Lead NRAO, Charlottesville Acknowledgements:
Continuous Integration for Databases Steve Jones SQLServerCentral Red Gate Software.
1 Punishment Through Continuous Delivery If it hurts, do it more often…
Benjamin Day Get Good at DevOps: Feature Flag Deployments with ASP.NET, WebAPI, & JavaScript.
Source Control Repositories for Enabling Team Working Doncho Minkov Telerik Corporation
DECTRIS Ltd Baden-Daettwil Switzerland Continuous Integration and Automatic Testing for the FLUKA release using Jenkins (and Docker)
PRODUCT - ORGANIZATION - AGILE - LEAN CD - Agile on Steroids - (and what Jenkins got to do with it) Paul Bakker linkedin.com/paulgbakker github.com/p-bakker.
Introduction Aaron Day ● Software Architect ● Open Solutions Interests and Hobbies ● Family ● Software Development ● Woodworking ● Gaming ● Shooting.
ALM Deployment Pipeline Implementation. Create a Repeatable, Reliable Process for Releasing Software. Automate Almost Everything Keep Everything in Version.
Automated Build and Test
Continuous Integration (CI)
Version Control with Subversion
Delphi or C++ Builder, with Subversion and Jenkins
Continuous Integration For Databases
X in [Integration, Delivery, Deployment]
Simplified Development Toolkit
Automated Testing and Integration with CI Tool
Continuous Integration
Continuous Integration Tool
CI/CD Workflow and Event Pages
Samir Behara, Senior Developer, EBSCO
Presentation transcript:

Continuous integration, delivery and deployment Primož Gabrijelčič thedelphigeek.com Primož Gabrijelčič thedelphigeek.com

Quick poll

Safe? Are you using version control?

Quick? Can you release new version of your software in one day?

Quick and safe? Can you release new, well-tested version of your software in one day?

Development now

Each developer has feature branches If the version control is used at all Features are deployed when completed Integration issues Small test suite

Problems Bringing software into production is hard Takes a lot of time Error prone

Solution – Continuous Integration

Continuous Integration? Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. - Martin Fowler

Change the workflow! Checkout/update Code Build & test locally Update (merge) –Retest if changed Commit Continuous Integration server takes over …

Change the versioning! No feature branches Temporary developer branches Good to test crazy ideas –Branch and throw away Trunk must always compile Avoid big scary merges

How to handle features No feature branches Features can be toggled on and off via deployment or compilation configuration –Also helps with Continuous Delivery/Deployment Keep features small Improve features interactively –Introduce early, then improve

Sidenote – Version control systems History –Log –Blame Revert to version –Bug-finding tool Branches –Tag/mark every release Always use VCS – even for single-person projects!

Log

Blame

Testing Automate everything –If it hurts, do it more often. Continuously. –Fail fast. Integration testing Unit testing Functional testing Application testing Mobile testing Whatever you dont test against, will happen

Requirements

Source code repository (version control) –SVN, Git, Mercurial, … Project build –MSBuild –… Testing Continuous Integration server

CI server in essence while true do begin if change_checked_into_vcs then begin if not build then report_error; if not test then report_error; end; sleep; end;

CI servers Jenkins –Hudson fork –Java –Commercial support - Cloudbees CruiseControl.Net –C# –XML configuration :( FinalBuilder, Automated Build

CruiseControl.Net svn://srv2.de.fab-online.com/fabttx/ c:\build\trunk\ c:\Program Files\TortoiseSVN\bin\svn.exe build builder%12 False True False 15 /fabttx/branches/** /fabttx/tags/** /fabttx/common/config/**/*

Project monitoring

CI recommendation Use a separate server (or VM) –For CI, or –For CI + build, or –For CI + build + test

Central dogma Build early, build often –On every checkin –Check in early, check in often

Benefits

Brings order into chaos Everything could be achieved without the Continuous Integration, but … CI is the great enforcer

Benefits Code is always in the consistent state Code always compiles Automatic tests Automatic feedback on production readiness

Code always compiles Everyone is responsible for the project You broke the build!

Code always compiles Code should always build and test. Continuous Delivery

Continuous Delivery? The essence of my philosophy to software delivery is to build software so that it is always in a state where it could be put into production. We call this Continuous Delivery because we are continuously running a deployment pipeline that tests if this software is in a state to be delivered. – Jez Humble, Thoughtworks

CI <> CD CD = CI + fully automated test suite Not every change is a release –Manual trigger –Trigger on a key file (version) –Tag releases! CD – It is all about testing!

Consider this How long would it take your organization to deploy a change that involves just one single line of code? - Mary and Tom Poppendieck, Implementing Lean Software Development

Cont. Delivery vs. Deployment build unit tests integration tests validation tests deploy to production build unit tests integration tests validation tests deploy to production Continuous Delivery Continuous Deployment MANUAL AUTO

Continuous Deployment

A word of warning Continuous delivery is doable. Continuous deployment is a hard problem.

Deployment schedule Release when a feature is complete Release every day

Deployment strategies Zero-downtime deployment (and rollback) Blue-green –Two environments –Install on one. Switch. Switch back on problems. Canary release –Deploy to subset of servers Real-time application state monitor!

Problems Technical –Databases Schema migration Revert! Change management software –Configuration Human –Even more important –Automatic deployment = great fear –Customers dont want software to constantly change

Transition

How to introduce Gain expertise –First step accomplished – you are here Automate the build Introduce tests Prove the concept –Introduce CI system –Run it in parallel to existing infrastructure –Give it time –Show the win-win

Notes from the field

What we found Continuous Integration is relatively easy –It is all about communication Continuous Delivery is harder (but we are getting there) –Some things are hard to test automatically –You need dedicated tests-writing people Continuous Deployment is not a requirement –Customers dont want it –Mission critical systems

Sidenote - VCS rules! Disks are large, store as much as possible in the VCS Continuous Integration server configuration should be stored in the VCS Should be able to restore complete build system from the VCS (after installing necessary software)

Implementation Run everything in VM Backup!

Continuous Integration/Delivery/Deployment It is all about the people!

Software Jenkins CruiseControl.NET Final Builder Automated Build Studio

Books Continuous Delivery Continuous Integration Implementing Lean Software Development Release It!

References subversion-delphi/ subversion-delphi/ your-delphi.htmlhttp://thundaxsoftware.blogspot.com/2011/07/continuous-integration-for- your-delphi.html Projects.aspxhttp://nickhodges.com/post/Getting-Hudson-set-up-to-compile-Delphi- Projects.aspx