Puppet
Provisioning
on Windows

A rough guide to Puppet on Windows

Created by Henrik Feldt / @henrikfeldt

Agenda

  1. Who are you and what are you doing here?
  2. Puppet intro
  3. Puppet fundamentals
  4. Demo
  5. Code walkthrough

Who am I?

Philosopher of Software

Software Architect at Intelliplan

Who am I? OSS:

I do too much!

an aside

This presentation is at haf.github.com/presentations/puppet-provisioning-on-windows.html

Puppet Intro

Provision servers and have them stay the way you want them.

Source-control your servers.

Puppet Intro - Who?

Arms up! Who has read about puppet and what it does?

Puppet Intro - Who? (2)

Arms up again! Who has written puppet code?

Puppet Intro - When?

Started 2005, by Luke Kanies

Jan 2013, VmWare invested $30M

Thriving Open Source community

Use Cases

Multi-datacenter

Integration testing infrastructure

Security tool, CA, revert-to-known

Multi-tenancy with adaptations, etc.

Together with MCollective - orchestration

Application Deployments

Why on Windows?

It's the best one out there!

Puppet Fundamentals

A lof of declaring how you want your resources

class bashprofile(
  $root
) {
  $targ = "$::systemdrive/Users/${::username}"

  file { "$targ/.bash_profile":
    ensure  => link,
    target  => "$root/src/dotfiles/.bash_profile"
  }
}

Puppet Fundamentals (2)

Wrap resource definitions in classes and declare those

node default {
  $codelocation = "$::systemdrive/Users/$::username/provision"
  notice("running as: $::username")
  Exec { path => $::path }
  Package { provider => 'chocolatey' }

  class { 'profiles::dotfiles':
    codelocation => $codelocation
  }
  
  include chocolatey
  class { 'chocolatey::exe': }
  
  Package <| |> { require +> Class['chocolatey::exe'] }

  class { 'profiles::windowsbaseline':
    codelocation => $codelocation
  }
  class { 'profiles::rubydev': }
  class { 'profiles::dotnetdev': }
}

Demo

Code Walkthrough

Discussion & Questions

THE END

@HenrikFeldt / haf.se