an agile journey - scania connected services at meetup go agile - stockholm (2015-08-12)

44
An agile journey Pitfalls and working practices Anders Lundsgård Scania Connected Services Go Agile! – Stockholm, 2015-08-12

Upload: anders-lundsgard

Post on 13-Apr-2017

1.008 views

Category:

Presentations & Public Speaking


3 download

TRANSCRIPT

Slide 1

An agile journeyPitfalls and working practicesAnders LundsgrdScania Connected ServicesGo Agile! Stockholm, 2015-08-12

1

Smartphone access to driver/vehicle data

Scania Connected Services

FMP

CommunicationServersWeb ServersMonitoring ReportEmail and SMS remiders/alarmsFleet Management PortalRemote Diagnosis Communicator 200Current status message every minute

Web Service InterfaceFMPMPMP50+ engineers2 TB of data

.NETAngularJS

2

About me

Anders LundsgrdSenior Engineer (Developer, Architect)Scania Connected Services@anderslundsgard200320082015Small Startup

Big Enterprise

Disclaimer #1

The opinions expressed in this presentation and on the following slides are solely those of the presenter and not necessarily those of Scania as a whole.

http://theagileadmin.com/what-is-devops/ 4

Disclaimer #2

Tools are only random selected. Scania does not value these more than those not mentioned.

http://theagileadmin.com/what-is-devops/ 5

Started to automate manual tasksShort summary20082015MAJOR release failure201020122009201120132014Started to do Continuous Integration (as we thought)

Started to do Continuous Integration (as we think )Integration Driven DevelopmentNo Projects!Continuous DeploymentDevOpsMicroservicesiOSS ModelAgile > ScrumNo test team!Best lead times from commit to Prod3-12 months1-2 month1-14 days

Why Agile?

http://theagileadmin.com/what-is-devops/ 7

Agile what?theleanstartup.com

http://www.infoq.com/news/2011/12/water-scrum-fall-is-the-norm/8

Agile what?

DevOpsAutomationTrust

Short iterations gives more quality: http://whatgivesquality.devops.vision9

Why Agile?65%

http://theagileexecutive.com/2010/01/11/standish-group-chaos-reports-revisited/10

Limit Work In Progress

CODEIN PRODPENDING CODENEWFEATURS

Value

Continuous Delivery

(Do not talk about the unicorns)

http://theagileadmin.com/what-is-devops/ 12

Continuous Delivery

Quality

What is CD?How to do CD?Who does CD?13

Waterfall

Water-Scrum-Fall

