THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

43
THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx

Transcript of THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Page 1: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

THE CONTINUOUS

DELIVERY ZONE

Craig BerntsonChief Software GardenerMojo Software Worx

Page 2: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Ego stuff

Conference speaker INETA Community Speaker ComponentOne

Speaker Bureau Author Microsoft C# MVP

Page 3: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Have you heard these?

It works on my machine When will you be done The database changed Stop shipping! We found a bug! Give me what you have so we can test Customer won’t accept – lots of bugs Code duplication

Page 4: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Waterfall

Customer Input

Business Analysis

Development

Manual Testing

Release

Page 5: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Software Gardening

Agile methodologies Continuous Delivery Developer skills

Refactoring Design Patterns Test-Driven Development SOLID OOD Software Craftsmanship Dependency Injection

Page 6: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Agile methodologies

Individuals and interactions

Working software

Customer collaboration

Responding to change

Page 7: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Continuous Delivery

Continuous

Integration

Automated

Acceptance Testing

Automated Capacity

Testing

Manual Testing

Automated

Deployment

Software Delivery Pipeline Fail Fast (Learn Early) Delivery Team =

Development + QA + Operations DevOps

Page 8: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Why Continuous Delivery

Reduce risk Increase quality Enable better project visibility Establish greater product confidence Reduce repetitive/manual processes

Page 9: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Continuous Integration

Also called Commit Stage

Page 10: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

CI Defined

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. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.

– Martin Fowlerhttp://www.martinfowler.com/articles/continuousIntegration.html

Page 11: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

CI Defined

CI is the embodiment of tactics that gives us, as software developers, the ability to make changes in our code, knowing that if we break software, we’ll receive immediate feedback...[It is] the centerpiece of software development, as it ensures the health of software through running a build with every change.

– Paul Duvall Continuous Integration

Page 12: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

CI Defined

An automated process that builds, tests, analyzes and deploys an application to help ensure it functions correctly, follows best practices, and is deployable. This process runs with each source code change and provides immediate feedback to the development team.

- Continuous Integration in .NET

Page 13: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Definitions tell us

Integrate frequently

Automated build & test

Centerpiece of development

Ensures health

Automated build, test, analyze, deploy

Functions correctly Follows best

practices Runs with each

code change Immediate

feedback

Page 14: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Manual process

Code

Build

Unit Test

Refactor

Check out Check in

Page 15: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

CI process

Integrate

Build

Unit Test

Report

Get latest Check in

Page 16: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Continuous Integration Process

Version ControlSystem

Developers

Feedback Mechanism

Build Script

CI Server

Stake Holders

Page 17: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Version Control System (VCS)

Check in often, several times per day Do not branch – Always work on trunk Everything goes into VCS Tools: TFS, Subversion, Git, Mercurial

Page 18: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Project Organization

Each developer: Uses the same folder structure Uses the same tools Uses the same 3rd party components,

placed in project folders Check everything out from VCS and build

Page 19: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Continuous Integration Servers

Manage the CI process Check out source Compile Run tests Give feedback

Tools: TFS, Jenkins, Team City, Cruise Control

Page 20: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Build management

Handles actual build from source Gets called from CI Server Tools: MSBuild, Ant, Nant, Rake, PSake

Page 21: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Testing

Page 22: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Testing

Unit tests Integration tests

Page 23: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Unit/Integration testing

Test After Development Test Driven Development Unit Test Frameworks

JUnit, NUnit, MSTest, xUnit, rbUnit

Page 24: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Artifacts

Potential release candidate Build & test results Components for next steps or

subsequent builds Tools: Maven, Npanday , Octopus

Page 25: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Feedback

Build reports Test results Web, system tray, text, twitter, sound

large monitors, lights,Ambient Orb

Build Radiator

Page 26: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Build Radiator

Multiple projects Multiple statistics Can be whiteboard, colored Post-It notes,

web page

Page 27: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Build Radiator Examples

Michael Brunton-Spall – guardian.co.uk

Page 28: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Build Radiator Examples

Phil Collins

Page 29: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Build Radiator Examples

Phil Collins

Page 30: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Continuous Integration Demo

Developer process CI server configuration Feedback mechanism Build radiator

Page 31: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Best Practices

Commit code frequently Don’t commit broken code Fix broken builds immediately Write automated developer tests All tests and inspections must pass Run private builds (each developer runs

tests on their own code) Avoid getting broken code (don’t check

out broken code)

Page 32: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Continuous Delivery

Continuous

Integration

Automated

Acceptance

Testing

Automated

Capacity Testing

Manual Testing

Automated

Deployment

Page 33: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Automated Testing Processes

Artifact Storage

Test SystemCI Server

Feedback Mechanism

Page 34: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Automated Acceptance Testing

Validates software from the user perspective

Does the functionality work the way the customer expects?

Given … When … Then … Test system should resemble production

system Tools: FitNesse, Cucumber, Jbehave,

Concordion, Twist

Page 35: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Automated Acceptance Testing

Loose coupling UI Design Patterns MVVM, MVC, MVP Separation of concerns

Page 36: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Automated Capacity Testing

Non-functional requirements Scalability, Longevity, Throughput, Load Tools: Jmeter, Marathon, Bench, Ants

Page 37: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

What happened to QA staff?

Role changes Write automated test scripts Analyze test results Manual testing

Page 38: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Manual Testing Process

Artifact Storage

Feedback Mechanism

Test System

QA staff

Page 39: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Manual Testing

Exploratory, Usability, Showcases Look and feel Worst-case

Page 40: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Automated Deployment

Process should be identical to testing deployment

Sets up systems and configuration Don’t forget about rollback (and test this

too) Tools: Puppet, Octopus, System Center

Page 41: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Testing

Integration

Functional

Acceptance

System

Stability

Scalability

Performance

Load

Unit

Code Analysis

Test coverage

Dependency

Refactoring

Code reviewStatic analysis

Database

Schema

Stored proc

Test database

Unit testing

Deployment

Install script

QA

Production

Extending Continuous Deployment

Page 42: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Review

Continuous Integration

Automated Acceptance

Testing

Automated Capacity Testing

Manual Testing

Automated

Deployment

Page 43: THE CONTINUOUS DELIVERY ZONE Craig Berntson Chief Software Gardener Mojo Software Worx.

Questions

Email: [email protected] Twitter: @craigber www.speakerrate.com/craigber