Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler”...

57
Sometimes Tools Matter John E. Vincent DevOpsDays Goteborg 2011

Transcript of Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler”...

Page 1: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Sometimes Tools Matter

John E. VincentDevOpsDays Goteborg 2011

Page 2: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

We all know about DevOps

Page 3: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

We all know about DevOps

I R DEV!I R OPS!

Page 4: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

So what's the big deal?

Page 5: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

“With XXXXX you are be able to do easily common task on your local or remote machine. The aim of XXXXX is to become the unique and universal tool language that permit you to make your own brew, apt-get or yum package, same

syntax for all your machine.”

Page 6: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

“With XXXXX you are be able to do easily common task on your local or remote machine. The aim of XXXXX is to become the unique and universal tool language that permit you to make your own brew, apt-get or yum package, same

syntax for all your machine.”

Not Puppet Not Chef

Not CFengine

Not Capistrano

Not FabricNot DeployML

Page 7: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

YANFT(yet another f*ing tool)

Page 8: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

We're doing something wrong.Something is missing.

Page 9: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

I'll be over here with Capistrano, kthx

You just need to write a Chef recipe and ….

Page 10: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

You can't solve cultural issues with tools

Page 11: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

You can't solve cultural issues with toolsor can you?

Page 12: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Some Issues

● Repository mismatch● Different languages● Volatile configuration● Visibility● Sensitive information● Testability● Packaging

Page 13: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Caveats and Comments

● No single tool is going to solve all your problems – sorry.

● You may have already heard of some of these tools.

● You will likely have to “mold” some of these tools to fit your environment

● The tool itself is not the point, it is the end result● I don't have all the answers...

Page 14: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Impedance mismatches

Page 15: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Sample Shop

● Operations – Puppet, EC2● Development – Maven, Spring● War files● Spring properties files● Metric assloads of XML● Database changes

Page 16: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Issues

● Operations repository isn't application repository● Developers need to test locally during development● Properties files are artifacts● Some settings are environment specific● Some settings are “sensitive”● How do new settings get in CM?● Where do database changes fit?● What about the rest of the business?

Page 17: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Know your Enemy

Page 18: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Know your Enemy

This sandwich kicked my ass.

Page 19: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Know your Enemy

This sandwich kicked my assbecause I didn't know my enemy

Page 20: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

The competition isn't between “devops” tools. It's between devops and “shell scripts

covered in meat sauce”(with apologies to @littleidea)

Page 21: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

“shell scripts covered in meat sauce” == inertia

Page 22: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Configuration

Page 23: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Configuration Competition

● XML files (unless you run bcfg2)● Key/Value property files (.ini style files)● YAML● JSON● Hard coded “stuff”● My-effing-SQL, Mongo-effing-DB

All of these things are “simpler” to understand.

Page 24: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Configuration Champions

● ZooKeeper, Nesoi, Noah

● Moves volatile configuration outside of application

● Can be populated by both operations and development*

● Service discovery

● No immediate need to learn a new DSL/Language

● Can still control access*

● Don't underestimate the power of environment variables

● You still need “proper” configuration management

Page 25: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Packaging

Page 26: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Packaging Protagonists

● War files● Lein, Maven/Ivy, Rubygems, Agner, CPAN, Pypi● RVM● Homebrew

Not always simpler to understand but built into the community.

Page 27: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Packaging Princes

● FPM, brew2deb, fpm-cookery● Makes building OS packages “painless”● OS packages have value (rollback, versioning,

validation)● Need a single artifact that can be deployed in

all environments

Page 28: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Development Environments

Page 29: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Development Defeat

● Windows/OSX for development, Linux/Solaris for production

● QA different than Production● Different versions of critical libraries, jars, gems

whatever● Exploded war files vs. Packaged war files

“Works on my machine”

Page 30: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Development Dreams

● Vagrant, Veewee, Whirr● Provides “production” in a box● Developers should be “deploying” locally● Operations needs to make modules, manifests,

cookbooks (whatever) flexible

This is one of the hardest to accomplish

Page 31: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Visibility

Page 32: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Visibility Villains

● uptime, *top, iostat, vmstat, sar*● ssh● tail● Host Obsession Disorder

Remember who the competition is...

Page 33: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Visibility Victors - part 1

● Statsd, Graphite, Graylog2, Logstash● ruby-metrics, codahale metrics for JVM● “If it moves, graph it”● Disk is “cheap”● Dashboards are the bomb. Become one with

information radiators.● Logstash can pipe the shit out of EVERYTHING● You don't know what you don't need until you know what

you have● Overcompensate initially (but don't over do it!)

Page 34: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Visibility Victors - part 2

● Jenkins, Rundeck, MCollective● Hosts don't matter, only services● Sometimes you still need to get on a specific

host....to reprovision it.● Wrap the access for auditing and accountability● DevOps is not about giving root access to

developers● The “myth” of security.

Page 35: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

The “other” stuff

Page 36: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Shitty Stuff

● Manual database migrations● Rollbacks● The myth of the sensitive

Page 37: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Smart Stuff

● Flyway, Liquibase, Rails migrations● Consider NoSQL/Schema-less stores● Roll forward. Never roll back.● You can never truly roll back anyway● “Sensitive” data is a myth (for some values of

sensitive)

Page 38: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

There is, however, ONE tool that can solve almost every technological and cultural

problem

Page 39: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks
Page 40: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Just kidding!(sort of)

Page 41: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

This is the point where you realize I've duped you

Page 42: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

You are a tool

Page 43: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

You are THE tool

Page 44: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

A tale of two tools

Page 45: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

This is Kelsey

Page 46: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Kelsey's Problem

● Operations used Puppet with Cobbler as ENC● Application configuration was in ERB templates

managed by Puppet● Cultural issues ruled out development actually

managing the templates● System of Record was Cobbler

Page 47: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Kelsey's Solution

● Programming motherf**er● Learned some Java (in a week)● Wrote some classes, built some jars● Delivered an XML-RPC library that

development could use to query Cobbler for information

Page 48: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

This is Jordan

Page 49: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Jordan's Problem

● Everyone has their own effing packaging format● Distributions suck● Debs suck to build● RPMS suck moderately less to build

Page 50: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Jordan's Solution

● Hate Driven Development● Wrote FPM (eFfing package manager)● Alien done right● Converts debs, rpms, pypi, gems, compiled

directories to native distro package format

Page 51: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Side note: If you ever say “I wonder if someone has done X” stop at the “I” and go to

github.com/jordansissel

Page 52: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Real Talk

● Step outside your comfort zone● Be a technologist not a specialist● SysAdmins: Learn to write some code.

Seriously.● Developers: Learn the OS. Seriously.● Everyone: Stop blaming other people● Software can help ease communication but

only you can prevent forest fires.

Page 53: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Go from this....

Page 54: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

and this

Page 55: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

to this

Page 56: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Thank You!

Page 57: Sometimes Tools Matter - DevOpsMy-effing-SQL, Mongo-effing-DB All of these things are “simpler” to understand. Configuration Champions ... Manual database migrations Rollbacks

Keep in touch!

● @lusis - twitter● lusis – github● John Vincent –

linkedin● blog.lusis.org● [email protected]