puppet camp munich 2013: puppet at the centre of everything

68
Puppet at the centre of everything

Upload: puppet-labs

Post on 10-May-2015

335 views

Category:

Software


0 download

DESCRIPTION

"Puppet at the centre of everything" by David Mytton of Server Density presented at Puppet Camp Munich 2013

TRANSCRIPT

Page 1: Puppet Camp Munich 2013: Puppet at the centre of everything

Puppet at the centre of everything

Page 2: Puppet Camp Munich 2013: Puppet at the centre of everything

David Mytton

Woop Japan!

Page 3: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 4: Puppet Camp Munich 2013: Puppet at the centre of everything

Server Density Architecture

•100 servers - Ubuntu 12.04

Page 5: Puppet Camp Munich 2013: Puppet at the centre of everything

Server Density Architecture

•100 servers - Ubuntu 12.04

•50% virtual

Page 6: Puppet Camp Munich 2013: Puppet at the centre of everything

Server Density Architecture

•100 servers - Ubuntu 12.04

•Nginx, Python, MongoDB

•50% virtual

Page 7: Puppet Camp Munich 2013: Puppet at the centre of everything

Server Density Architecture

•100 servers - Ubuntu 12.04

•Nginx, Python, MongoDB

•25TB data per month

•50% virtual

Page 8: Puppet Camp Munich 2013: Puppet at the centre of everything

Use cases

• Config

Page 9: Puppet Camp Munich 2013: Puppet at the centre of everything

Use cases

• Config

• Failover

Page 10: Puppet Camp Munich 2013: Puppet at the centre of everything

Use cases

• Config

• Code deploys

• Failover

Page 11: Puppet Camp Munich 2013: Puppet at the centre of everything

Use cases

• Config

• Code deploys

• System updates

• Failover

Page 12: Puppet Camp Munich 2013: Puppet at the centre of everything

• Base manifest

Config

Page 13: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 14: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 15: Puppet Camp Munich 2013: Puppet at the centre of everything

• Base manifest

Config

• Sub manifests

Page 16: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 17: Puppet Camp Munich 2013: Puppet at the centre of everything

• base

• softlayer

• softlayer-dedicated

• rackspace

• ...

Page 18: Puppet Camp Munich 2013: Puppet at the centre of everything

Failover

• /etc/hosts

<%= metrics2IP %> alerts.honshuu.prod

audit.honshuu.prod auth.honshuu.prod

cloud.honshuu.prod datastore.honshuu.prod

inventory.honshuu.prod ...

Page 19: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 20: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 21: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 22: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 23: Puppet Camp Munich 2013: Puppet at the centre of everything

Failover

• /etc/hosts

108.168.254.33 puppet

Page 24: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 25: Puppet Camp Munich 2013: Puppet at the centre of everything

Expected

Dealing with outages

Page 26: Puppet Camp Munich 2013: Puppet at the centre of everything

Really test your vendors

Dealing with outages

Page 27: Puppet Camp Munich 2013: Puppet at the centre of everything

Simulations

Dealing with outages

Page 28: Puppet Camp Munich 2013: Puppet at the centre of everything

• Commit

Code deploys

Page 29: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 30: Puppet Camp Munich 2013: Puppet at the centre of everything

• Commit

Code deploys

• Build

Page 31: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 32: Puppet Camp Munich 2013: Puppet at the centre of everything

• Commit

Code deploys

• Build

• Deploy

Page 33: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 34: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 35: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 36: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 37: Puppet Camp Munich 2013: Puppet at the centre of everything

/opt/puppet/bin/mco puppetd runonce -I <host>

Page 38: Puppet Camp Munich 2013: Puppet at the centre of everything

• Commit

Code deploys

• Build

• Deploy

• Puppet run

Page 39: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 40: Puppet Camp Munich 2013: Puppet at the centre of everything

Code deploys

Advantages

APIs

Page 41: Puppet Camp Munich 2013: Puppet at the centre of everything

Code deploys

Advantages

APIs

Already there

