DevOps for Developers

Preview:

Citation preview

DevOpsfor Developers

#DesertCodeCamp @wfbutton

Promises of DevOpsFaster releases

More confidence Better failure detection

Higher resiliency Improved monitoring

#DesertCodeCamp @wfbutton

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

#DesertCodeCamp @wfbutton

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

To the cloud!

• Just needed manager’s CC

• Infinite access to servers

Cloud all the things!

#DesertCodeCamp @wfbutton

and then the bill came…Accounting was not pleased.

#DesertCodeCamp @wfbutton

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

#DesertCodeCamp @wfbutton

Use the tools:

AWS Cost Analyzer Billing Alerts

Heroku Dashboard

#DesertCodeCamp @wfbutton

and now everything is great…#DesertCodeCamp @wfbutton

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

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

#DesertCodeCamp @wfbutton

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

#DesertCodeCamp @wfbutton

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

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

Rule #3Infrastructure is code.

#DesertCodeCamp @wfbutton

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

MonitoringIt’s not just for disk space

or CPU or Memory…

(though those are important too!)

#DesertCodeCamp @wfbutton

Correlated EventsResponse time tagged with deploys

#DesertCodeCamp @wfbutton

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

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

Metrics Overload

What are your customers paying you for?

How do you measure that?

What are the dependencies?

#DesertCodeCamp @wfbutton

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

#DesertCodeCamp @wfbutton

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

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

Recommended