puppet camp europe 2011 hackability

71
Wireless Any “BvB Hotspot...” network New browser page User: bvbhotspot Password: berlag33 Friday, May 13, 2011

Upload: puppet-labs

Post on 10-May-2015

3.189 views

Category:

Technology


1 download

DESCRIPTION

Watch along with the video at https://www.youtube.com/watch?v=ag-bI5lr55s Luke Kanies, CEO and Founder of Puppet Labs, talks on "Making Puppet More Hackable" at PuppetCamp Europe '11, Amsterdam, Netherlands. Learn more: http://www.puppetlabs.com

TRANSCRIPT

Page 1: Puppet camp europe 2011   hackability

Wireless

• Any “BvB Hotspot...” network

• New browser page

• User: bvbhotspotPassword: berlag33

Friday, May 13, 2011

Page 2: Puppet camp europe 2011   hackability

pulabs

ppet

Friday, May 13, 2011

Page 3: Puppet camp europe 2011   hackability

Making Puppet More Hackable

Luke [email protected]

Friday, May 13, 2011

Page 4: Puppet camp europe 2011   hackability

QuestionAuthority

Friday, May 13, 2011

Page 5: Puppet camp europe 2011   hackability

Puppet Labs

Friday, May 13, 2011

Page 6: Puppet camp europe 2011   hackability

Puppet Labs•40 employees

Friday, May 13, 2011

Page 7: Puppet camp europe 2011   hackability

Puppet Labs•40 employees•Fantastic investors and board members

Friday, May 13, 2011

Page 8: Puppet camp europe 2011   hackability

Puppet Labs•40 employees•Fantastic investors and board members

•I’m still CEO

Friday, May 13, 2011

Page 9: Puppet camp europe 2011   hackability

Puppet 2.7

Friday, May 13, 2011

Page 10: Puppet camp europe 2011   hackability

Apache License

Friday, May 13, 2011

Page 11: Puppet camp europe 2011   hackability

FacesFriday, May 13, 2011

Page 12: Puppet camp europe 2011   hackability

StaticCompiler

Friday, May 13, 2011

Page 13: Puppet camp europe 2011   hackability

CertificateAPI

Friday, May 13, 2011

Page 14: Puppet camp europe 2011   hackability

DeterministicOrdering

For otherwise unrelated resources

Friday, May 13, 2011

Page 15: Puppet camp europe 2011   hackability

EnhancedGraph

ManagementFriday, May 13, 2011

Page 16: Puppet camp europe 2011   hackability

Puppet Enterprise

Friday, May 13, 2011

Page 17: Puppet camp europe 2011   hackability

Always based on full releases

Friday, May 13, 2011

Page 18: Puppet camp europe 2011   hackability

Looking for Partners

Friday, May 13, 2011

Page 19: Puppet camp europe 2011   hackability

PE 1.1 - 5/11

•MCollective•RHEL 4/5/6, SLES, Solaris

Friday, May 13, 2011

Page 20: Puppet camp europe 2011   hackability

PE 1.2 - 6/11

•Discovery•Provisioning

Friday, May 13, 2011

Page 21: Puppet camp europe 2011   hackability

Q3•Full Windows support•2.7 base•Change Lifecycle Management

Friday, May 13, 2011

Page 22: Puppet camp europe 2011   hackability

Faces, Hackability, and Marketing

Friday, May 13, 2011

Page 23: Puppet camp europe 2011   hackability

Puppet is different, but not in

straightforward ways

Friday, May 13, 2011

Page 24: Puppet camp europe 2011   hackability

AwkwardFriday, May 13, 2011

Page 25: Puppet camp europe 2011   hackability

I wanted to tell The Story of Why

Friday, May 13, 2011

Page 26: Puppet camp europe 2011   hackability

A bit of history: Cfengine

Friday, May 13, 2011

Page 27: Puppet camp europe 2011   hackability

I had no control•Stuck with whatever application logic it shipped with

•Core components were mandatory

Friday, May 13, 2011

Page 28: Puppet camp europe 2011   hackability

Do Not Question•Why is this file here?•What requires this package?•What will happen if I change this file?

•Do these classes conflict?

Friday, May 13, 2011

Page 29: Puppet camp europe 2011   hackability

Not Extensible

Friday, May 13, 2011

Page 30: Puppet camp europe 2011   hackability

“Puppet is Different”

Friday, May 13, 2011

Page 31: Puppet camp europe 2011   hackability

Easily extensible, everywhere

A quick count shows 10 kinds of extensibility

Friday, May 13, 2011

Page 32: Puppet camp europe 2011   hackability

The Puppet world•Facts•Resources•Catalogs•Edges•Events

Friday, May 13, 2011

Page 33: Puppet camp europe 2011   hackability

Questions can be asked of every artifact

• Is this file being managed?• What happens if I restart this service?• Who requires this package?• Did my service restart?• Were there any failures?

Friday, May 13, 2011

Page 34: Puppet camp europe 2011   hackability

Data > Code•Caching•Validation•Implementation Independence•Integration

Friday, May 13, 2011

Page 35: Puppet camp europe 2011   hackability

The Graph Matters

"Exec[createrepo-PM-RHEL5-noarch]"

"Yumrepo[PM-RHEL5-x86_64]"

"Yumrepo[PM-RHEL5-noarch]"

"Package[postgresql-server]"

"Package[thttpd]"

"File[/var/www/thttpd/html/yum-PM-RHEL5-noarch]""File[/var/www/thttpd/html/yum-PM-RHEL5-x86_64]"

"Exec[rsync-rpmdir-PM-RHEL5-x86_64]"

"Exec[createrepo-PM-RHEL5-x86_64]"

