Using Vagrant for developing and                        testing puppet modulesonsdag den 18. april 12
Thanks to                 • Mitchell Hashimoto & John Bender                          • The creators of Vagrant           ...
Vagrant                     "A person without a settled home or regular home who                      wanders from place t...
Vagrant tool                 • "Create and configure lightweight,                   reproducible, and portable development ...
Install and setup                 • Requires: Ruby, Virtualbox                 $ gem install vagrant                 $ vag...
Connect and destroy                 $ vagrant ssh                 vagrant@vagrant-ubuntu-oneiric:~$                 $ vagr...
Using puppet                   config.vm.provision :puppet do |puppet|                    puppet.manifests_path = "./"    ...
Using puppet                 node default {                          package {                              "ruby-json":  ...
Testing our manifest                 $ vagrant up                 [default] VM booted and ready for use!                 [...
Testing our manifest                 • Manifest and module paths mounted from                   host to VM, any local chan...
Benefits                 • Use same puppet files to generate developer                   environments                 • Crea...
Questions?                 • Twitter: @oellegaard                 • GitHub: KristianOellegaard                 • Email: kr...
Upcoming SlideShare
Loading in …5
×

Using vagrant for developing and testing puppet modules

4,092 views

Published on

A 15-min talk from the puppet meetup in Zürich, 18th April 2012.

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,092
On SlideShare
0
From Embeds
0
Number of Embeds
107
Actions
Shares
0
Downloads
31
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Using vagrant for developing and testing puppet modules

  1. 1. Using Vagrant for developing and testing puppet modulesonsdag den 18. april 12
  2. 2. Thanks to • Mitchell Hashimoto & John Bender • The creators of Vagrant • Kris Buytaert • Parts of this presentation is based on his excellent talk at Puppet Camp Edinburgonsdag den 18. april 12
  3. 3. Vagrant "A person without a settled home or regular home who wanders from place to place and lives by begging."onsdag den 18. april 12
  4. 4. Vagrant tool • "Create and configure lightweight, reproducible, and portable development environments" - vagrantup.com • A light tool that using virtual box makes it very easy to start from an empty OS and apply a puppet manifest to itonsdag den 18. april 12
  5. 5. Install and setup • Requires: Ruby, Virtualbox $ gem install vagrant $ vagrant box add base http://.../ $ vagrant init $ vagrant uponsdag den 18. april 12
  6. 6. Connect and destroy $ vagrant ssh vagrant@vagrant-ubuntu-oneiric:~$ $ vagrant destroy [default] Destroying VM and associated drives...onsdag den 18. april 12
  7. 7. Using puppet   config.vm.provision :puppet do |puppet|    puppet.manifests_path = "./"    puppet.manifest_file  = "vagrant.pp"    puppet.module_path = "../"   endonsdag den 18. april 12
  8. 8. Using puppet node default { package {    "ruby-json":     ensure => installed, } }onsdag den 18. april 12
  9. 9. Testing our manifest $ vagrant up [default] VM booted and ready for use! [default] Mounting shared folders... [default] -- v-root: /vagrant [default] -- manifests: /tmp/vagrant-puppet/manifests [default] -- v-pp-m0: /tmp/vagrant-puppet/modules-0 [default] Running provisioner: Vagrant::Provisioners::Puppet... [default] Running Puppet with /tmp/vagrant-puppet/manifests/vagrant.pp... stdin: is not a tty notice: /Stage[main]//Node[default]/Package[ruby-json]/ensure: ensure changed purged to present notice: Finished catalog run in 6.44 secondsonsdag den 18. april 12
  10. 10. Testing our manifest • Manifest and module paths mounted from host to VM, any local change is immediately on the VM • Run puppet again, without restarting the VM $ vagrant provisiononsdag den 18. april 12
  11. 11. Benefits • Use same puppet files to generate developer environments • Create a production-like vm in minutes • Can be shipped both internally and externally.onsdag den 18. april 12
  12. 12. Questions? • Twitter: @oellegaard • GitHub: KristianOellegaard • Email: kristian@oellegaard.comonsdag den 18. april 12

×