Systems building-systems-a-puppet-story-19133

Post on 14-May-2015

635 views 0 download

Tags:

Transcript of Systems building-systems-a-puppet-story-19133

Systems Building SystemsA Puppet Story

What is Puppet? Language Parser

Client/Server

Resource Abstraction

A few other things...

LukeKaniesRecovering Sysadmin

One Goal:Revolutionize System Administration

What is a sysadmin?

Not Exactly Modern

Do tools have to suck?

Say What?!??

Everything the SameEverything Distinct

“Best Practices”

Don’t look at me... I wasn’t the last one to touch it...

SSH Cfengine ?

Bad product,hungry Luke

SSH Cfengine ?

SSH Cfengine ?

You can either easily manage complex systems at scale...

You can either easily manage complex systems at scale...

Or you can’t...

Who’s using Puppet?

“...at Google we're currently using Puppet

to manage close to 6,000 Macs, and it's likely our deployment

will expand dramatically beyond

that....”

Competitive Advantage

People are finally figuring out puppet and how it gets you

to the pub by 4pm. Note that I've been at this pub since

2pm.-- Jorge Castro

Enter Puppet...

Configuration Is Declarative Code

Semantics Matter

Reproducible

Shareable

Maintainable

Extensible

Developer Sysadmin

Developer Sysadmin

Three people

Programming SysAdmin

Low-level, non-portable Assembly commands

and files

Abstract, portable C* Resources

An Analogy

* For small values of abstract

Portable ResourcesThis:

Portable Resources

Becomes:

This:

Portable Resources

Becomes:

This:

Portable Resources

Becomes:

This:

Portable Resources

Becomes:

This:

Portable Resources

Becomes:

This:

Portable

23 package types

Users in NetInfo, useradd, pw

Support for Debian, Ubuntu, Red Hat, Solaris, OS X, Gentoo, SuSE, FreeBSD, and more

Debian

Debian

Red Hat

Debian

Red Hat

Package

Package

Configuration

Configuration should get modified after

package installation

Package

Service

Service should restart when

configuration changesConfiguration

Configuration should get modified after

package installation

Idempotence...

Idempotence...

Idempotence...

Describes the property of operations in mathematics and computer science which yield the same result after

the operation is applied multiple times.

Network Effects

puppetd in the cloud

Puppetmasterd

puppetdOS X puppetd

Linux

Code

Every Client:

Retrieve resource catalog from central server

Every Client:

Retrieve resource catalog from central server

Determine resource order

Every Client:

Retrieve resource catalog from central server

Determine resource order

Check each resource in turn, fixing if necessary

Every Client:

Retrieve resource catalog from central server

Determine resource order

Check each resource in turn, fixing if necessary

Rinse and repeat, every 30 minutes

Every Client:

Every Resource:

Every Resource:

Retrieve current state (e.g., by querying dpkg db or doing a stat)

Every Resource:

Retrieve current state (e.g., by querying dpkg db or doing a stat)

Compare to desired state

Every Resource:

Retrieve current state (e.g., by querying dpkg db or doing a stat)

Compare to desired state

Fix, if necessary (or just log)

Image from http://flickr.com/photos/pingnews/132543603/

Questions?

andrew@reductivelabs

twitter.com/littleidea