"Postgres::Role[puppet]"

"Exec[rsync-rpmdir-PM-RHEL5-noarch]"

Friday, May 13, 2011

Page 36: Puppet camp europe 2011   hackability

An Aside: The Competition

Friday, May 13, 2011

Page 37: Puppet camp europe 2011   hackability

AFAIK, Puppet is the only tool that provides:

• A complete list of every resource managed in your entire infrastructure

• A complete list of every dependency in your entire infrastructure

• A complete list of every single change that’s ever happened in your entire infrastructure

• With full run simulation and inspection

...all in a queryable, storable, cacheable way

Friday, May 13, 2011

Page 38: Puppet camp europe 2011   hackability

Progress?Cfengine

Puppet•Declarative•Only data on clients, no code•Explicit dependencies

Chef

•Imperative•Code runs on client•Implicit dependencies

•Declarative•Code runs on client•Implicit dependencies

Friday, May 13, 2011

Page 39: Puppet camp europe 2011   hackability

How do we talk about this? Market this?

Friday, May 13, 2011

Page 40: Puppet camp europe 2011   hackability

“Puppet is Model-Driven”

Friday, May 13, 2011

Page 41: Puppet camp europe 2011   hackability

Compile Apply

Code

Catalog

Report

Procedural

Friday, May 13, 2011

Page 42: Puppet camp europe 2011   hackability

Code Catalog ReportCompile Apply

Model-driven

It’s the artifacts that matter

Friday, May 13, 2011

Page 43: Puppet camp europe 2011   hackability

Code Catalog ReportCompile Apply

Policy Complian RemedyCMDB

LDAP CMDB Nagios

Friday, May 13, 2011

Page 44: Puppet camp europe 2011   hackability

No one knows what ‘model driven’

means

Friday, May 13, 2011

Page 45: Puppet camp europe 2011   hackability

“Puppet is hackable”

Props to Nick Fagerland

Friday, May 13, 2011

Page 46: Puppet camp europe 2011   hackability

But it wasn’t really true

Friday, May 13, 2011

Page 47: Puppet camp europe 2011   hackability

You could *program* it, but not hack it like

a sysadmin would

Friday, May 13, 2011

Page 48: Puppet camp europe 2011   hackability

Really: Encapsulated, modular and data-

driven

Friday, May 13, 2011

Page 49: Puppet camp europe 2011   hackability

Unfortunately the applications hard-code

our logic•Download plugins•Upload Facts•Download Catalog•Apply Catalog•Send Report

Friday, May 13, 2011

Page 50: Puppet camp europe 2011   hackability

Other application world-views exist

• Only update catalogs during maintenance windows

• Push catalog updates• Send fact updates 10x as often as puppet runs• Combine multiple catalogs on the client side

and run them together• Compile catalogs for hundreds of hosts and

compare them• Manually view catalog diffs before deploying

Friday, May 13, 2011

Page 51: Puppet camp europe 2011   hackability

It doesn’t make sense to extend the core apps

with this logic

Friday, May 13, 2011

Page 52: Puppet camp europe 2011   hackability

And doing it yourself is too hard with current

tools

Friday, May 13, 2011

Page 53: Puppet camp europe 2011   hackability

So we should expose everything and let you build what you want

Friday, May 13, 2011

Page 54: Puppet camp europe 2011   hackability

Functions•Compiler•Transactions•Network•Indirector•Parser•RAL

Friday, May 13, 2011

Page 55: Puppet camp europe 2011   hackability

Data•Facts•Catalog•Reports•Resource Types (AST and RAL)•Nodes•Certificates

Friday, May 13, 2011

Page 56: Puppet camp europe 2011   hackability

Interfaces

Friday, May 13, 2011

Page 57: Puppet camp europe 2011   hackability

Puppet Faces

Friday, May 13, 2011

Page 58: Puppet camp europe 2011   hackability

A framework for exposing, combining,

and extending core Puppet functions and

data types

Friday, May 13, 2011

Page 59: Puppet camp europe 2011   hackability

A collection of Faces that does this in Ruby

and on the CLI

Friday, May 13, 2011

Page 60: Puppet camp europe 2011   hackability

Good: It directly exposes Puppet internals in a

hackable way

Friday, May 13, 2011

Page 61: Puppet camp europe 2011   hackability

Bad: It directly exposes Puppet internals

Friday, May 13, 2011

Page 62: Puppet camp europe 2011   hackability

Examples• puppet catalog find <host>• puppet facts upload• puppet certificate sign <host>• puppet file find <sum>

Friday, May 13, 2011

Page 63: Puppet camp europe 2011   hackability

Easily extensible• puppet config info <name>• puppet catalog select <host> <type>• puppet file diff <sum> <sum>• puppet node clean <name>• puppet catalog diff <host> <host>

Friday, May 13, 2011

Page 64: Puppet camp europe 2011   hackability

What we’re working on

Friday, May 13, 2011

Page 65: Puppet camp europe 2011   hackability

Team and Community

Friday, May 13, 2011

Page 66: Puppet camp europe 2011   hackability

Flattening the on-ramp

Friday, May 13, 2011

Page 67: Puppet camp europe 2011   hackability

Ad-hocTooling

Friday, May 13, 2011

Page 68: Puppet camp europe 2011   hackability

Cross-NodeApplications

Friday, May 13, 2011

Page 69: Puppet camp europe 2011   hackability

Databases

Friday, May 13, 2011

Page 70: Puppet camp europe 2011   hackability

ChangeLifecycle

Friday, May 13, 2011

Page 71: Puppet camp europe 2011   hackability

Questions?

Friday, May 13, 2011