continuous delivery pipeline - patterns and anti-patterns

29
November 15, 2016 Continuous Delivery Pipeline – Patterns and Anti-patterns Juni Mukherjee (@JuniTweets) Consultant, CI/CD, LifeLock (Views are my own.)

Upload: sonatype

Post on 16-Apr-2017

128 views

Category:

Software


2 download

TRANSCRIPT

November15,2016

Continuous Delivery Pipeline –Patterns and Anti-patterns

JuniMukherjee (@JuniTweets)

Consultant,CI/CD,LifeLock(Viewsaremyown.)

November15,2016

November15,2016

November15,2016

Domain-driven Design (DDD) for Continuous Delivery

ThankyouEricEvansforDDD!

Entity :DefinedbyID,notattributes ValueObject :Definedbyattributes,noID

Aggregate:Collectionofobjects Domain:Sphereofactivityandinfluence

Model:Systemofabstractions DomainEvent:Domainexpertscarefor

Ubiquitous Language :Sharedlanguage DomainServices:Sharedfunctionality

Connecttheimplementationtoanevolving domainmodel

ContinuousDeliveryisajourney,notadestination.

November15,2016

Domain Model Integrity – Bounded Context, Context Map

© 2016 CloudBees, Inc. All Rights Reserved

November15,2016

Fragmentation, Blurred Edges, Bounded Context, Context Map

© 2016 CloudBees, Inc. All Rights Reserved

Node,Java,iOS,Android,Database,::::::::::

November15,2016

Domain Model Integrity – Ubiquitous Language

© 2016 CloudBees, Inc. All Rights Reserved

November15,2016

Ubiquitous Language – [Soft | Hard | Firm]ware, Embedded, IoT

Component

Thesmallestdistributableandtestableunit

Unit,SCA– Linter,SCA– SecurityVulnerabilities

Modules,Libraries

Subsystem

Thesmallestdeployableandrunnableunit

Functional(Security,I18N,L10N,…),Performance

JAR|IPA|APK|Emulators|Simulators…

System

Looselycoupledsubsystems

Integration(Interfaces,Network),Performance

JAR&IPA&APK&RealDevices&Accessories…

Rate of Change, Supply Chain

November15,2016

Domain Model Integrity – Continuous Integration

© 2016 CloudBees, Inc. All Rights Reserved

November15,2016

Continuous Integration, Continuous Delivery, Value Stream Map

Product :SystemUnderTest(SUT) Configuration :Application,Environment

Test :Unit,Static,Functional,Integration,Perf Infrastructure,Platform:Infra-As-Code,*aaS

Pipeline-As-Code :Dockerized Jenkins2.0,Jenkinsfile (Process-As-Code),SharedKernel(Utils.groovy,Libs)

VSM:AutomateONLYthevalue-addingsteps.Discardtherest.

November15,2016

MVP - Continuous Delivery Pipeline, Slice over Dice

© 2016 CloudBees, Inc. All Rights Reserved

ProductSlice:SystemUnderTest(SUT) ConfigurationSlice:Application,Environment

TestSlice:Unit,Static,Functional,Int,Perf Infrastructure,Platform:Infra-As-Code,*aaS

Pipeline-As-Code :Dockerized Jenkins2.0,Jenkinsfile (Process-As-Code),SharedKernel(Utils.groovy)

November15,2016

Domain Model Integrity – Big Ball of Mud (And Tests Too?)

© 2016 CloudBees, Inc. All Rights Reserved

November15,2016

Pipeline – Graph – Tightly Coupled Product Architecture

November15,2016

Domain Model Integrity – Separate Ways

© 2016 CloudBees, Inc. All Rights Reserved

November15,2016

Pipeline – Linear – Independently Deployable Artifact

November15,2016

Death by a thousand test-types!

… And by a thousand environments!

November15,2016

Domain Model Integrity – Customer/Supplier Teams

© 2016 CloudBees, Inc. All Rights Reserved

November15,2016

Customer Supplier - Pipeline Design Pattern

November15,2016

Domain Model Integrity - Conformist

© 2016 CloudBees, Inc. All Rights Reserved

November15,2016

Conformist – Pipeline Design Pattern

November15,2016

Domain Model Integrity – Shared Kernel, Anti-corruption Layer

© 2016 CloudBees, Inc. All Rights Reserved

November15,2016

Shared Kernel, Anticorruption Layer

Domain Services,

Services Architecture,

Cloudy with a chance of sharp interfaces

Network Latency,

Circuit Breaker

November15,2016

Pipeline-as-a-service: Scrum Teams sign a contract!

1. ProcessdrivesArchitecture.Processdrivestools.

2. Pipelineisaproduct,basedofftheServicesArchitecture.

3. ThesuiteofpolyglotDomainServices,withsharpinterfaces,couldbedevelopedbyanyoneintheorganization,basedoffprotocol.

4. Exactinterfacesshoulddeclareexactintent.Shouldmaintainexistinginterfacessothatcustomersdon’texperienceservicedisruption.

5. Segregation/Separationofduties istheconceptofhavingmorethanonepersonrequiredtocompleteatask.Itisaninternalcontrolintendedtopreventfraudanderror.ItdoesNOTmeanHumanBeingAdoesnottrustHumanBeingBandhencestartsanewdepartmentofclickingbuttons.

6. ShouldenablePipelinecustomerstomakechoices,sothatScrumTeamscouldcontroltheirowndestiny.

Scrum Teams control their own destiny

November15,2016

Domain Model Integrity – Published Language

© 2016 CloudBees, Inc. All Rights Reserved

November15,2016

Published Language – DSL, It’s groovy!, 1-800-Plumber

Unmanageablestringofjobsyou’vebecome,Pipelineyoumustbe,Declarative,versionedandephemeralbecomeyoumust,Orthedarksidewon’tsetyoufree.

Pipelineanalyticsreportyoumust,Inthegrooveyoumustget,Makehappyourengineersyoumust,Don’tmakethemfret.

Jenkinsfile /Jenkins2.0

node ("${AGENT}") { }

stage ‘deploy’timeout (time:2,unit:'DAYS'){input message:’Proceed?”,submitter:

’Operations’}

stage ‘functional,performance,securitytest’parallel (parallel_task_stage_sauce :{},parallel_task_stage_blazemeter :{},parallel_task_stage_appspider :{})

try{}

catch(InterruptedException x){slackSend color:'#008000',message:””}

November15,2016

Domain Model Integrity - Flying colors!

© 2016 CloudBees, Inc. All Rights Reserved

November15,2016

KPIs – Show Me the Money!

What can be measured, can be fixed!

November15,2016

On Closing : Conway’s Law, Maya Angelou’s Human Family

“Organizations which design systems ... are constrained to produce

designs which are copies of the communication

structures of theseorganizations.”

Melvin Conway

“I note the obvious differences between each sort and type, We are more alike, my friends, than we are unalike.”

Maya Angelou

November15,2016

Thank you AllDayDevOps, Community, Sponsors and Supporters!

JuniMukherjee (@JuniTweets)