SlideShare a Scribd company logo
1 of 12
Download to read offline
Using Vagrant for developing and
                        testing puppet modules
onsdag den 18. april 12
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 Edinburg



onsdag den 18. april 12
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
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 it



onsdag den 18. april 12
Install and setup
                 • Requires: Ruby, Virtualbox

                 $ gem install vagrant

                 $ vagrant box add base http://.../

                 $ vagrant init

                 $ vagrant up




onsdag den 18. april 12
Connect and destroy
                 $ vagrant ssh

                 vagrant@vagrant-ubuntu-oneiric:~$



                 $ vagrant destroy

                 [default] Destroying VM and
                 associated drives...


onsdag den 18. april 12
Using puppet

                   config.vm.provision :puppet do |puppet|

                    puppet.manifests_path = "./"

                    puppet.manifest_file  = "vagrant.pp"

                    puppet.module_path = "../"

                   end




onsdag den 18. april 12
Using puppet
                 node default {

                          package {

                              "ruby-json":

                               ensure => 'installed',

                          }

                    }




onsdag den 18. april 12
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 seconds




onsdag den 18. april 12
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 provision




onsdag den 18. april 12
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
Questions?

                 • Twitter: @oellegaard

                 • GitHub: KristianOellegaard

                 • Email: kristian@oellegaard.com




onsdag den 18. april 12

More Related Content

Similar to Using vagrant for developing and testing puppet modules

Django & Buildout (en)
Django & Buildout (en)Django & Buildout (en)
Django & Buildout (en)
zerok
 
Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101
jelrikvh
 

Similar to Using vagrant for developing and testing puppet modules (20)

Openstack havana
Openstack havanaOpenstack havana
Openstack havana
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & Hadoop
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Automated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packerAutomated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packer
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
Django & Buildout (en)
Django & Buildout (en)Django & Buildout (en)
Django & Buildout (en)
 
Vagrant for Virtualized Development
Vagrant for Virtualized DevelopmentVagrant for Virtualized Development
Vagrant for Virtualized Development
 
Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-Overview
 
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
 
Lessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet AgentsLessons I Learned While Scaling to 5000 Puppet Agents
Lessons I Learned While Scaling to 5000 Puppet Agents
 
Vagrant 101 Workshop
Vagrant 101 WorkshopVagrant 101 Workshop
Vagrant 101 Workshop
 
Puppet Camp Berlin 2015: Rapid testing Setups for Puppet
Puppet Camp Berlin 2015: Rapid testing Setups for PuppetPuppet Camp Berlin 2015: Rapid testing Setups for Puppet
Puppet Camp Berlin 2015: Rapid testing Setups for Puppet
 
Puppet Camp Berlin 2015: Felix Frank | Rapid Testing Setups for Puppet
Puppet Camp Berlin 2015: Felix Frank | Rapid Testing Setups for PuppetPuppet Camp Berlin 2015: Felix Frank | Rapid Testing Setups for Puppet
Puppet Camp Berlin 2015: Felix Frank | Rapid Testing Setups for Puppet
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101Environments line-up! Vagrant & Puppet 101
Environments line-up! Vagrant & Puppet 101
 
Toplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkToplog candy elves - HOCM Talk
Toplog candy elves - HOCM Talk
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Using vagrant for developing and testing puppet modules

  • 1. Using Vagrant for developing and testing puppet modules onsdag den 18. april 12
  • 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 Edinburg onsdag den 18. april 12
  • 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. 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 it onsdag den 18. april 12
  • 5. Install and setup • Requires: Ruby, Virtualbox $ gem install vagrant $ vagrant box add base http://.../ $ vagrant init $ vagrant up onsdag den 18. april 12
  • 6. Connect and destroy $ vagrant ssh vagrant@vagrant-ubuntu-oneiric:~$ $ vagrant destroy [default] Destroying VM and associated drives... onsdag den 18. april 12
  • 7. Using puppet   config.vm.provision :puppet do |puppet|    puppet.manifests_path = "./"    puppet.manifest_file  = "vagrant.pp"    puppet.module_path = "../"   end onsdag den 18. april 12
  • 8. Using puppet node default { package {    "ruby-json":     ensure => 'installed', } } onsdag den 18. april 12
  • 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 seconds onsdag den 18. april 12
  • 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 provision onsdag den 18. april 12
  • 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. Questions? • Twitter: @oellegaard • GitHub: KristianOellegaard • Email: kristian@oellegaard.com onsdag den 18. april 12