Slide 1

Slide 1 text

Introduction to Server Automation with Puppet Jeremy Olliver @static_storm

Slide 2

Slide 2 text

Why automate? • A good developer is a lazy developer • Saves time • Easier to get right/consistent • Otherwise you’ll have to write documentation

Slide 3

Slide 3 text

Popular tools for Automating • Puppet • Chef • O/S package provider specific (Kick start) • others

Slide 4

Slide 4 text

Chef • DSL written in pure ruby • Highly customisable • Uses a large amount of boilerplate code for configuration • Steep learning curve

Slide 5

Slide 5 text

Puppet • Uses a configuration DSL (not actual coding language) • simple to configure • Large community • easy installation

Slide 6

Slide 6 text

Puppet vs. Chef Example • Both use an ERB template • Chef declares much more meta-data • Puppet example is simpler and easier to configure

Slide 7

Slide 7 text

Use the right tool for the job • Both have their advantages & downsides • Investigate both and see if they fit your requirements • we’ll be talking about using puppet

Slide 8

Slide 8 text

Puppet Architecture • Server-client • Puppet Master runs a ruby application under ssl • puppet client connects to master & pulls down config • clients generate a cert to be authenticated by the puppet master

Slide 9

Slide 9 text

Setting up Puppet • Install as either a ruby gem, or via distribution package (e.g. apt, yum) • server: apt-get install puppetmasterd # /etc/puppet/puppet.conf service puppetmaster start

Slide 10

Slide 10 text

Puppet client apt-get install puppet # Edit /etc/hosts 192.168.0.3 puppet # Edit /etc/hostname 127.0.0.1 app1.abletech.co.nz app1 hostname --fqdn puppetd --test # or: service puppetd start

Slide 11

Slide 11 text

Authenticating Puppet • server: • client: puppetca --list > app1.abletech.co.nz puppetca --sign app1.abletech.co.nz puppetd --test

Slide 12

Slide 12 text

Configuring Server Script Examples...

Slide 13

Slide 13 text

Benefits • Have a new server configured & customised in half an hour • uniform server conventions/layout • self-documenting & repeatable