36
Ariel Alonso, IPC Continuous Delivery

Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Ariel Alonso, IPC

Continuous Delivery

Page 2: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

About Me

• Ariel Alonso

• Systems Architect

• Independent Purchasing Cooperative, Inc.

• Software Engineer for 15 years

• Interests• Agile & XP• Test Driven Development• Automation• Testing• Distributed Systems• Big Data

• Ariel Alonso

• Systems Architect

• Independent Purchasing Cooperative, Inc.

• Software Engineer for 15 years

• Interests• Agile & XP• Test Driven Development• Automation• Testing• Distributed Systems• Big Data

Page 3: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Agenda

What is Continuous Delivery?

Implementing Continuous Delivery

Continuous Delivery at IPC

Q&A

What is Continuous Delivery?

Implementing Continuous Delivery

Continuous Delivery at IPC

Q&A

Page 4: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

What is Continuous Delivery?

Page 5: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

How long would it take your organization to deploy achange [to production] that involves just one singleline of code?

Do you do this on a repeatable, reliable basis?

- Mary and Tom Poppendieck, Implementing Lean Software Development

How long would it take your organization to deploy achange [to production] that involves just one singleline of code?

Do you do this on a repeatable, reliable basis?

- Mary and Tom Poppendieck, Implementing Lean Software Development

Page 6: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable
Page 7: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

What Scrum Does For Us

Smaller pieces offunctionality

More frequent feedback

Shippable incrementsquicker

Smaller pieces offunctionality

More frequent feedback

Shippable incrementsquicker

Page 8: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

What About Deployments?

Value is only realized inproduction

Manual deployments arepainful and error prone

Poor configurationmanagement leads tounpredictable results

Infrequent deploymentsincrease risk

Value is only realized inproduction

Manual deployments arepainful and error prone

Poor configurationmanagement leads tounpredictable results

Infrequent deploymentsincrease risk

Page 9: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

“If it hurts, do it more often.”- Internet Wisdom“If it hurts, do it more often.”- Internet Wisdom

Page 10: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Frequent Deployments

Deploying Frequently Feedback from users Reduce risk of deployment Real project progress Business value quicker

More frequent changes with fewer lines of codereduce risk and help identify problems easier andsooner

Deploying Frequently Feedback from users Reduce risk of deployment Real project progress Business value quicker

More frequent changes with fewer lines of codereduce risk and help identify problems easier andsooner

Page 11: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Reduce Risk of Change

John Allspaw, Ops Meta-Metrics

Page 12: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

What is Continuous Delivery?

Set of software development practices andprinciples focused on building, testing, anddeploying software faster and more frequently

Goals Improve Quality Reduce Cycle Time

Business value realized in production

Set of software development practices andprinciples focused on building, testing, anddeploying software faster and more frequently

Goals Improve Quality Reduce Cycle Time

Business value realized in production

Page 13: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

The Last Mile

Agile/ScrumGives us feedback on the quality of ourrequirements and the quality of ourcode

Continuous DeliveryGives us feedback on the quality of ourprocess to deliver software

Gives us feedback on the quality of ourrequirements and the quality of ourcode

Scrum

ContinuousDelivery

Page 14: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

“Just ship, baby.”- Kent Beck“Just ship, baby.”- Kent Beck

Page 15: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Implementing Continuous Delivery

Page 16: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Principles of Continuous Delivery

Process MUST be repeatable and reliable

Automate everything

If something is difficult or painful, do it more often

Keep everything in source control

Done means “in production”

Build quality in to the product

Everyone has responsibility for the release process

Improve continuously

Process MUST be repeatable and reliable

Automate everything

If something is difficult or painful, do it more often

Keep everything in source control

Done means “in production”

Build quality in to the product

Everyone has responsibility for the release process

Improve continuously

Page 17: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

“Real artists ship.”- Steve Jobs“Real artists ship.”- Steve Jobs

Page 18: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Continuous Delivery Pattern

DeveloperMachines

Source Control& Build Servers

IntegrationEnvironment

Demo / UATEnvironment

StagingEnvironment

ProductionEnvironment

Single artifact is produced andadvanced through the environments

Exactly the same mechanism is usedto deploy to each environment

Page 19: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Continuous Delivery Practices

Build binaries only once

Use precisely the same mechanism to deploy toevery environment

Smoke test your deployment

If anything fails, stop the line!

Build binaries only once

Use precisely the same mechanism to deploy toevery environment

Smoke test your deployment

If anything fails, stop the line!

Page 20: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Key Components

Source Control

Test Driven Development

Behavior Driven Development

Automated Testing

Continuous Integration

Infrastructure as Code

Source Control

Test Driven Development

Behavior Driven Development

Automated Testing

Continuous Integration

Infrastructure as Code

Page 21: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Source Control

Essential for development teams to work effectivelyon the same code base

Ability to attach historical data to code, such asexplanatory comments about the intent behindeach change

Control the “production line” with commit hooks

Essential for development teams to work effectivelyon the same code base

Ability to attach historical data to code, such asexplanatory comments about the intent behindeach change

Control the “production line” with commit hooks

Page 22: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Continuous Integration

Automatically builds entire application

