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

Puppet & Vagrant Intro

Puppet & Vagrant Intro

Simple introduction to Puppet & Vagrant

Christian Jantz

February 11, 2014
Tweet

Other Decks in Technology

Transcript

  1. Was ist Puppet • IT Automatisierung • Infrastruktur Management •

    Configuration File Management • Skalierungs-freundlich
  2. Demo file.pp file {'/tmp/test1': ensure => file, content => "Hi.\n",

    } ! file {'/tmp/test2': ensure => directory, mode => 0644, } ! file {'/tmp/test3': ensure => link, target => '/tmp/test1', } ! user {'katie': ensure => absent, } ! notify {"I'm notifying you.":} notify {"So am I!":}
  3. # puppet apply file.pp notice: /Stage[main]//File[/tmp/test1]/ensure: created notice: /Stage[main]//File[/tmp/test3]/ensure: created

    notice: /Stage[main]//File[/tmp/test2]/ensure: created notice: So am I! notice: /Stage[main]//Notify[So am I!]/message: defined 'message' as 'So am I!' notice: I'm notifying you. notice: /Stage[main]//Notify[I'm notifying you.]/message: defined 'message' as 'I'm notifying you.' notice: Finished catalog run in 0.05 seconds
  4. Was ist Vagrant • einfache Entwicklungsumgebungen • Provisionierbar über Puppet

    • Virtualisierung mit • Virtualbox • VMWare (kostenpflichtig)
  5. Beispiel-Config mit puppet Vagrant.configure("2") do |config| ! config.vm.box = "debian-607"

    config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210.box" config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--memory", "4096"] v.customize ["modifyvm", :id, "--cpus", "4"] end config.vm.network :public_network config.vm.network :forwarded_port, guest: 80, host: 8080 config.vm.hostname = „demo.hostname.local“ ! config.vm.provision :puppet_server do |puppet| puppet.puppet_server = „puppet.meinhost.de“ puppet.options = "--verbose --debug --environment testing" end end