-- mode: markdown; mode: visual-line; --
Sudo Puppet Module Tests with Vagrant
- Reference installation notes -- assuming you have installed Oracle's VirtualBox
- installation notes on Mac OS using Homebrew and Cask
Vagrantfile at the root of the repository pilot the provisioning a vagrant boxes.
It can run any OS you set in
tests/vagrant/config.yaml as follows:
:vms: 'default': :os: :debian8
You can list the available vagrant box as follows:
$> vagrant status Current machine states: centos-7 running (virtualbox) The VM is running. To stop this VM, you can run `vagrant halt` to shut it down forcefully, or you can run `vagrant suspend` to simply suspend the virtual machine. In either case, to restart it again, simply run `vagrant up`.
You can boot the VM and provision it (using the scripts under
tests/vagrant/) by running:
$> vagrant up
Then you can ssh into the machine afterwards:
$> vagrant ssh
When you run
vagrant up <name> to boot the VM, the provisioning scripts are responsible for:
||Install puppet 4 and defaults packages and gems|
||pre-install the necessary puppet modules|
More precisely, the
This script is responsible for two main tasks:
- pre-install the puppet modules listed as dependencies in
- make the appropriate symbolic link in the puppet module directory (to
/vagrant) to ensure you can directly make changes and correct your own module transparently within the box.
So you can test the manifests of the
tests/ directory within the VM:
$> vagrant ssh [<os>] [...] (vagrant)$> sudo puppet apply -t /vagrant/tests/init.pp
From now on, you can test (with --noop) the other manifests.
vagrant halt (or
vagrant destroy) to stop (or kill) the VM once you've finished to play with it.
Vagrantfile at the root of this repository might evolve over the time with new boxes. To automatically get the last version available:
$> bundle update falkorlib $> git commit -s -m "Upgrade falkorlib to the latest version" Gemfile.lock
Vagrantfileto the last version by issuing:
$> rake templates:upgrade:vagrant