Last Updated: February 25, 2016
·
1.861K
· n3bulous

Speed up Chef (Puppet, ...) Testing with Vagrant Snapshots

  1. First, get your desired baseline installation working with Vagrant.
  2. Using the vagrant-vbox-snapshot plugin, create a named backup
  3. Run you provisioning commands.
  4. Revert to a good snapshot to avoid the build from scratch.
  5. Wash, rinse, repeat until success.
  6. You'll probably want to do a from-scratch test and a pre-production test before rolling out changes.
vagrant plugin install vagrant-vbox-snapshot
vagrant snapshot take good-snap
vagrant snapshot back (reload the last snapshot)
vagrant snapshot go good-snap (use the named snapshot)