impact of architecture continuous delivery · 2014-05-08 · hbr, “six myths of product...

30
Impact of Architecture on Continuous Delivery Russell Miller [email protected] [email protected] @RussMiller123 Podcast: ArchitectureCast.net

Upload: others

Post on 21-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Impact of Architecture on Continuous Delivery

Russell [email protected]@gmail.com

@RussMiller123

Podcast: ArchitectureCast.net

Page 2: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Context:

• Greenfield project• Build cloud‐based monitoring system• Social/collaborative

Pilot project for:• Truly cloudy application(cloud native)• Agile pulling in some lean principles 

Page 3: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Definition:

Continuous Delivery: An automated approach to software delivery characterized by frequent and predictable delivery of incremental units of business value.

Utilizing:• Continuous integration• Automated testing• Automated Deployment (at least to test)

Page 4: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Frequent, Small, Predictable

Page 5: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

• Continuously usable• Incrementally better

Page 6: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Continuously Learn and Innovate

ValueAvoids wasteImproves feedbackInnovate faster

Page 7: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

No Drones, instead we have a build pipeline:

Code Done Unit Tests Integrate Acceptance Deploy Test Deploy  Staging

Deploy Production

Auto Auto Auto Auto AutoPushButton

Our goal, get here weekly.

Page 8: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Our dream

Page 9: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

No Drones, instead we have a build pipeline:

Code Done Unit Tests Integrate Acceptance Deploy Test Deploy  Staging

Deploy Production

Auto Auto Auto Auto AutoPushButton

Bottleneck Our goal, get here weekly.

As if, some drones had to wait on others to land!

Page 10: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!
Page 11: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

BottleneckWeren’t able to drive the last mile over the finish line!

Getting to what the business considers done…

Page 12: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

“because the information [developers are] producingis invisible to them, the batch sizes are, too”, HBR, “Six Myths of Product Development” by Thomke and Reinertsen

Patented “Batch Size”Viewing Goggles. Only $9.99!!!(while supplies last)

Caution: Batch sizes viewed through these goggles may be larger than they appear.

Page 13: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Main lesson we learned:

Page 14: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Service Architecture

SentinelSentinelOn‐Prem Sentinel

SentinelSentinel

Cloud Hosted Sentinel

SearchService

SearchIndex

MainRepository

AdminServices

Various Services

NotificationService

Queue

Queue

Queue

Page 15: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Micro Services

• Separately deployable and separately deployed! (leverage the cloud!)• SOLID Principle (at the component level)• Dependencies create larger batches!

• Other advantage:• Is it working? (Testing pieces in production)• Still Used?• Hot Swappable

Page 16: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

•But, many new features cut across components/services

Problem solved?

Client(s)

Component  A V1.0

Component  B V1.0

Component  B V1.1

Abstraction

Team B

Feature

Page 17: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Feature Switch = Virtual Pipeline

Code Done Unit Tests Integrate Acceptance Deploy Test Deploy  Staging

Deploy Production

Code Done Unit Tests Integrate Acceptance Deploy Test Deploy  Staging

Deploy Production

Code Done Unit Tests Integrate Acceptance Deploy Test Deploy  Staging

Deploy Production

Feature Switch A

Feature Switch B

Parallel Landings

Page 18: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Ultimately, need “Feature Switches” (e.g. Twitter Decider framework)• Runtime Configuration• Built on top of license flag (tiers)• Smart switching based on other criteria• Pays off more than just for enabling small batches

Page 19: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Next lesson: Branch by Abstraction• Layers already there if you are Mocking• Client virtually merges with new branch

ClientComponent(s)

ClientComponent(s)

Object

Component V1.0

Abstraction

ClientComponent(s)

ComponentV1.0

Abstraction

Component V2.0

Client requests a version

Page 20: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Did we realize our dream?

Page 21: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

In Conclusion…

Lessons learned:•Architecture impacts batch size•Decouple deployment, also (Micro Services)•Virtualize your pipeline:

• Branch by abstraction• Feature switches• Piece meal dark deployment

Architecture Matters, of course!

Page 22: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Resources

• Branch by Abstraction: http://continuousdelivery.com/2011/05/make‐large‐scale‐changes‐incrementally‐with‐branch‐by‐abstraction/

• Continuous Delivery at Ancestry.com (John Esser and Russell Barnett) http://www.infoq.com/presentations/ancestry‐SOA‐continuous‐delivery

• Adjusting Your Architecture for Continuous Delivery http://www.infoq.com/interviews/laycock‐continuous‐delivery

• Batch size not clear to developers: http://hbr.org/2012/05/six‐myths‐of‐product‐development/ar/1• Forrester Continuous Delivery 

http://info.thoughtworks.com/rs/thoughtworks2/images/Continuous%20Delivery%20_%20A%20Maturity%20Assessment%20ModelFINAL.pdf

Page 23: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

5. Optimizing4. Quantitatively Managed3. Defined2. Managed1. Initial

“Systems are architectedwith continuous deployment in mind…”

Forrester Continuous Delivery Maturity Model

Page 24: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

3rd Party Service considerations

Examples we used:• Twillio• ElasticSearch• MongoDB• Payment Service

What to consider:• Auto Configurable?• Used in a testable way?• Monitorable?

Page 25: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Deploy Abstractly

• Truly cloudy – components should not care about• Which machine (cattle)• IP addresses• DNS names should be auto‐set• Certificates

Page 26: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Forrester Continuous Delivery Maturity Model

5. Optimizing4. Quantitatively Managed3. Defined2. Managed1. Initial

Continuous deployment capability enables business innovation/experimentation.

Page 27: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Our Reality!Log jam of features waiting to be integrated.

Page 28: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

•Added ability to deploy subset of Services•Separate Andon cords to pull•Able to run multiple versions (be careful)

Problem solved?

Page 29: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

Bigger batches than we realized:

• Uncovered a couple of areas in the architecture that could be decoupled (e.g. Notification)

• Issue was all‐or‐nothing deployment• Development in small batches, but deploying big batches

Page 30: Impact of Architecture Continuous Delivery · 2014-05-08 · HBR, “Six Myths of Product Development” by Thomke and Reinertsen Patented “Batch Size” Viewing Goggles. Only $9.99!!!

• Branch by abstraction• Prepare for rollback, but prefer rolling forward• Deep stack monitoring (designed in)• Test in production (TiP)• Not trusting the upstream component

Other techniques used tactically