43
The Crafty Consultant’s Guide to … Craftily Consulting in DevOps Daniel Bryant Principal Consultant, OpenCredo [email protected] @danielbryantuk

LJC 2015 "The Crafty Consultants Guide to DevOps"

Embed Size (px)

Citation preview

The Crafty Consultant’s Guide to …Craftily Consulting in DevOps

Daniel BryantPrincipal Consultant, OpenCredo

[email protected]@danielbryantuk

Tonight

• A tale of two parts…

• The Crafty Consultant’s take on DevOps

– Disclaimer – this is not how I actually consult!

• DevOps in real world!

– An overview

27/02/2015 @danielbryantuk

Who Am I?

• London Java Community Associate

• Adopt OpenJDK and JSR

• InfoQ Editor and DZone MVB

27/02/2015 @danielbryantuk

• Principal Consultant at OpenCredo

Agile transformations

DevOps methodologies

Microservices and Cloud

The Crafty Consulting Guide to Craftily Consulting in DevOps

Crafty Consulting Ltd.

- Not a genuine company! -- A satirical guide to DevOps -

Crafty slides hidden…

(as I’m going to reuse them!)

End of Part One…

…now let’s look at the real world of DevOps

27/02/2015 @danielbryantuk

DevOps: The Motivations

• Improve flow

• Build, measure, learn

• Accelerate development

• Automate QA

• Empower Operations

• Visibility

• Antifragility Jfokus 2015: 21st Century Software Delivery

(bit.ly/1JzlY6d)

27/02/2015 @danielbryantuk

Breaking Down Silos

Dev QA Ops

Hand-off delaysHand-off delays

Slow feedback Slow feedback

Lack of cohesion, shared understanding and joint accountability

27/02/2015 @danielbryantuk

Being agile is a prerequisite…

Organisational Challenges

• Delivering value continuously– Fear of failure

• Ownership and accountability– The DevOps team antipattern?

– Culture, support, innovation

• Complex systems– Failure should lead to enquiry, not blame

27/02/2015 @danielbryantuk

That’s the organisation…

…what about the tech?

27/02/2015 @danielbryantuk

Continuous Integration

• Goals

– Remove integration problems

– Avoid back-tracking

– Automated repeatable build

• Approach

– Determine branching strategy

– Create and follow processes

– Create a build pipeline

27/02/2015 @danielbryantuk

Build Pipeline

27/02/2015 @danielbryantuk

Example Build Pipeline

• Component Build

– Compile

– Unit Tests (surefire)

– Integration Tests (failsafe)

• Deployment onto QA Cloud

– Python Scripts + Chef to provision

– Verify success using Python

27/02/2015 @danielbryantuk

Example Build Pipeline

• Acceptance Tests– Cucumber (and Selenium)

• Performance Tests– Jmeter + Jenkins performance plugin

– Make sure environment is realistic!!

• Live Deployment?

27/02/2015 @danielbryantuk

Diving into the details…

27/02/2015 @danielbryantuk

Local Development

27/02/2015 @danielbryantuk

27/02/2015 @danielbryantuk

Local Development

• Goals– ‘One click’ setup

– Dev/Prod parity

– Easy testing (pre-canned data, service virtualisation)

• Tools– Sprout, Boxen, Homebrew, provisioning

– VMs (Vagrant), Docker (Fig)

– DbUnit, VCR, Wiremock

27/02/2015 @danielbryantuk

Provisioning

• Goals– Automated reliable environment build

– Treat servers as cattle, not pets

– Immutable infrastructure

• Tools– Puppet, chef, SaltStack, Ansible

– Packer.io, Veewee, Aminator

– Terraform, AWS Cloudformation

27/02/2015 @danielbryantuk

Testing

27/02/2015 @danielbryantuk

27/02/2015 @danielbryantuk

Testing

• Goals– Automated reliable testing

– Functional, cross-functional (NFR) covered

– Free QA team for exploratory/requirements

• Tools– Serenity BDD, Cucumber, JBehave, Spock

– Saboteur/Wiremock (bit.ly/1tU6wZj)

– JMeter, Gatling (bit.ly/1JIvOCI)

27/02/2015 @danielbryantuk

Serenity BDD

27/02/2015 @danielbryantuk

Serenity BDD

27/02/2015 @danielbryantuk

Visibility

27/02/2015 @danielbryantuk

Logging

• Goals

– Audit system/application processes

– Assist debugging

– Single point of reference (centralised)

• Tools

– Logstash, fluentd, flume

– Kibana (ELK Stack)

27/02/2015 @danielbryantuk

Kibana

27/02/2015 @danielbryantuk

Monitoring

• Goals

– Application/system-level metrics

– ‘Birds eye view’ dashboards

• Tools

– Codahale Metrics, Netflix Servo

– Graphite, InfluxDB, OpenTSDB

– Grafana, dashing.io

27/02/2015 @danielbryantuk

27/02/2015 @danielbryantuk

27/02/2015 @danielbryantuk

27/02/2015 @danielbryantuk

Alerting

• Goals– You know of problems before users

– Don’t turn a crisis into a drama

• Tools– Nagios, Zabbix, Sensu, Pagerduty

• Process– Have one, follow it, retrospect (root cause)

27/02/2015 @danielbryantuk

Putting it all Together…

27/02/2015 @danielbryantuk

Releases

• Goals– Deterministic deployment

– Reliable rollout and rollback (or fix-forward)

– Separate release from deployment

• Processes– Deploy with rolling upgrade, blue/green, canary

– Release with feature flags

– Two phase data migrations

27/02/2015 @danielbryantuk

Debugging DevOps

• Goals

– Core skills throughout team

– Appropriate tools

– Document (and follow) processes

• Tools

– grep, top, vmstat, netstat, tcpdump

– jps, jstat, jmap, jhat

27/02/2015 @danielbryantuk

The Future

• Portable application deployment– Docker and Rocket

• The operating system reinvented– CoreOS, Project Atomic, Ubuntu Snappy

• Modern cluster management– Providing a kernel for the data center

– Mesos, Kubernetes, Fleet, fabric8

27/02/2015 @danielbryantuk

The Future is Layered…

27/02/2015 @danielbryantuk

twitter.com/gabrtv/status/539805332432637952

In Summary…

27/02/2015 @danielbryantuk

DevOps: The Motivations

• Improve flow

• Build, measure, learn

• Accelerate development

• Automate QA

• Empower Operations

• Visibility

• Antifragility Jfokus 2015: 21st Century Software Delivery

(bit.ly/1JzlY6d)

27/02/2015 @danielbryantuk

Bu-Dev-QA-Ops…

27/02/2015 @danielbryantuk

Thanks for Listening!

Comments and feedback are welcomed…

[email protected]

@danielbryantuk

Thanks:

27/02/2015 @danielbryantuk

Devoxx UK Conference

• 2014 “Moving to a DevOps Mode” bit.ly/1wdkh8K

– Daniel Bryant, Steve Poole

• Great DevOps content

• Get your tickets! www.devoxx.co.uk

– Tracks and content for every interest!

27/02/2015 @danielbryantuk

Further Inspiration #shamlesspromotion

• Cloud news

– www.infoq.com/author/Daniel-Bryant

• Code and opinion

– java.dzone.com/users/daniel-bryant-uk

• Microservices

– www.voxxed.com/blog/author/danielbryantuk

27/02/2015 @danielbryantuk