Water Defines the upfront project planning process that typically happens between IT and the business.Scrum An iterative and adaptive approach to achieving the overall plan that was first laid out in the 'Water' stage.Fall A controlled, infrequent production release cycle that is governed by organizational policy and infrastructure limitations.(From: http://www.infoq.com/news/2011/12/water-scrum-fall-is-the-norm)15

Cross functional teams

Water Defines the upfront project planning process that typically happens between IT and the business.Scrum An iterative and adaptive approach to achieving the overall plan that was first laid out in the 'Water' stage.Fall A controlled, infrequent production release cycle that is governed by organizational policy and infrastructure limitations.(From: http://www.infoq.com/news/2011/12/water-scrum-fall-is-the-norm)16

Continuous Integration

http://theagileadmin.com/what-is-devops/ 17

Continuous Integration

Quality over new featuresVersion everythingEveryone work on Main branchAutomationeverything

http://codingfast.devops.vision

You have still automation to do ifYou cant have a dev environment up and running with one single commandSomeone does manual regressionsPrepare test data on test environmentYou have to order a serverAnyone have to log in to a serverSomeone does manual installations

18

Automation Deployment Pipeline

Version ControlPull & Push several times a day

Continuous Integration Server- Build- Test- PackageDeploy ServerTarget Servers(Dev, Staging, Prod)

Version EverythingCodeTestsConfigurationDatabaseInfrastructure

Feature BranchDev Branch #1MainRelease Branch #1Dev Branch #2

Feature ToggleMain

GUIBusiness LogicDatabase

Release != Deploy

One appliance, one database table with one column, 0.01 % of all users, thanks to feature toggles.@auriorai

Always On

DB

Web1Web2Load balancer1. Add new schema2. Write to both schemas3. Backfill historical data4. Read from new schema5. Remove writes to old schema6. Remove old schema

When do you have a Monolith?

GUIDatabaseInfraBusiness Logic

NetworkingStorageOSIntegrationMonolith

Service 1

Service 2

Service 5

Service 7

Service 8

Service 10

Service 12

Service 14

Service 3

Service 4

Service 6

Service 9

Service 11

Service 15Middleware

Service 13User InterfaceSecurityMonitoringEven with Continuous Integration. Fast delivery is hard with 50+ engineers and a large codebase.

All Infra needsUser Interface

Service 1

Service 2

Service 5

Service 7

Service 8

Service 10

Service 12

Service 14

Service 3

Service 4

Service 6

Service 9

Service 11

Service 15

Service 13Microservices

All Infra needsAll Infra needsAll Infra needsAll Infra needsAll Infra needsAll Infra needsAll Infra needsGUIDatabaseInfraBusiness LogicWhy Microservices?

Autonomous teamsBuild, Test, Deploy SPEED

Its a trade from code complexity to operational complexity

Martin Fowler: https://www.youtube.com/watch?v=wgdBVIX9ifAhttp://martinfowler.com/articles/microservices.html

Adrian Cockcroft:https://www.youtube.com/watch?v=nMTaS07i3jk&feature=youtu.be

Gene Keen, Randy Shouphttp://youtu.be/MRa21icSIQk43:00

Randy Shoup:http://gotocon.com/dl/goto-cph-sept-2014/slides/DeanWampler_and_EvaAndreasson_and_KevlinHenney_and_RandyShoup_WheresCaptainKirkChartingACourseThroughEnterpriseArchitecturePartI.pdf

28

Need for DevOps

I want change!!I want stability.

We at infra need to be an enabler for developers. Enable automatic deployments and roll-backs.

Creating tools/dashboards with relevant KPIs so that the developer can fast and easily see the consequences of a deployment.

- Mattias Jrnhll, Group manager Scania IT DevOps definition

http://theagileadmin.com/what-is-devops/ 30

ITOps

DevOps

Version ControlI need a new web site for my front end code

xxx

Feature TeamFeature TeamFeature TeamFeature Team

IntegrationOSWebMonitoringChange ManagementNetworkSecurity

Infra/OperationsGUIBusinessLogicDatabaseIn the pastDatabase

Level 1Level 2+3

Infrastructure As A ServiceInfra/Operations

Feature TeamFeature TeamFeature TeamFeature TeamGUIBusinessLogicDatabaseVirtual Machine Integration Network Change Management Database Monitoring

Forward

Infrastructure As A ServiceInfra/Operations

Feature TeamFeature TeamFeature TeamFeature TeamGUIBusinessLogicDatabaseVirtual Machine Web server Load Balancer Change Management Monitoring

You build it You run it!Infrastructure as codeCulturalTechnical

Database tests (FeatureToggle MS)

1. Create SQL Server2. Create empty database3. Run delta scripts

4. Run Integration tests5. Delete Server6. Result in Team City

Check-inWhy is this nice?No available is server required to run the testsEverything needed is created from source

3 awesome infra

11,6

What is Chaos Monkey?Chaos Monkey is a service which runs in the Amazon Web Services (AWS) that seeks out Auto Scaling Groups (ASGs) and terminates instances (virtual machines) per group. The software design is flexible enough to work with other cloud providers or instance groupings and can be enhanced to add that support. The service has a configurable schedule that, by default, runs on non-holiday weekdays between 9am and 3pm. In most cases, we have designed our applications to continue working when an instance goes offline, but in those special cases that they don't, we want to make sure there are people around to resolve and learn from any problems. With this in mind, Chaos Monkey only runs within a limited set of hours with the intent that engineers will be alert and able to respond.

Zerg demohttp://zerg.erlangonxen.org/38

http://zerg.erlangonxen.org

Autonomous Engineers(minimal handovers for fast time to market)

http://theagileadmin.com/what-is-devops/ 40

CodeTestDesignDeploy

IdeaOperate

How engineer centric is your company culture?

QuizWho is best suited to press the deploy button?

Inspired by

Martin FowlerJez HumbleAdrian CockcroftAgile ManifestoContinuous IntegrationContinuous DeliveryLean EnterpriseDevOpsMicroservices

Other inspirers: Eric Ries, Gene Kim, Randy Shoup, 43

Contact

Anders Lundsgrd [email protected]

@anderslundsgard - #DevOps, #NoEstimates