Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Provisioning with Puppet

Provisioning with Puppet

PuppetConf 2015 presentation on how and why to use Puppet to provision infrastructure. Includes examples of AWS, vSphere, GCE, and Azure.

Gareth Rushgrove

October 09, 2015
Tweet

More Decks by Gareth Rushgrove

Other Decks in Technology

Transcript

  1. » tugboat droplets new-server (ip: 178.62.112.91, status: active, region: 7

    new-server (ip: 178.62.17.225, status: new, region: 7, id: Gareth Rushgrove
  2. noun 1. a standard or example for imitation or comparison

    2. a representation to show the construction or appearance of something Gareth Rushgrove
  3. If you’re already Familiar with the Puppet language you don’t

    need to learn or adopt a new tool Gareth Rushgrove
  4. » puppet resource droplet Info: Checking if droplet test exists

    droplet { 'test': ensure => 'present', image => '9801950', private_address => '10.131.221.13', public_address => '178.62.17.225', region => 'lon1', } Gareth Rushgrove
  5. » puppet resource droplet test ensure=absent Info: Checking if droplet

    test exists Info: Destroying droplet test Notice: /Droplet[test]/ensure: removed Info: Checking if droplet test exists droplet { 'test': ensure => 'absent', } Gareth Rushgrove
  6. » puppet resource vsphere_vm Info: Checking if vsphere_vm /dc/vm/eng/sample exists

    vsphere_vm { '/dc/vm/eng/sample': ensure => 'running', cpu_reservation => '0', cpus => '1', guest_os => 'Debian GNU/Linux 6 (64-b instance_uuid => '5018f10a-ec54-0dbc-5537- memory => '1024', memory_reservation => '0', number_ethernet_cards => '1', power_state => 'poweredOn', resource_pool => 'general1', Gareth Rushgrove
  7. » puppet resource azure_vm_classic Info: Checking if azure_vm_classic exists azure_vm_classic

    { 'virtual-machine-name': ensure => 'present', cloud_service => 'cloud-service-uptjy', deployment => 'cloud-service-uptjy', hostname => 'garethr', image => 'b39f27a8b8c64d52b05eac6a62ebad85__Ubun ipaddress => 'xxx.xx.xxx.xx', location => 'West US', media_link => 'http://xxx.blob.core.windows.net/vhds/ disk_2015_08_28_07_49_34_868.vhd', os_type => 'Linux', Gareth Rushgrove
  8. » be rake spec arbiter should compile into a catalogue

    without dependency cycles should contain exactly 9 Droplet resources web servers should contain Droplet[web1-digitalocean] with region => "lon1" and size => "512mb" should contain Droplet[web2-digitalocean] with region => "lon1" and size => "512mb" should contain Droplet[web3-digitalocean] with region => "lon1" and size => "512mb" application servers should contain Droplet[app1-digitalocean] with region => "lon1" and size => "512mb" should contain Droplet[app2-digitalocean] with region => "lon1" and size => "512mb" should contain Droplet[app3-digitalocean] with region => "lon1" and size => "512mb" should contain Droplet[app4-digitalocean] with region => "lon1" and size => "512mb" database servers should contain Droplet[db1-digitalocean] with region => "lon1" and size => "2048mb" should contain Droplet[db2-digitalocean] with region => "lon1" and size => "2048mb" Finished in 0.26288 seconds 11 examples, 0 failures Gareth Rushgrove Unit testing support
  9. » be rake lint syntax manifests/site.pp - WARNING: double quoted

    string containing no variables on line 3 ---> syntax:manifests ---> syntax:templates ---> syntax:hiera:yaml Gareth Rushgrove Coding standards and syntax
  10. Puppet is simple to extend to a wide range of

    infrastructure problems Gareth Rushgrove
  11. Puppet is a language and a platform to manage ALL

    of your infrastructure Gareth Rushgrove