28
Puppet at Janrain James Loope

Puppet at janrain

Embed Size (px)

DESCRIPTION

James Loope, Janrain

Citation preview

Page 1: Puppet at janrain

Puppet at Janrain

James Loope

Page 2: Puppet at janrain

In the beginning...

Page 3: Puppet at janrain

Awesomeness

Page 4: Puppet at janrain

More awesomeness

Page 5: Puppet at janrain

Less awesome

Page 6: Puppet at janrain

Opposite of awesome

Page 7: Puppet at janrain

Totally awesome

Page 8: Puppet at janrain

Wagons Ho!

Page 9: Puppet at janrain

We're not in Kansas Anymore

Page 10: Puppet at janrain

On demand resources!

Features!

APIs!

Page 11: Puppet at janrain

Impermanence!

Competition!

APIs!

Page 12: Puppet at janrain

Sometimes you have to let go

it's not your puppy, it's just an instance

Page 13: Puppet at janrain

Persistence does not make it better

Entropy will get you in the end

Page 14: Puppet at janrain

Do it right the first time, make it repeatable

Page 15: Puppet at janrain

Puppet keeps us sane

class apps::zookeeper-server ( $nodes ) { package { "zookeeperd" : ensure => installed }

service { "zookeeper": ensure => running, enable => true, hasstatus => true, pattern => "zookeeper", require => Package["zookeeperd"] }

file { "/etc/zookeeper/conf/zoo.cfg" : content => template("apps/zookeeper/zoo.cfg.erb") }}

Page 16: Puppet at janrain

Version control lets us work together

>git branch -r origin/HEAD -> origin/master origin/development origin/master

Page 17: Puppet at janrain

Environments keep us safe

development > staging > production

Page 18: Puppet at janrain

Scary API's?

Page 19: Puppet at janrain

Simple tools keep us efficient

> createaserver.rb -a ami-e2af508b -n test1.janrain.com -S

Fog launches an Ubuntu base ami

server = compute.servers.create(:image_id => options[:ami], :flavor_id => options[:type], :groups => options[:groups], :user_data => 'puppet: conf: agent: server: 'puppet.janrain.com' certname: '"test1.janrain.com"' environment: "development" pluginsync: true waitforcert: true

Page 20: Puppet at janrain

● Ubuntu cloud-init installs puppet○ https://help.ubuntu.com/community/CloudInit○ also: work around for provider prerequisite problem

● Puppet starts up and waits for signing○ our utility signs the cert over the REST api

■ http://docs.puppetlabs.com/guides/rest_api.html

curl -i --cert ~/.puppetcred/puppet.crt --key ~/.puppetcred/puppet.key --cacert ~/.puppetcred/ca_crt.pem https://puppet.janrain.com/development/certificate_status/test1.janrain.com -H 'Content-Type: text/pson' -X PUT --data '{"desired_state":"signed"}'

Page 21: Puppet at janrain

● Puppet starts up and installs our base from common modules○ users○ groups○ ssh pubkeys○ common apps○ metrics and monitors

■ collectd■ nagios■ mcollective

Page 22: Puppet at janrain

● Puppet sets up the DNS○ via REST API ○ http://dyn.com/dns/dynect-managed-dns/

● Puppet manages our instance volumes with lvm○ https://github.com/puppetlabs/puppet-lvm

● Puppet deploys application code with vcsrepo○ https://github.com/puppetlabs/puppet-vcsrepo

Page 23: Puppet at janrain

Tadah!

ssh test1.janrain.com Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-8-virtual i686)[email protected]:~$

Page 24: Puppet at janrain

The dashboard gives us insight

Page 25: Puppet at janrain

Avoiding the Stampede

● It's hard to keep the PuppetMaster's load predictable● Puppetcommander● Initiates runs in an orderly fashion● Can be globally disabled

https://github.com/puppetlabs/mcollective-plugins/tree/master/agent/puppetd/commander/

Page 26: Puppet at janrain

What's next?

● External Node classifier● LXC Development Environment● Build => Bundle => Scale● Puppet and Zookeeper via Facter

Page 27: Puppet at janrain

In conclusion

Page 28: Puppet at janrain