Software Development Done Right Continuous Delivery Bas Tichelaar 1
Over mij Senior Consultant at Xebia Architect at Wehkamp Contact btichelaar@xebia.com bastichelaar bastichelaar 2
Continuous Delivery? Quiz 3
Wie doet het al? Geautomatiseerd een server uitrollen Geautomatiseerd een complete omgeving uitrollen Met 1 druk op de knop Binnen een half uur Zelfstandig door teams dmv self-service 4
Wie doet het al? Alle code zit in versiebeheer Alle gepushte code wordt automatisch getest Alle geteste code wordt automatisch geversioneerd en gepackaged Push van code leidt automatisch tot deployment Push van code leidt automatisch tot deployment in productie 5
Continuous Delivery is hetzelfde als Continuous Integration is hetzelfde als Continuous Deployment is een technologische oplossing lost alle problemen op kan niet zonder Agile is heel moeilijk 6
Continuous Delivery principes Automatiseer alles Als het pijn doet, doe het vaker Done is live Bouw kwaliteit in Continue verbetering Het team is verantwoordelijk 7
Continuous Delivery onderdelen Automated provisioning Automated deployment Continuous integration Automated testing 8
Continuous Delivery Automated provisioning Automated deployment Continuous integration Automated testing 9
Automated Provisioning Geconfigureerde servers Applicatie Inclusief middleware Inclusief database Gekoppeld aan monitoring, loadbalancers en andere systemen Middleware OS Half fabricaten! VM 10
Continuous Delivery Automated provisioning Automated deployment Continuous integration Automated testing 11
Automated Deployment Plaatst de applicatie op de servers Applicatie Zet de applicatie aan Configureert de load balancers Middleware Smoke test: werkt de applicatie? OS VM 12
Continuous Delivery Automated provisioning Automated deployment Continuous integration Automated testing 13
Continuous Integration Integreert code in een gedeelde repository Draait de unit tests Bouwt de code Triggered de volgende stap bij succes Stopt bij fout en notificeert ontwikkelaars 14
Continuous Delivery Automated provisioning Automated deployment Continuous integration Automated testing 15
Automated Testing Unit tests Integratie tests Performance tests Acceptatie tests 16
Continuous Delivery Maturity Model Continuous Integration Automated Deployment Test Automation Automated Provisioning Architecture Agile Continuous Delivery Level 5 Expert Automated feature driven delivery Deployment automated for advanced feature go live scenarios Teams have adopted business driven, feature based advanced test capabilities PaaS is innovation accelerator Teams are free to accelerate and innovate without constraints Continuous optimization Level 4 Advanced Pipeline enabled for delivery validation End-to-end AD, including most Infrastructure components Teams apply test automation for non functional requirements PaaS with on - demand environments Supports feature driven delivery and evaluation DevOps Level 3 Average Single build for all environments Standardized deployments for all environments Test Driven Development / Behaviour Driven Development Systems are delivered within one day, using self-service tools Supports autonomous delivery Predictable outcomes Level 2 Basic End-to-end build and packaging from Continuous Integration server Automated Deployment for application binaries, configuration and data Automated feature tests and stakeholder demo s Systems are as similar as possible Feature delivery in small iterations Continuous Delivery principles are applied regularly Level 1 Beginner Central build server and version control system Automated Deployment for application binaries (code) Static code analysis and automated unit tests Basic provisioning Continuous Delivery compliant application architecture Continuous Delivery principles are applied ad-hoc Level 0 Not started Limited central Continuous Integration capabilities No deployment automation No test automation No provisioning, (partially) manual process Technical issues prevent increasing release frequency Continuous Delivery principles are not applied v1.1
Continuous Delivery transformatie Real life example 18
Context Grote hypotheken verstrekker Continuous Delivery transformatie Agile transformatie 1 jaar 4 CD consultants 19
Doelstellingen project Nieuwe omgeving binnen 30 minuten Software gebouwd en gedeployed binnen 1 uur 70% van nieuwe code automatisch getest 20
Aanpak Multidisciplinair team: kernteam vanuit klant - Alle disciplines vertegenwoordigd: - beheer - ontwikkeling - test - release management - Klant ontwikkelt zelf de kennis 21
Applicatie landschap Java: - JBoss - Maven Microsoft: -.NET - Powershell - Appfabric Uniface 22
Waarom automated provisioning? Aanmaken testomgeving duurde enkele weken Veel operationeel (handmatig) werk - Geen tijd meer om te innoveren Loketten == wachttijd Testomgevingen waren niet gelijk, en bevatten fouten 23
Maar wat is een testomgeving? Geconfigureerde servers - Loadbalancers? - Monitoring? Een werkende applicatie Een TE01/TE02/TE03 Definities zijn belangrijk! 24
Acties provisioning Automatiseer alles! Zet alles in versiebeheer, ook infrastructuur code Maak omgevingen identiek Bied een self-service portal (of nog beter: een API) 25
Automated Provisioning: tools Orchestratie: XL Release Configuratie management: Microsoft DSC Scripting taal: Powershell 4 Logging en monitoring: Logstash en Kibana Versiebeheer: SVN 26
Automated Provisioning Databases XL Release Microsoft DSC Servers Logstash/Kibana Loadbalancers 27
Maar alleen techniek is niet genoeg Loketten => wachttijd! Handmatige stappen: nog steeds human error! Wie is verantwoordelijk voor wat? Wie gaat de pipeline beheren? 28
Optimaliseer het proces Elimineer loketten door automatisering Elimineer handmatige overdracht Neem mensen stap voor stap mee in de reis Communicatie! 29
XL Release 30
Buildmonitor 31
Uitdagingen Dit is niet te automatiseren Dit gaat nooit werken Kennis van Continuous Delivery buiten kernteam Aanhaken business: Product Owners! Continuous Delivery is geen project! Continuous Delivery gaat verder dan techniek! 32
Lessons learned Eerste stap: huidige proces modelleren in XL Release Handmatige stappen één voor één automatiseren Stabiele infrastructuur vereiste! Neem de organisatie mee 33
Resultaat Doelstellingen gehaald Stabielere, gelijke omgevingen Mindset verandering - automatiseer alles - root cause analysis - continuous improvement 34
Toekomst Nu: vast aantal omgevingen, toekomst: omgeving on demand Elastische infrastructuur: scale on demand (cloudbursting) Experimenteren: nieuwe omgeving is zo aangemaakt Containers, containers, containers! - Docker on Windows + 35
Nauts Datacenter Automation Experts Containers, containers, containers! Technologie: - Docker - Mesos - Kubernetes - CoreOS - Service Discovery Check http://nauts.io 36
De container Applicatie Middleware 37
Old-school Continuous Delivery integratie bouw test deploy Code Continuous Delivery pipeline Middleware Servers 38
Containers??? Code integratie bouw containerize test Continuous Delivery pipeline Docker Hub Base container Cloud Generieke infra 39
Voordelen Code & Middleware samen in 1 container - Als geheel getest en gedeployed Test je infrastructuur! Start in milliseconden: scale on demand Minder overhead dan VM s Portabiliteit - Voorlopig alleen op Linux 40
Work to be done Data en databases? Orchestratie? Security? Hoe richt je je organisatie in? Teveel open source projecten: - https://www.mindmeister.com/nl/389671722/docker-ecosystem 41
Bedankt! Vragen? btichelaar@xebia.com 42