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

Cloud infrastructure from code

Cloud infrastructure from code

Using Puppet to provision infrastructure in Digital Ocean and AWS. Includes examples of existing and upcoming features and using the existing testing tools to validate your infrastructure before creating it.

Gareth Rushgrove

January 15, 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. » 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
  4. » 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
  5. » 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
  6. » 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