Page 42: Puppet Camp Munich 2013: Puppet at the centre of everything

Code deploys

Advantages

APIs

Already there

System facts

Page 43: Puppet Camp Munich 2013: Puppet at the centre of everything

Code deploys

Disadvantages

Slow

Page 44: Puppet Camp Munich 2013: Puppet at the centre of everything

Code deploys

Disadvantages

Slow

Puppet run already

Page 45: Puppet Camp Munich 2013: Puppet at the centre of everything

Code deploys

Disadvantages

Slow

Puppet run already

Eventually consistent

Page 46: Puppet Camp Munich 2013: Puppet at the centre of everything

System updates

• Bash script

Page 47: Puppet Camp Munich 2013: Puppet at the centre of everything

System updates

• Bash script

• Remote commands

Page 48: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 49: Puppet Camp Munich 2013: Puppet at the centre of everything

System updates

• Bash script

• Remote commands

• Notifications

Page 50: Puppet Camp Munich 2013: Puppet at the centre of everything

System updates

• Bash script

• Remote commands

• Notifications

• Canaries

Page 51: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 52: Puppet Camp Munich 2013: Puppet at the centre of everything

•Build master (buildbot): VM x2 CPU 2.0Ghz, 2GB

RAM – $89/m

•Build slave (buildbot): VM x1 CPU 2.0Ghz, 1GB

RAM

– $40/m

•Staging load balancer: VM x1 CPU 2.0Ghz, 1GB

RAM – $40/m

•Staging server 1: VM x2 CPU 2.0Ghz, 8GB RAM

– $165/m

•Staging server 2: VM x1 CPU 2.0Ghz, 2GB RAM

– $50/m

•Puppet master: VM x2 CPU 2.0Ghz, 2GB RAM

– $89/m

•Total: $473/m

Colo experiment

Page 53: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 54: Puppet Camp Munich 2013: Puppet at the centre of everything

Colo experiment

•Dell 1U R415

•x2 8C AMD 2.8Ghz

•32GB RAM

Page 55: Puppet Camp Munich 2013: Puppet at the centre of everything

Colo experiment

•Dell 1U R415

•x2 8C AMD 2.8Ghz

•32GB RAM

•Dual PSU, NIC

Page 56: Puppet Camp Munich 2013: Puppet at the centre of everything

Colo experiment

•Dell 1U R415

•x2 8C AMD 2.8Ghz

•32GB RAM

•Dual PSU, NIC

•x4 1TB SATA hot swappable

Page 57: Puppet Camp Munich 2013: Puppet at the centre of everything

Dedicated?

Page 58: Puppet Camp Munich 2013: Puppet at the centre of everything

Dedicated?

•Hardware replacement

Page 59: Puppet Camp Munich 2013: Puppet at the centre of everything

Dedicated?

•Hardware replacement

•Managed/support

Page 60: Puppet Camp Munich 2013: Puppet at the centre of everything

Dedicated?

•Hardware replacement

•Managed/support

•Networking

Page 61: Puppet Camp Munich 2013: Puppet at the centre of everything

Colo?

Page 62: Puppet Camp Munich 2013: Puppet at the centre of everything

Colo?

•Hardware spec/value

Page 63: Puppet Camp Munich 2013: Puppet at the centre of everything

Colo?

•Hardware spec/value

•Total cost

Page 64: Puppet Camp Munich 2013: Puppet at the centre of everything

Colo?

•Hardware spec/value

•Total cost

•Internal skills?

Page 65: Puppet Camp Munich 2013: Puppet at the centre of everything

Colo?

•Hardware spec/value

•Total cost

•Internal skills?

•More fun?!

Page 66: Puppet Camp Munich 2013: Puppet at the centre of everything
Page 67: Puppet Camp Munich 2013: Puppet at the centre of everything

Colo: Power

•£300-350/kWh/m

•4.5A = £520/m

•9A = £900/m

Page 68: Puppet Camp Munich 2013: Puppet at the centre of everything

David Mytton

[email protected]

@davidmytton

Woop Japan!

blog.serverdensity.com