Transcript
Page 1: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people

Daniel Bryant @danielbryantuk

Steve Poole@spoole167

Page 2: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

On the Previous Episode of Devoxx UK…

• 2014 “Moving to DevOps: Easy, Hard or Just Plain Terrifying”

• DevOps is about extending agility across your IT org

• Breaking down the silos is vital

• The business needs to react to the industry change– DevOps, cloud and containers

Page 3: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Today

• Microservices are (operationally/conceptually) distributed systems

• The application/infrastructure ‘platform’ is still not fully baked

• Think “Safety first”– Security, networking cyber criminals

• DevOps is (still) all about the organisation, people and processes

Page 4: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

I (we) am the one who knocks…Steve Poole

IBM Developer

@spoole167

Daniel Bryant

Chief (Mad) Scientist, OpenCredo

@danielbryantuk

Making Java Real Since Version 0.9

Open Source Advocate

DevOps Practitioner (whatever that means!)

Driving Change

“Biz-dev-QA-ops”

Leading change in organisations

Experience of Docker, k8s, Go, Java

InfoQ, DZone, Voxxed contributor

Page 5: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Part 1- Painful Lessons…

https

://w

ww

.flic

kr.c

om/p

hoto

s/sa

rahm

stew

art/

Page 6: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

All I hear is microservices…

“In computing, microservices is a software

architecture style in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs. These

services are small, highly decoupled and focus on doing a small task,

facilitating a modular approach to system-building.”

https://en.wikipedia.org/wiki/Microservices

Page 7: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Microservices

Turn applications into small, independent, highly decoupled, modular services

https://www.flickr.com/photos/daikrieg/

You want to make my life more complicated?

Page 8: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

https

://w

ww

.flic

kr.c

om/p

hoto

s/ta

hini

/

Where’s the problem?

Page 9: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

browserApp A V1.0

Database

browser

You

Your Customers

server

Data Centre

Page 10: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

browserLoad balancer

App A V2.0

App AV2.0

App BV1.0

Database

browserDatabase

Ops

Page 11: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

browserLoad balancer

App A V2.0

App AV2.0

App BV1.0

Database

browserDatabase

browser

App A V2.0

App AV2.0

App BV1.0

browser

Page 12: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

browser

Load balancer

App A V2.0

App AV2.0

App BV1.0

Database

Database

browser App A V2.0

App AV2.0

App BV1.0

browser

browser

browser

browser

browser

Load balancer

Database

Page 13: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

browser

Load balancer

App A V2.1

App AV2.1

App BV1.0

Database

Database

browser App A V2.1

App AV2.1

App BV1.0

browser

browser

browser

browser

browser

Load balancer

Database

Page 14: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

A simple upgrade or a major impact?

lost revenue or going out of business?

Page 15: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

https

://w

ww

.flic

kr.c

om/p

hoto

s/24

1510

87@

N00

/

What lessons have we learnt?

Sharing data stores sounds like it saves effort but introduces cohesion between applications

Big-bang versioning of applications means putting existing unchanged use cases at risk

Scaling is challenging when you try to duplicate whole systems

Infrastructure – it’s much more important than we initially realized

Page 16: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Part 2 - Build Your Own Platform?

Page 17: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Adrian Cockcroft’s (@adrianco) Thoughts

Page 18: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

http://wikibon.com/wp-content/uploads/container_implementations.png

Technology Choices

Page 19: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

05/03/2023 @danielbryantuk

Page 20: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

What’s Wrong with PaaS?

Page 24: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Aggregation: Sick Cattle, Not Sick Pets

Page 25: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

05/03/2023 @danielbryantuk

Distributed Tracing

• Correlation: github.com/daniel-bryant-uk/correlation-id-async• MDC logging: logback.qos.ch/manual/mdc.html • OpenZipkin: github.com/openzipkin

Page 26: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Looking Inside the Container

Page 27: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Common Java / Docker Issues• No disk space for docker logging– Increase disk space (move logs to mount)

