Telephone +44(0)1524 64544
Email: info(at)shadowcat.co.uk

Sat Dec 22 00:30:00 2012

Slides for the talk ddd at yapc-eu-2012

-

Distributed
Daemon
Discovery

-

So.

-

First, some
gratitude

-

I'm here on
behalf of
shadow.cat

-

This talk is
on behalf of
socialflow.com

-

Also, Robert
Sedlacek
(phaylon)
did loads of
the work

-

Thanks to all
of you for
putting up
with me.

-

Anyway ...

-

Distributed
Daemon
Discovery

-

What?

-

The
problem

-

Insufficiently
automated
infrastructure

-

Startup clients
are so much fun

-

They get
embarrassed

-

... that their
code is making
money

-

Shipping is
feature zero

-

Insufficiently
automated
infrastructure

-

First
step

-

Building a
big picture

-

Usual
approach

-

Log in to
server

-

Look around
server

-

Document
server

-

Eventually ...

-

Try and unify
documentation

-

Ok but

-

Humans
are
fallible

-

That's the
problem we're
trying to
solve here!

-

Manual solution
to a 
manual problem

-

CHEWBACCA!

-

Well what
else do
we do?

-

Write code
to find it
out for us!

-

Wait ...

-

How do we get
it onto the
remote machines?

-

Fully
automated
deployment!

-

... but we
don't have
that yet

-

*scrabbles
for plan B*

-

Object::Remote

-

  Object::Remote->connect('host');

-

  My::Class->new::on($conn);

-

ships the
class over
the wire

-

installation
not required

-

(see my
lightning
talk for
details)

-

So we can
run code

-

What do we
do with the
output?

-

Database?

-

I love
postgresql

-

But I'm going
to be adding
new things all
the time

-

MongoDB?

-

Trying to
minimise
configuration

-

internet
writeable
by default

-

goatse
by default

-

And anyway ...

-

I want to
grep stuff

-

Hmm.

-

I want to
diff stuff
too ...

-

git!

-

JSON
in git!

-

Trailing
commas

-

JSON->relaxed

-

JSON::Diffable

-

snapshot
trees

-

easy
peasy!

-

Interrogate
system

-

Snapshot
to git

-

Web::Simple
browser

-

I shall
show all

-

But first ...

-

sudo

-

flipping
sudo!

-

password
prompts

-

sudo -S

-

read stderr

-

Object::Remote
to send prompt
back to master

-

check for
correct output

-

WAIT

-

no output
when no
prompt

-

  perl -e 'print STDERR "GO!\n"'
       -e 'exec @ARGV'

-

mostly
works

-

"unexpected
line from
sudo"

-

go and
check ...

-

"We trust you have
received the usual
lecture from your
systems administrator"

-

FLIPPING
SUDO

-

Anyway ...

-

Time to
show you
some code

-

-

Thank You
IRC:mst
mst@shadowcat.co.uk
@shadowcat_mst