THE SHAPE OF CI/CD Tom Duffield Software Engineer for Chef Delivery November 2nd, 2015
IT IS A JOURNEY TO CI & CD. We all start at different places. We all walk at different paces. This is a map. Follow your own path.
YOUR SUCCESS WILL BE DECIDED BY THE CULTURE OF YOUR TEAM
YOU MUST TRUST YOUR SYSTEM
UNDERSTAND YOUR GOALS
CONTINUOUS INTEGRATION
WHAT IS CONTINUOUS INTEGRATION?
CONTINUOUS INTEGRATION "Every time somebody commits any change, the entire application is built and a comprehensive set of automated tests is run against it." Humble, J. & Farley, D. Continuous Delivery: Reliable Software Releases through Build, Test and Deployment Automation.
EVERY TIME NIGHTLY ENTIRE APPLICATION = UI, API AND DB
THE GOAL OF EVERY BUILD SHOULD BE TO PRODUCE AN ARTIFACT THAT CAN BE GIVEN TO YOUR CONSUMERS.
SHIP FEATURES NOT RELEASES
ITERATIVE OVER INCREMENTAL
HOW YOU DEVELOP NOT HOW YOU BUILD
CONTINUOUS DELIVERY
WHAT IS CONTINUOUS DELIVERY ANYWAY?
HOW DO YOU DEFINE CONTINUOUS DELIVERY?
Continuous Delivery is the set of practices that, when followed, gives you the ability to safely push every build out to your consumers.
EVERY BUILD IS A RELEASE CANDIDATE
THE CHEF WORKFLOW Steps manual automated 1 Create a new change 2 Test Change Locally 3 Submit Change 4 Review Change 5 Approve Change 6 Deliver Change Verification Tests Build Artifacts Release Process Acceptance Tests
A SHARED WORKFLOW ACROSS PROJECTS AND TEAMS
SHARED WORKFLOW One Pipeline Infrastructure & Applications Acceptance Pipelines - Private Cookbook [A] Change review approve deliver Delivery Pipeline - Shared Cookbook [B] Change Application [A] Change review approve deliver review approve deliver union rehearsal delivered Application [B] Change review approve deliver
WHAT ARE UNION, REHEARSAL & DELIVERED?
Delivery Pipeline - Shared union rehearsal delivered TEST YOUR DEPLOYMENT THREE TIMES
Delivery Pipeline - Shared union rehearsal delivered UNION First deploy Don't break your consumers
Delivery Pipeline - Shared union rehearsal delivered REHEARSAL Clean deploy (rehearsal for delivered)
Delivery Pipeline - Shared union rehearsal delivered DELIVERED Final deployment Ready to be consumed
Delivery Pipeline - Shared union rehearsal delivered Build #1001
Delivery Pipeline - Shared union rehearsal delivered Build #1001 A
Delivery Pipeline - Shared union rehearsal delivered Build #1001 A A
Delivery Pipeline - Shared union rehearsal delivered Build #1001 A A A
Delivery Pipeline - Shared union rehearsal delivered Build #1001 A A A Build #1002 B
Delivery Pipeline - Shared union rehearsal delivered Build #1001 A A A Build #1002 B Build #1003 C
Delivery Pipeline - Shared union rehearsal delivered Build #1001 A A A Build #1002 B Build #1003 C C
Delivery Pipeline - Shared union rehearsal delivered Build #1001 A A A Build #1002 B Build #1003 C C C
A UNIFIED PIPELINE SHAPE THE STAGES ARE FIXED EACH STAGE HAS A FIXED SET OF PHASES
UNIFIED PIPELINE SHAPE Verify Build Acceptance Union Rehearsal Delivered Lint Merge Provision Provision Provision Provision Syntax Lint Deploy Deploy Deploy Deploy Unit Syntax Smoke Smoke Smoke Smoke Unit Functional Functional Functional Functional Quality Compliance Compliance Compliance Compliance Security Publish
QUESTIONS?
DEMO
https://chef.io/delivery