• Restricting resources to only Xmx memory limit– Set memory limit = Heap (Xmx) + Metaspace + JVM

• Security or crypto issues as /dev/random limited in containers– -Djava.security.egd=file:/dev/urandom

• See Chris Batey’s “The JVM and Docker” talk here at 15:00 today

Page 28: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Debugging Tools

• Java– jstat, jstack, jmap– “5 things you didn’t know”

• OS– Top, htop, ps, free, df –h,

vmstat,iostat – /proc filesystem meminfo and

vmstat not cgroup aware!– Use sysdig

www.joyent.com/blog/linux-performance-analysis-and-tools-brendan-gregg-s-talk-at-scale-11x

Page 29: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

05/03/2023 @danielbryantuk

Problems?

• Rob Ewaschuk’s “Philosophy on Alerting”

• Brendan Gregg’s USE method – “check utilization, saturation, and errors.”

• “DevOps Troubleshooting”– Kyle Rankin

Page 30: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Part 3 – Safety first

Page 31: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

https

://w

ww

.flic

kr.c

om/p

hoto

s/m

iriam

delir

ium

/

Tooling – what’s left to do?

Page 32: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Dynamic DevelopmentCapacity

Predefined static VM’s LPARs etc

OpenStack Cloud(s)

Docker Cloud

Infrastructure as CodeChef, Puppet, UCD …

OS

Infra On Prem Data Centres

Cloud ProvidersSoftLayer / Amazon etc

Config Containerized Applications

Continuous AvailabilityMesos etc

Deploy

Pipeline

Block Architecture of Hybrid Cloud Dev

SaaS

Primary Audience

GIT / Jenkins / Junit …. Selenium, Jmeter…

Application DIY

Page 33: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Dynamic DevelopmentCapacity

Predefined static VM’s LPARs etc

OpenStack Cloud(s)

Docker Cloud

Infrastructure as CodeChef, Puppet, UCD …

OS

Infra On Prem Data Centres Cloud ProvidersSoftLayer / Amazon etc

Config Containerized Applications

Continuous AvailabilityMesos etc

Deploy

Pipeline

Block Architecture of Hybrid Cloud Dev

SaaS

Primary Audience

GIT / Jenkins / Junit …. Selenium, Jmeter…

Other static hosts (‘BYOD’)

DIY

Application DIY

Page 34: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Dynamic DevelopmentCapacity

Predefined static VM’s LPARs etc

OpenStack Cloud(s)

Docker Cloud

Infrastructure as CodeChef, Puppet, UCD …

OS

Infra On Prem Data Centres Cloud ProvidersSoftLayer / Amazon etc

Config Containerized Applications

Continuous AvailabilityMesos etc

Deploy

Pipeline

Block Architecture of Hybrid Cloud Dev

SaaS

Primary Audience

GIT / Jenkins / Junit …. Selenium, Jmeter…

Other static hosts (‘BYOD’)

DIY

Compliance / Security ContainersVM Images

Application DIY

Page 35: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Dynamic DevelopmentCapacity

Predefined static VM’s LPARs etc

OpenStack Cloud(s)

Docker Cloud

Infrastructure as CodeChef, Puppet, UCD …

OS

Infra On Prem Data Centres Cloud ProvidersSoftLayer / Amazon etc

Config Containerized Applications

Continuous AvailabilityMesos etc

Deploy

Pipeline

Block Architecture of Hybrid Cloud Dev

SaaS

Primary Audience

GIT / Jenkins / Junit …. Selenium, Jmeter…

Other static hosts (‘BYOD’)

DIY

Compliance / Security ContainersVM Images

Application DIY

Page 36: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

You do understand about security and compliance right?

https

://w

ww

.flic

kr.c

om/p

hoto

s/ad

ulau

/

Page 37: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Where’s your data?

Legal restrictions on data locationVary by country even within the EU. Different rules depending on types of data

You already know this?

But now you’re putting the data in the cloud.

DO YOU understand where its goingCan you control / manage / audit the situation?

Now it’s your problem.

Having fun finding tools to help

Page 38: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

