Puppet & Vagrant Intro

585 views
453 views

Published on

Short introduction to Puppet and Vagrant (what they are all about and basic usage)
Talk given at WDCM Dresden at Feb 11, 2014

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
585
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
6
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Puppet & Vagrant Intro

  1. 1. Puppet & Vagrant
  2. 2. Was ist Puppet • IT Automatisierung • Infrastruktur Management • Configuration File Management • Skalierungs-freundlich
  3. 3. Aufbau • Facter • (PuppetDB) • Manifests • node.pp
  4. 4. # puppet apply file.pp
  5. 5. 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!":}
  6. 6. # 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
  7. 7. Klassen/ Module • class ntp { … } • include ntp
  8. 8. Vagrant
  9. 9. Was ist Vagrant • einfache Entwicklungsumgebungen • Provisionierbar über Puppet • Virtualisierung mit • Virtualbox • VMWare (kostenpflichtig)
  10. 10. Basis-Umgebung $ vagrant box add base http://files.vagrantup.com/precise32.box $ vagrant init $ vagrant up
  11. 11. 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
  12. 12. zum Lernen • Puppet Tutorial: http://bit.ly/lernpuppet • Vagrant: http://bit.ly/learnvagrant
  13. 13. We are hiring! jobs.lovoo.net

×