Share
Embed
Continuous Delivery in Practice
vivekprahlad
October 29, 2019
Transcript
77 slides
-
ABOUT ME ▸ Technologist for 19 years ▸ 13 years
at ThoughtWorks ▸ Head of Technology at ThoughtWorks Singapore, 2012 - 2015 ▸ Technology strategy and leadership at product companies ▸ Practicing and teaching Continuous Delivery for ~ 10 years ▸ Languages that I find interesting: Clojure and Rust (watch this space) -
AGENDA ▸ What is Continuous Delivery? ▸ Continuous Delivery in
practice ▸ Release patterns ▸ Adopting Continuous Delivery -
The ability to get changes: features, fixes & configuration into
the hands of users safely quickly in a sustainable way -
The ability to get changes: features, fixes & configuration into
the hands of users safely quickly in a sustainable way -
The ability to get changes: features, fixes & configuration into
the hands of users safely quickly in a sustainable way -
The ability to get changes: features, fixes & configuration into
the hands of users safely quickly in a sustainable way -
WATER-SCRUM-FALL STUDY+ APPROVAL DESIGN + PLANNING 1 2 3 ANALYSIS
DEVELOPMENT TESTING INTEGRATION UAT QA RELEASE AND OPERATIONS CENTRALISED QA IT OPERATIONS ‘AGILE’ TEAMS PMO + FINANCE The fuzzy front end The last mile -
THE PRINCIPLES OF CONTINUOUS DELIVERY ▸ Build quality in ▸
Work in small batches ▸ Computers do repetitive tasks, people solve problems ▸ Relentlessly pursue continuous improvement ▸ Everyone is responsible -
KEY MEASURES ▸ Lead time for changes ▸ Frequency of
release ▸ Mean Time to Restore Service https://puppet.com/resources/whitepaper/2014-state-devops-report -
LEAD TIME AND CYCLE TIME Idea Start development Release to
users LEAD TIME CYCLE TIME -
FIRMS WITH HIGH PERFORMING IT ORGANISATIONS WERE TWICE AS LIKELY
TO ACHIEVE THEIR PROFITABILITY, MARKET SHARE AND PRODUCTIVITY GOALS -
THE BUILD PIPELINE BUILD TEST PACKAGE Environment & Application Configuration
TEST ENV TEST ENV TEST ENV STAGING PRODUCTION Docker Image Machine Image Application installer SOURCE CONTROL -
CONTINUOUS INTEGRATION CONTINUOUS DEPLOYMENT CONTINUOUS DELIVERY Integration whenever code changes.
Everyone commits to trunk at least once a day Deploy as the last stage of integration Software is always in a deployable state -
What to build How to build it How to validate
it How to run it -
What to build How to build it How to validate
it How to run it => Product => Development => Testing => Operations -
AGENDA ▸ What is Continuous Delivery? ▸ Continuous Delivery in
practice ▸ Release patterns ▸ Adopting Continuous Delivery -
Pathological (power-oriented) Bureaucratic (rule-oriented) Generative (performance-oriented) Low cooperation Modest
cooperation High cooperation Messengers shot Messengers neglected Messengers trained Responsibilities shirked Narrow responsibilities Risks are shared Bridging discouraged Bridging tolerated Bridging encouraged Failure leads to scapegoating Failure leads to justice Failure leads to enquiry Novelty crushed Novelty leads to problems Novelty implemented -
ORGANISATIONS WHICH DESIGN SYSTEMS.. ARE CONSTRAINED TO PRODUCE DESIGNS THAT
ARE COPIES OF THE COMMUNICATION STRUCTURES OF THOSE ORGANISATIONS Melvin Conway CONWAY’S LAW -
What to build How to build it How to validate
it How to run it => Product => Development => Testing => Operations -
Onsite Customer Metaphor Refactoring Simple design Testing Continuous Integration Coding
standards Collective Ownership Pair programming Sustainable Pace Planning game Small releases -
THE 12 FACTOR APP CODEBASE DEPENDENCIES CONFIG BACKING SERVICES BUILD,
RELEASE, RUN PROCESSES CONCURRENCY DISPOSABILITY PORT BINDING DEV/PROD PARITY LOGS ADMIN PROCESSES https://12factor.net/ -
Onsite Customer Metaphor Refactoring Simple design Testing Continuous Integration Coding
standards Collective Ownership Pair programming Sustainable Pace Planning game Small releases -
THE ‘EXPAND AND CONTRACT’ PATTERN ORDER - ADDRESS ORDER -
ADDRESS CUSTOMER - ADDRESS ORDER - ADDRESS CUSTOMER - ADDRESS CUSTOMER - ADDRESS USE ORDER.ADRESS USE ORDER.ADRESS USE CUSTOMER. ADDRESS USE CUSTOMER. ADDRESS -
FUNCTIONAL ACCEPTANCE INTEGRATION UNIT SHOWCASES USABILITY EXPLORATORY NONFUNCTIONAL ACCEPTANCE
/ QOS Technology facing Business facing Technology facing Critique project Automated Automated Automated Manual Manual / automated -
Onsite Customer Metaphor Refactoring Simple design Testing Continuous Integration Coding
standards Collective Ownership Pair programming Sustainable Pace Planning game Small releases -
Practice Build management & CI Environments & Deployment Release management
& compliance Testing Data management Level 3 (Optimising) Continual improvement and optimisation of IaC based on evolving industry standards Continuous improvement of tests at various levels Zero-downtime provisioning of infrastructure Ability to automatically roll back Changes Infrastructure is self-healing, self- configurable, and self-optimising Metrics are regularly reviewed Level 2 (Quantitatively managed) All changes tracked in an Application Lifecycle Management (ALM) tool Builds not left broken Changes promoted through a consistent path to production Ability to manually roll back changes quickly and efficiently Infrastructure is highly available and fault-tolerant Automated alerting based on active monitoring IaC processes and practices are documented and available Level 1 (Consistent) All infrastructure defined as code Industry standard tooling is used to write code declaratively CI server to build, test and public IaC artifacts Automated tests run for every check in Provisioned infrastructure the result of an automated delivery pipeline Provisioning is idempotent Immutable infrastructure (no SSHing into boxes) Infrastructure is reliable and performs predictably Metrics calculated automatically, but not regularly reviewed. Centralised infrastructure monitoring and logging Level 0 (Repeatable) Infrastructure partly automated using scripts. Automation tooling is ad-hoc Some IaC tests Tests are run locally Provisioning is scripted but executed ad-hoc Patching and upgrades are done through provisioning processes Metrics are defined, but no way to collect and consistently measure Level -1 (Regressive) Nothing stored in version control Scripts stored on infrastructure No Continuous Integration server No written IaC tests No way to test infrastructure before provisioning Infrastructure is built manually from command line or GUI Existing infrastructure cannot be rebuilt Provisioning new infra is slow, inconsistent and painful Existing infrastructure is brittle and unreliable. Patching and upgrades done directly on running infrastructure. Trouble shooting on running infrastructure No defined infrastructure metrics: SLAs, KPIs, CSFs Monitoring and logging done directly on running infrastructure No automated alerting Practice Development Continuous Integration Provisioning and Configuration Management Observability -
AGENDA ▸ What is Continuous Delivery? ▸ Continuous Delivery in
practice ▸ Release patterns ▸ Adopting Continuous Delivery -
AGENDA ▸ What is Continuous Delivery? ▸ Continuous Delivery in
practice ▸ Release patterns ▸ Adopting Continuous Delivery -
Practice Build management & CI Environments & Deployment Release management
& compliance Testing Data management Configuration management Level 3 (Optimising) Teams meet to discuss integration problems resolve via automation, visibility, feedback All environments managed effectively. Provisioning fully automated. DevOps culture, collaboration to reduce risks, cycle time Production rollbacks rare. Defects found and fixed immediately Release to release feedback loop of database performance & deployment process Zero downtime provisioning of infrastructure. Automatic rollback, self service Level 2 (Quantitatively managed) Build metrics gathered, made visible and acted on. Builds are not left broken. Orchestrated deployments managed. Release and rollback processes tested. Environment and application health proactively managed. Cycle time monitored Quality metrics and trends tracked. Non-functional requirements defined, measured Database upgrades & rollbacks tested with deployment. Database performance monitored, optimised Ability to manually roll back changes quickly and safely Level 1 (Consistent) Automated build and test cycle when a change is committed. Artifacts managed Fully automated, push-button deployment. Same artifact, process for each environment. Change management and approval processes defined, enforced. Automated unit and acceptance tests. Testing part of development. Database changes performed automatically as part of deployment Provisioned infrastructure result of an automated delivery pipeline. Idempotent. Level 0 (Repeatable) Regular automated build and testing. Any build can be recreated from source Automated deploys to some environments. Configuration versioned Painful, infrequent, but reliable releases. Limited traceability from requirements Automated tests written as part of story development Changes to databases done with version controlled scripts. Provisioning scripted but executed ad-hoc Level -1 (Regressive) Manual processes for building software. No management of artifacts and reports Manual deployment. Environment-specific binaries. Manual environment creation Infrequent and unreliable releases Manual testing after development Data migrations unversioned and performed manually Infrastructure built manually, existing infrastructure cannot be rebuilt. Provision painful. Practice Build management & CI Environments & Deployment Release management & compliance Testing Data management Configuration management -
SUMMARY ▸ Continuous Delivery: think about the big picture ▸
Optimise cycle time - use a value stream map ▸ Engineering, product management, testing and ops practices are crucial ▸ Make deployments easy