How’s your security knowledge?• Again – now it’s your problem

– Your code is running in the cloud– You created the services & the containers– Are they secure?– How do you test?– Are you sure?– Are those web services you’re buying secure?

• How much do you know about networking?– Not enough…

• Cyber crime is big business – you will get targeted. https://www.flickr.com/photos/61423903@N06/

Page 39: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

“Organized Cybercrime is the most profitable type of crime”

• Cybercrime is estimated to be worth 445 Billion Dollars a Year

• In 2013 the United Nations Office on Drugs and Crime (UNODC) estimated globally the illicit drug trade was worth 435 Billion Dollars

• Guess which one has the least risk to the criminal?• Guess which is growing the fastest?• Guess which one is the hardest to prosecute?

• Guess which one is predicted to reach 2100 Billion Dollars by 2019?

Page 40: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Talk to your Ops team

• They are your best friends.– They know about security and networking. • You need to know too

– They know (some) of the answers• It’s a whole new domain for you

– It’s not a new problem for them• Time to learn

Page 41: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Part 4 - Sharing is Caring

Page 42: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

The Results of the Survey Are In…

• Puppet Labs 2015 State of DevOps– Available: puppetlabs.com/2015-devops-report

• Accelerates deployment– High performers 30x more deploys– Code committed to production 200x faster

• Prevents failures and streamlines recovery– High performers 60x fewer failures– Recovery 168x faster

Page 43: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

DevOps Topologies (Bad)

• DevOps Anti-Types– Dev and Ops– DevOps Silo– No Ops Needed– Tools Team– Sysadmin– Embedded Ops

http://web.devopstopologies.com/@matthewpskelton

Page 44: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

DevOps Topologies (Good)• DevOps Team Topologies

– Dev+Ops– Shared Ops– Ops as IaaS– DevOps-as-a-Service– Teamp DevOps Team– DevOps Evangelists– SRE Team– Container-Driven– DB Capability

http://web.devopstopologies.com/@matthewpskelton

Page 45: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

The ’Spine Model’ – The Right Conversations• Effective conversations make for effective

collaboration

• People get stuck in a dilemma where equally plausible options are available

• “Going up the Spine” breaks deadlock

• It’s a TOOL Problem– As a species, we have always been Tool users

and makers. – We use _____ to get our work done http://spinemodel.info/explanation/introduction/

Page 46: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

DevOps != Tooling• PRACTICES before Tools

– Decide on the Practices that the tools are there to support– We do _____ to create value

• PRINCIPLES before Practices– Decide on the Principles to measure those Practices against.– We leverage _____ to change the system

• VALUES before Principles– Make as explicit as possible the Values at play in the system.– We optimise for _____

• NEEDS before Values– It all starts at Needs. Why does this system exist in the first

place?– We are here to satisfy _____

http://spinemodel.info/explanation/introduction/

Page 47: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

05/03/2023 @danielbryantuk

When Things (Inevitably) Go Wrong

Page 48: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

05/03/2023 @danielbryantuk

Optimise for Learning (and Feedback)

www.infoq.com/news/2015/06/too-big-to-fail

Page 49: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Part 5 – Conclusions

Page 50: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Key Messages• Microservices force you to know about distributed systems

– You need to learn how to design and run applications in a new way

• The application/infrastructure ‘platform’ stack is still not fully baked– Essentials are CI/CD, health checks, logging and monitoring

• Think “Safety first”– It’s a wild world out there - security, networking cyber criminals

• Make your ops team your best friend– DevOps is all about the organisation, people and processes

Page 51: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Thanks – Questions?

Daniel Bryant@danielbryantuk

Steve Poole@spoole167

Page 52: DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh yeah, and people"

Bonus: Containers Are Not Immutable (By Default)

• Containers can be as susceptible to configuration drift as VMs/bare metal– This surprises many people

• Suggestions– docker run --read-only– docker run --tmpfs /tmp

• Gareth Rushgrove’s CraftConf talk– http://www.ustream.tv/recorded/86186490


Recommended