devops for developers

24
DevOps for Developers #DesertCodeCamp @wfbutton

Upload: will-button

Post on 16-Apr-2017

111 views

Category:

Software


0 download

TRANSCRIPT

Page 1: DevOps for Developers

DevOpsfor Developers

#DesertCodeCamp @wfbutton

Page 2: DevOps for Developers

Promises of DevOpsFaster releases

More confidence Better failure detection

Higher resiliency Improved monitoring

#DesertCodeCamp @wfbutton

Page 3: DevOps for Developers

Remember where we came from?…and where we don’t want to go back to!

#DesertCodeCamp @wfbutton

Page 4: DevOps for Developers

IT and Development were not aligned Provisioning hardware was slow and expensive

Changes were risky and hard to rollback

We’ll have that server ready for you next quarter.

#DesertCodeCamp @wfbutton

Page 5: DevOps for Developers

To the cloud!

• Just needed manager’s CC

• Infinite access to servers

Cloud all the things!

#DesertCodeCamp @wfbutton

Page 6: DevOps for Developers

and then the bill came…Accounting was not pleased.

#DesertCodeCamp @wfbutton

Page 7: DevOps for Developers

Rule #1Use what you need, but need what you use.

#DesertCodeCamp @wfbutton

Page 8: DevOps for Developers

Use the tools:

AWS Cost Analyzer Billing Alerts

Heroku Dashboard

#DesertCodeCamp @wfbutton

Page 9: DevOps for Developers

and now everything is great…#DesertCodeCamp @wfbutton

Page 10: DevOps for Developers

Managing Deployments

• Define the rules of production

• Who can push code (ideally, no one)

• Tests that must pass

• Rollbacks

• Change review boards suck (but sometimes are needed)

#DesertCodeCamp @wfbutton

Page 11: DevOps for Developers

Rule #2Thou shalt not touch production (by hand).

#DesertCodeCamp @wfbutton

Page 12: DevOps for Developers

Jenkins or CircleCI Define the workflow Triggered automatically Rules/Tests must pass No humans!

#DesertCodeCamp @wfbutton

Page 13: DevOps for Developers

Testing• Tests for your code

• Mandatory

• Minimum levels of test

• Server tests

• rspec for puppet

• Test Kitchen

• CI Tool requires passing tests

• API testing with jmeter

#DesertCodeCamp @wfbutton

Page 14: DevOps for Developers

Don’t you forget about me.• Configuration management

• Remember how we got here?

• IT does play a role

• …and it should be automated

• Chef/Puppet/Ansible/Salt

• Same rules:

• Tests/ Rollback/ Ephemeral

#DesertCodeCamp @wfbutton

Page 15: DevOps for Developers

Rule #3Infrastructure is code.

#DesertCodeCamp @wfbutton

Page 16: DevOps for Developers

From a Disaster Recovery View

• Find the most recent backup

• Pray that it’s good

• Build a new server

• Search Stack Overflow

• Test

• Search Stack Overflow

• Ask business what data they really need

• Update LinkedIn profile

• Deploy via CI

#DesertCodeCamp @wfbutton

Page 17: DevOps for Developers

MonitoringIt’s not just for disk space

or CPU or Memory…

(though those are important too!)

#DesertCodeCamp @wfbutton

Page 18: DevOps for Developers

Correlated EventsResponse time tagged with deploys

#DesertCodeCamp @wfbutton

Page 19: DevOps for Developers

Apdex Score• It’s a real thing

• Measure of response times against a threshold

• https://en.wikipedia.org/wiki/Apdex

• Satisfied: T or less

• Tolerating: >T, <= 4T

• Frustrating: >4T

#DesertCodeCamp @wfbutton

Page 20: DevOps for Developers

Things that don’t

Polling is great for this

TTL on metrics (Riemann)

Instrument alerts and fallbacks in code

The Art of Monitoring -James Turnbull

#DesertCodeCamp @wfbutton

Page 21: DevOps for Developers

Metrics Overload

What are your customers paying you for?

How do you measure that?

What are the dependencies?

#DesertCodeCamp @wfbutton

Page 22: DevOps for Developers

Rule #4If it’s important, measure it.

#DesertCodeCamp @wfbutton

Page 23: DevOps for Developers

Rules in Review

• Use what you need, but need what you use.

• Thou shalt not touch production (by hand).

• Infrastructure is code.

• If it’s important, measure it.

#DesertCodeCamp @wfbutton

Page 24: DevOps for Developers

Your Homework

• Pick a rule.

• Make some progress.

• Socialize.

• Iterate.

This is how you build culture, and

culture is really what DevOps is

about.

#DesertCodeCamp @wfbutton