Automated unit and functional tests

Exposes integration issues and conflicts early

Everyone is responsible for the CI environment

Automatically builds entire application

Automated unit and functional tests

Exposes integration issues and conflicts early

Everyone is responsible for the CI environment

Page 23: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Test Driven Development

Red, Green, Refactor

Permanent Regression

Self Documentation

More Maintainable Code

Red, Green, Refactor

Permanent Regression

Self Documentation

More Maintainable Code

Page 24: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Behavior Driven Development

Starts with a conversation

Shared understanding of thefeatures to be implemented

Features are identified asuser stories

Feature: RefundIn order to make the customer wholeAs the product ownerI want to make sure we know how to do math

Scenario: Customer refundGiven Fred has bought a microwaveAnd the microwave cost 100 USD

When we refund the microwaveThen Fred should be refunded 100 USD

Starts with a conversation

Shared understanding of thefeatures to be implemented

Features are identified asuser stories

Feature: RefundIn order to make the customer wholeAs the product ownerI want to make sure we know how to do math

Scenario: Customer refundGiven Fred has bought a microwaveAnd the microwave cost 100 USD

When we refund the microwaveThen Fred should be refunded 100 USD

Page 25: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Automated Testing

Unit Testing

Functional Testing

Performance Testing

Stress Testing

Security Testing

Disaster Recovery Testing

Unit Testing

Functional Testing

Performance Testing

Stress Testing

Security Testing

Disaster Recovery Testing

Page 26: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Infrastructure as Code

Automate the process of bringing the system to aworking state

Production like environments can be built fromscratch in minutes

Versioning environments along with applications

Allows for continuous testing of our infrastructure

Automate the process of bringing the system to aworking state

Production like environments can be built fromscratch in minutes

Versioning environments along with applications

Allows for continuous testing of our infrastructure

Page 27: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Tools

Issue Tracking JIRA, PivotalTracker,

Bugzilla

Source Control Mercurial, Git, Subversion,

CVS, TFS

Virtualization VMWare, OpenStack,

Amazon EC2

CI/Build Server Bamboo, Hudson, Jenkins,

TeamCity

Automated Testing jUnit, Nunit, RSpec,

Cucumber, Selenium

Infrastructure as Code Puppet, Chef

Issue Tracking JIRA, PivotalTracker,

Bugzilla

Source Control Mercurial, Git, Subversion,

CVS, TFS

Virtualization VMWare, OpenStack,

Amazon EC2

CI/Build Server Bamboo, Hudson, Jenkins,

TeamCity

Automated Testing jUnit, Nunit, RSpec,

Cucumber, Selenium

Infrastructure as Code Puppet, Chef

Page 28: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Continuous Delivery at IPC

Page 29: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

The Challenge

Payment Processing Platform

28,000+ restaurants in US andCanada

2M transactions/day

$5.8B/year in credit card sales

200M SUBWAY® Card accounts

99.999% Service LevelAgreement

Release Weekly

Payment Processing Platform

28,000+ restaurants in US andCanada

2M transactions/day

$5.8B/year in credit card sales

200M SUBWAY® Card accounts

99.999% Service LevelAgreement

Release Weekly

Page 30: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

The Solution

Transition from waterfall to Scrum

Weekly sprints resulting in weekly productiondeployments

Embrace DevOps and Continuous Delivery

Invest in comprehensive testing approach

Transition from waterfall to Scrum

Weekly sprints resulting in weekly productiondeployments

Embrace DevOps and Continuous Delivery

Invest in comprehensive testing approach

Page 31: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

How Much Do We Test?

3,600+ Unit Tests

4,500+ Functional Tests

7,000+ Regression Tests

Disaster Recovery Tests

3,600+ Unit Tests

4,500+ Functional Tests

7,000+ Regression Tests

Disaster Recovery Tests

Page 32: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

“Why do we never have time to doit right, but always have time to doit over? ”- Anonymous

“Why do we never have time to doit right, but always have time to doit over? ”- Anonymous

Page 33: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Keys to Success

Organizational commitment to Agile

Focused delivery team

Embrace inevitability of change

Treat agility as a corporate asset

Favor cultural fit over technical skills when growingthe team

Continually improve

Organizational commitment to Agile

Focused delivery team

Embrace inevitability of change

Treat agility as a corporate asset

Favor cultural fit over technical skills when growingthe team

Continually improve

Page 34: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

The Final Frontier

Release Manager ContinuousIntegration

ContinuousDelivery

ContinuousDeployment

ContinuousIntegration

ContinuousDelivery

ContinuousDeployment

Manual buildsproduced by releasemanagers

Automated buildscombined withautomated unit andfunctional testing

Repeatable andreliable deploymentsallowing for small,frequent releases

Near real-timedeployment ofproduction readycode

Page 35: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

“The future is here. It’s just notevenly distributed yet.”- William Gibson

“The future is here. It’s just notevenly distributed yet.”- William Gibson

Page 36: Continuous Delivery - South Florida Agile Associationsouthfaa.com/uploads/3/5/2/...continuous_delivery.pdf · Principles of Continuous Delivery Process MUST be repeatable and reliable

Q&A