puppet camp melbourne 2014:

51
I moved from managing 1 to 100 servers with Puppet Eric Pizzani The Australian National University

Upload: puppet-labs

Post on 02-Jul-2015

222 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Puppet Camp Melbourne 2014:

I moved from managing 1 to 100 servers with Puppet

Eric Pizzani The Australian National University

Page 2: Puppet Camp Melbourne 2014:

Quick Intro: Me •  Works in Canberra for the Australian National

University, originally from Melbourne. •  Responsible for the technical infrastructure of

ANU College of Asia and the Pacific’s web presence.

Page 3: Puppet Camp Melbourne 2014:

Quick Intro: The College •  The college has roots dating back to 1946 as

the Universities’ Research School of Pacific Studies

•  220 academic staff supported by 170 general staff

•  2,252 students with over 9,600 alumni •  Subjects from economics, political studies to

Asian languages •  Have more IP addresses than North Korea

Page 4: Puppet Camp Melbourne 2014:

Quick Intro: The College More to the point… •  Hosts over 60 websites •  Average of five thousand visitors a day •  Peak of 100,000 on one night •  Running Drupal, Wordpress, and hand

crafted PHP

Page 5: Puppet Camp Melbourne 2014:

In the beginning… •  Small IT firm of 4 full time staff and a handful

of contractors •  Desktop support to system administration •  Configuration management was needed

Page 6: Puppet Camp Melbourne 2014:

In the beginning…

“Puppet sucks. Puppet is written in Ruby. Ruby sucks.”

Page 7: Puppet Camp Melbourne 2014:

In the beginning…

“Puppet sucks. Puppet is written in Ruby. Ruby sucks.”

– Eric Pizzani, 2009

Page 8: Puppet Camp Melbourne 2014:

In the beginning…

Page 9: Puppet Camp Melbourne 2014:

In the beginning…

Page 10: Puppet Camp Melbourne 2014:

In the beginning…

Page 11: Puppet Camp Melbourne 2014:

In the beginning…

What could possibly go wrong?

Page 12: Puppet Camp Melbourne 2014:

In the beginning…

Page 13: Puppet Camp Melbourne 2014:

In the beginning… Just a bad idea

And repeat every time there’s an update? For every machine?

Page 14: Puppet Camp Melbourne 2014:

In the beginning… Just a bad idea

And repeat every time there’s an update? For every machine?

Page 15: Puppet Camp Melbourne 2014:

In the beginning…

Fairly sure this sets up P HP in an insecure way…

Page 16: Puppet Camp Melbourne 2014:

In the beginning…

As before...

What if this needed to be larger?

Page 17: Puppet Camp Melbourne 2014:

In the beginning…

T URN OF F THE F IREWALL!?

Why are they instal led in the f irst place?

Page 18: Puppet Camp Melbourne 2014:

In the beginning…

Good start, but I’m sure there’s more to do...

Page 19: Puppet Camp Melbourne 2014:

ANU – ‘many’ years later •  Used pre-configured virtual appliances •  Low monthly fee gave you access to a wide

range of web applications- Wordpress, OTRS, Drupal

•  Simple to setup- Download the appliance, fill in a few questions in a form and done.

•  Updates were the same process

Page 20: Puppet Camp Melbourne 2014:

ANU – ‘many’ years later •  Used pre-configured virtual appliances •  Low monthly fee gave you access to a wide

range of web applications- Wordpress, OTRS, Drupal

•  Simple to setup- Download the appliance, fill in a few questions in a web form and done.

•  Updates were the same process ...in theory

Page 21: Puppet Camp Melbourne 2014:

ANU – ‘many’ years later

Page 22: Puppet Camp Melbourne 2014:

What could go wrong? •  Mistakes and typos •  Steps forgotten •  Poor asset management •  Repeating the entire initial configuration

process every time you needed to update was time consuming

Page 23: Puppet Camp Melbourne 2014:

