Software Development Done Right Continuous Deliveryfiles.meetup.com/16787152/CD_Bas.pdf · Quiz....

Preview:

Citation preview

Software Development Done Right

Continuous Delivery

1

Bas Tichelaar

Senior Consultant at Xebia Architect at Wehkamp

Contact

Over mij

2

btichelaar@xebia.com

bastichelaarbastichelaar

Continuous Delivery?

3

Quiz

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 principesAutomatiseer alles Als het pijn doet, doe het vaker Done is live Bouw kwaliteit in Continue verbetering Het team is verantwoordelijk

7

Continuous Delivery onderdelenAutomated provisioning Automated deployment Continuous integration Automated testing

8

Continuous DeliveryAutomated provisioning Automated deployment Continuous integration Automated testing

9

Automated ProvisioningGeconfigureerde servers Inclusief middleware Inclusief database Gekoppeld aan monitoring, loadbalancers en andere systemen

Half fabricaten!

10

OS

Middleware

VM

Applicatie

Continuous DeliveryAutomated provisioning Automated deployment Continuous integration Automated testing

11

Automated DeploymentPlaatst de applicatie op de servers Zet de applicatie aan Configureert de load balancers

Smoke test: werkt de applicatie?

12

OS

Middleware

VM

Applicatie

Continuous DeliveryAutomated provisioning Automated deployment Continuous integration Automated testing

13

Continuous IntegrationIntegreert 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 DeliveryAutomated provisioning Automated deployment Continuous integration Automated testing

15

Automated TestingUnit tests Integratie tests Performance tests Acceptatie tests

16

Level 5 Expert

Level 4 Advanced

Level 3 Average

Level 2 Basic

Level 1 Beginner

Level 0 Not started

Automated feature driven delivery

Pipeline enabled for delivery validation

Single build for all environments

End-to-end build and packaging from Continuous Integration server

Central build server and version control system

Limited central Continuous Integration capabilities

Deployment automated for advanced “feature go live” scenarios

End-to-end AD, including most Infrastructure components

Standardized deployments for all environments

Automated Deployment for application binaries, configuration and data

Automated Deployment for application binaries (code)

No deployment automation

Teams have adopted business driven, feature based advanced test capabilities

Teams apply test automation for non functional requirements

Test Driven Development / Behaviour Driven Development

Automated feature tests and stakeholder demo’s

Static code analysis and automated unit tests

No test automation

PaaS is innovation accelerator

PaaS with on - demand environments

Systems are delivered within one day, using self-service tools

Systems are as similar as possible

Basic provisioning

No provisioning, (partially) manual process

Teams are free to accelerate and innovate without constraints

Supports feature driven delivery and evaluation

Supports autonomous delivery

Feature deliveryin small iterations

Continuous Delivery compliant application architecture

Technical issues prevent increasing release frequency

Continuous optimization

DevOps

Predictable outcomes

Continuous Delivery principles are applied regularly

Continuous Delivery principles are applied ad-hoc

Continuous Delivery principles are not applied

Continuous Delivery Maturity Model

Continuous Integration

Automated Deployment

Test Automation

Automated Provisioning

Architecture Agile Continuous Delivery

v1.1

Continuous Delivery transformatie

18

Real life example

ContextGrote hypotheken verstrekker Continuous Delivery transformatie Agile transformatie

1 jaar 4 CD consultants

19

Doelstellingen projectNieuwe omgeving binnen 30 minuten Software gebouwd en gedeployed binnen 1 uur 70% van nieuwe code automatisch getest

20

AanpakMultidisciplinair team: kernteam vanuit klant - Alle disciplines vertegenwoordigd: - beheer - ontwikkeling - test - release management

- Klant ontwikkelt zelf de kennis

21

Applicatie landschapJava: - 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 provisioningAutomatiseer alles! Zet alles in versiebeheer, ook infrastructuur code Maak omgevingen identiek Bied een self-service portal (of nog beter: een API)

25

Automated Provisioning: toolsOrchestratie: XL Release Configuratie management: Microsoft DSC Scripting taal: Powershell 4 Logging en monitoring: Logstash en Kibana Versiebeheer: SVN

26

Automated Provisioning

27

XL Release

Loadbalancers

Servers

Databases

Logstash/Kibana

Microsoft DSC

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 procesElimineer 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 learnedEerste stap: huidige proces modelleren in XL Release Handmatige stappen één voor één automatiseren Stabiele infrastructuur vereiste! Neem de organisatie mee

33

ResultaatDoelstellingen gehaald Stabielere, gelijke omgevingen Mindset verandering - automatiseer alles - root cause analysis - continuous improvement

34

ToekomstNu: 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

+

Datacenter Automation Experts Containers, containers, containers! Technologie: - Docker - Mesos - Kubernetes - CoreOS - Service Discovery

Check http://nauts.io

36

Nauts

De container

37

Applicatie

Middleware

Old-school Continuous Delivery

38

Continuous Delivery pipelineCode

Servers

integratiebouw test

deploy

Middleware

Containers???

39

Docker Hub

Code

Generieke infra

integratiebouw

contain

erize

Continuous Delivery pipeline

Base container

test

Cloud

VoordelenCode & 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 doneData 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?

42

btichelaar@xebia.com

Recommended