What did go wrong? •  Custom configuration lost on upgrade or DR. •  Wordpress install inside VA provided

wordpress install. •  Files ended up in places the VA backup

service didn’t know about…

Page 24: Puppet Camp Melbourne 2014:

What else went wrong? •  DNS server addresses changed •  I would forget this important step

•  Systems were frequently not put into Nagios

Page 25: Puppet Camp Melbourne 2014:

Enter puppet

Page 26: Puppet Camp Melbourne 2014:

Enter puppet

=)

Page 27: Puppet Camp Melbourne 2014:

The Project •  Legacy Solaris Stack Decommissioning – Management machine was a 1997 vintage Sun

Enterprise 450 – Web server was a 2003 vintage Sun Fire V440 – Custom complied Apache and PHP – Non-existent documentation – 1200 days uptime – 40 websites and sub sites

Page 28: Puppet Camp Melbourne 2014:

The Project

Page 29: Puppet Camp Melbourne 2014:

The Project

Page 30: Puppet Camp Melbourne 2014:

The Project

also known as cheops

DNS

Page 31: Puppet Camp Melbourne 2014:

The Project

also known as cheops

DNS SMTP

Page 32: Puppet Camp Melbourne 2014:

How puppet helped?

Page 33: Puppet Camp Melbourne 2014:

How puppet helped?

Page 34: Puppet Camp Melbourne 2014:

How puppet helped?

Page 35: Puppet Camp Melbourne 2014:

How puppet helped?

Page 36: Puppet Camp Melbourne 2014:

How puppet helped? •  Quick site provisioning – No messing and crafting vhosts by hand

•  “Self” documentated •  Databases created and firewalls setup

Page 37: Puppet Camp Melbourne 2014:

Low hanging fruit…or continuous improvement

•  Improvements rolled out to all systems- new and old

•  Manual tasks no more! •  More monitoring checks!

Page 38: Puppet Camp Melbourne 2014:

Low hanging fruit…or continuous improvement

•  Improvements rolled out to all systems- new and old

•  Manual tasks no more! •  More monitoring checks!

Page 39: Puppet Camp Melbourne 2014:

Low hanging fruit…or continuous improvement

•  Improvements rolled out to all systems- new and old

•  Manual tasks no more! •  More monitoring checks!

Page 40: Puppet Camp Melbourne 2014:

Low hanging fruit…or continuous improvement

•  Improvements rolled out to all systems- new and old

•  Manual tasks no more! •  More monitoring checks! •  Auto-documentation

Page 41: Puppet Camp Melbourne 2014:

Low hanging fruit…or continuous improvement

Page 42: Puppet Camp Melbourne 2014:

Low hanging fruit…or continuous improvement

Page 43: Puppet Camp Melbourne 2014:

Night works

•  Server outages & updates

Page 44: Puppet Camp Melbourne 2014:

Night works

•  Server outages & updates •  Run yum update -y? Or apt-get update && apt-get upgrade?

Page 45: Puppet Camp Melbourne 2014:

Night works

•  Server outages & updates •  Run yum update -y? Or apt-get update && apt-get upgrade?

mco puppet resource exec yum command='/usr/bin/yum update -y' --with-fact osfamily=RedHat!

Page 46: Puppet Camp Melbourne 2014:

What’s next?

•  Working on a web infrastructure migration project – Leverage Hiera

Page 47: Puppet Camp Melbourne 2014:

What’s next?

•  Working on a web infrastructure migration project – Leverage Hiera – More git

Page 48: Puppet Camp Melbourne 2014:

What’s next?

•  Working on a web infrastructure migration project – Leverage Hiera – More git – More monitoring

Page 49: Puppet Camp Melbourne 2014:

What’s next?

•  Working on a web infrastructure migration project – Leverage Hiera – More git – More monitoring

...for now…

Page 50: Puppet Camp Melbourne 2014:

Questions

???

Page 51: Puppet Camp Melbourne 2014:

Feedback

Email me: [email protected]